1/* 2 * Copyright (c) 2022-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 16export class Constants { 17 // illegal value 18 static readonly INVALID: number = -1; 19 20 // Index of and other operations, the index returned when it is not found 21 static readonly NOT_FOUND: number = -1; 22 23 // delay 1s 24 static readonly DELAY_ONE_SECOND: number = 1000; 25 26 // delay 500ms 27 static readonly DELAY_HALF_SECOND: number = 500; 28 29 // delay 250ms 30 static readonly DELAY_QUARTER_SECOND: number = 250; 31 32 // delay 100ms 33 static readonly DELAY_TENTH_SECOND: number = 100; 34 35 // delay 50ms 36 static readonly DELAY_TWENTIETH_SECOND: number = 50; 37 38 // Default sliding window size 39 static readonly DEFAULT_SLIDING_WIN_SIZE: number = 500; 40 static readonly DEFAULT_ROTATE_VALUE: number = 90; 41 static readonly ROTATE_AROUND: number = 360; 42 43 // MainAbility want parameters uri type 44 static readonly WANT_PARAM_URI_DETAIL: string = 'photodetail'; 45 static readonly WANT_PARAM_URI_SELECT_SINGLE: string = 'singleselect'; 46 static readonly WANT_PARAM_URI_SELECT_MULTIPLE: string = 'multipleselect'; 47 static readonly WANT_PARAM_URI_FORM: string = 'formAbility'; 48 static readonly WANT_PARAM_URI_FORM_NONE: string = 'formAbilityNone'; 49 50 // Step size. When the last obtained data index deviates from the center of the current sliding window by more 51 // than this step, adjust the start and end of the window and re initiate the data request 52 static readonly STEP: number = 100; 53 static readonly KEY_VIEW_TYPE: string = 'type'; 54 static readonly KEY_VIEW_DATA: string = 'data'; 55 static readonly ActionBarHeight: number = 56; 56 static readonly APP_KEY_PHOTO_BROWSER: string = 'app_key_photo_browser'; 57 static readonly APP_KEY_ALL_PHOTO_DATASOURCE: string = 'app_key_all_photo_datasource'; 58 static readonly APP_KEY_MENU_OPERATION_FACTORY: string = 'app_key_menu_operation_factory'; 59 static readonly APP_KEY_MENU_MEDIA_OBSERVER: string = 'app_key_menu_media_observer'; 60 static readonly APP_KEY_MENU_USER_FILE_MANAGER_OBSERVER: string = 'app_key_menu_user_file_manager_observer'; 61 static readonly APP_KEY_WORKER_MANAGER: string = 'app_key_worker_manager'; 62 static readonly APP_KEY_SLIDE_SHOW: string = 'app_key_slide_show'; 63 static readonly APP_KEY_SCREEN_MANAGER: string = 'app_key_screen_manager'; 64 static readonly PHOTO_GRID_SELECT_MANAGER: string = 'photo_grid_select_manager'; 65 static readonly THIRD_SELECT_MANAGER: string = 'third_select_manager'; 66 static readonly APP_KEY_STATUS_BAR_COLOR_CONTROLLER: string = 'app_key_status_bar_color_controller'; 67 static readonly APP_KEY_NEW_ALBUM: string = 'app_key_new_album'; 68 static readonly APP_KEY_NEW_ALBUM_TARGET: string = 'app_key_new_album_target'; 69 static readonly APP_KEY_NEW_ALBUM_TARGET_URI: string = 'app_key_new_album_target_uri'; 70 static readonly APP_KEY_NEW_ALBUM_SOURCE: string = 'app_key_new_album_source'; 71 static readonly APP_KEY_NEW_ALBUM_SELECTED: string = 'app_key_new_album_selected'; 72 static readonly APP_KEY_INSTANCE_MEDIA_LIBRARY_ACCESS: string = 'app_key_instance_media_library_access'; 73 static readonly FROM_DATA_STORE_UTIL: string = 'form_data_store_util'; 74 static readonly IS_DATA_FREEZE: string = 'is_data_freeze'; 75 static readonly IS_SHOW_MOVE_COPY_DIALOG: string = 'is_show_move_copy_dialog'; 76 static readonly INSTANCE_MOVE_OR_COPY_BROADCAST_PROP: string = 'instance_move_or_copy_broadcast_prop'; 77 78 // used as album uri for creating album from picker page 79 static readonly APP_NEW_ALBUM_SOURCE_PICKER: string = 'picker_page'; 80 81 // BroadCast 82 static readonly APP_KEY_EVENT_BUS: string = 'app_key_event_bus'; 83 84 // Persistent storage of tabs index 85 static readonly APP_KEY_TABS_INDEX: string = 'app_key_tabs_index'; 86 static readonly SCREEN_MANAGER: string = 'screen_manager'; 87 static readonly PIXEL_MAP_MANAGER: string = 'pixel_map_manager'; 88 89 // Load completion event 90 static readonly ON_LOADING_FINISHED: string = 'on_loading_finished'; 91 92 // Large jump source: timeline 93 static readonly PHOTO_TRANSITION_TIMELINE: string = 'TimelinePage'; 94 95 // Large jump source: album 96 static readonly PHOTO_TRANSITION_ALBUM: string = 'PhotoGridPage'; 97 98 static readonly USER_FILE_MANAGER_PHOTO_TRANSITION_ALBUM: string = 'PhotoGridPage'; 99 100 // Large jump source: camera 101 static readonly PHOTO_TRANSITION_CAMERA: string = 'Camera'; 102 103 // Large jump source: third app 104 static readonly PHOTO_TRANSITION_THIRD_APP: string = 'ThirdApp'; 105 106 // camera bundleName 107 static readonly CAMERA_BUNDLE_NAME: string = 'com.ohos.camera'; 108 109 // camera mainAbility 110 static readonly CAMERA_MAIN_ABILITY: string = 'com.ohos.camera.MainAbility'; 111 112 // camera mainAbility 113 static readonly CAMERA_TYPE_CAPTURE: string = 'capture'; 114 115 // camera mainAbility 116 static readonly CAMERA_TYPE_VIDEO: string = 'video'; 117 static readonly PHOTO_TRANSITION_EDIT: string = 'EditPage'; 118 119 // Timeline page index 120 static readonly TIMELINE_PAGE_INDEX: number = 0; 121 122 // Album page index 123 static readonly ALBUM_PAGE_INDEX: number = 1; 124 static readonly IMAGE_GIF: string = 'gif'; 125 static readonly GRID_CACHE_ROW_COUNT: number = 4; 126 static readonly DISTRIBUTED_ALBUM_PAGE_INDEX: number = 3; 127 128 // Press animation duration 129 static readonly PRESS_ANIM_DURATION: number = 100; 130 131 // Press to scale the value at the end of the animation 132 static readonly PRESS_ANIM_SCALE: number = 0.9; 133 134 // Default maximum number of share count 135 static readonly DEFAULT_MAX_SHARE_COUNT: number = 100; 136 // Default maximum number of external selection pages 137 static readonly DEFAULT_MAX_THIRD_SELECT_COUNT: number = 50; 138 // maximum number limit of external selection pages 139 static readonly LIMIT_MAX_THIRD_SELECT_COUNT: number = 500; 140 141 // Horizontal and vertical screen flag 142 static readonly SCREEN_ORIENTATION_HORIZONTAL: string = 'isHorizontal'; 143 // Screen rotate animation duration 144 static readonly SCREEN_ROTATE_DURATION: number = 600; 145 146 // Sidebar flag 147 static readonly SCREEN_SIDEBAR: string = 'isSidebar'; 148 149 // Column flag 150 static readonly SCREEN_COLUMNS: string = 'screen_colums'; 151 static readonly ADD_NOTES_MAX_LENGTH: number = 140; 152 static readonly RENAME_MAX_LENGTH: number = 50; 153 static readonly ENTRY_FROM_NONE: number = 0; 154 static readonly ENTRY_FROM_CAMERA: number = 1; 155 static readonly ENTRY_FROM_SINGLE_SELECT: number = 2; 156 static readonly ENTRY_FROM_MULTIPLE_SELECT: number = 3; 157 static readonly ENTRY_FROM_RECYCLE: number = 4; 158 static readonly ENTRY_FROM_DISTRIBUTED: number = 5; 159 static readonly ENTRY_FROM_NORMAL: number = 6; 160 static readonly ENTRY_FROM_FORM_ABILITY: number = 7; 161 static readonly ENTRY_FROM_FORM_FORM_EDITOR: number = 8; 162 static readonly ENTRY_FROM_VIEW_DATA: number = 9; 163 static readonly ENTRY_FROM_FORM_DEFAULT_ABILITY: number = 11; 164 static readonly ENTRY_FROM = { 165 NORMAL: 0, 166 CAMERA: 1, 167 SINGLE_SELECT: 2, 168 MULTIPLE_SELECT: 3, 169 RECYCLE: 4, 170 DISTRIBUTED: 5, 171 CARD: 6, 172 VIEW_DATA: 7, 173 }; 174 static readonly DIALOG_BOTTOM_OFFSET: number = 16; 175 176 // Local tab index 177 static readonly LOCAL_TAB_INDEX: number = 0; 178 179 // Other equipment tab index 180 static readonly OTHER_EQUIPMENT_TAB_INDEX: number = 1; 181 182 //the constant for action of the want 183 static readonly ACTION_DELETE_DATA: string = 'ohos.want.action.deleteDialog'; 184 185 // editor used 186 static readonly UPDATE_MENU: string = 'updateMenu'; 187 static readonly UPDATE_DOODLE_STYLE: string = 'update_doodle_style'; 188 static readonly ADJUST_PARAMS_VALUE_CHANGED: string = 'adjust_params_value_changed'; 189 static readonly ADJUST_PARAMS_ID_CHANGED: string = 'adjust_params_id_changed'; 190 static readonly IS_IMMERSIVE: string = 'is_immersive'; 191 static readonly UPDATE_DOODLE_STROKE_STYLE: string = 'update_doodle_stroke_style'; 192 static readonly PHOTO_EDITOR_MANAGER: string = 'photo_editor_manager'; 193 static readonly PHOTO_EDITOR_EVENT_MANAGER: string = 'photo_editor_event_manager'; 194 static readonly INTI_RULER: string = 'inti_ruler'; 195 static readonly RULER_CHANGED: string = 'inti_ruler'; 196 static readonly LABEL_STYLE_CHANGED: string = 'label_style_changed'; 197 static readonly LABEL_TEXT_STYLE_CHANGED: string = 'label_text_style_changed'; 198 static readonly LABEL_TEXT_COLOR_CHANGED: string = 'label_text_color_changed'; 199 static readonly LABEL_GET_CLIP_RECT: string = 'label_get_clip_rect'; 200 static readonly CROP_RESET_CLICKED: string = 'crop_reset_clicked'; 201 static readonly IS_BIG_TEXT_SHOW: string = 'is_big_text_show'; 202 static readonly RULER_BAR_INTI: string = 'ruler_bar_inti'; 203 static readonly COLOR_SLIDER_CHANGED: string = 'color_slider_changed'; 204 static readonly MOSAIC_STYLE_CHANGED: string = 'mosaic_style_changed'; 205 static readonly LABEL_DELETE: string = 'label_delete'; 206 static readonly UPDATE_LABEL_STYLE: string = 'update_label_style'; 207 static readonly IS_LABEL_ACTIVE: string = 'is_label_active'; 208 static readonly NOT_MAX_INDEX_CLICK_OF_LABEL: string = 'not_max_index_click_of_label'; 209 static readonly IS_LABEL_MODE: string = 'is_label_mode'; 210 static readonly RESET_LABEL_STYLE_INFO: string = 'reset_label_style_info'; 211 static readonly UPDATE_TOUCH_EVENT: string = 'update_touch_event'; 212 static readonly PHOTO_COLLAGE_MANAGER: string = 'photo_collage_manager'; 213 static readonly RETURN_TO_MAIN: string = 'return_to_main'; 214 static readonly FORM_ITEM_NAME: string = 'form_itemName'; 215 static readonly FORM_ITEM_ALBUM_ID: string = 'form_itemAlbumId'; 216 static readonly FORM_ITEM_DISPLAY_NAME: string = 'form_itemDisplayName'; 217 static readonly MAIN_WINDOW: string = 'mainWindow'; 218 static readonly ACTION_URI_FORM_ABILITY: string = 'formAbility'; 219 static readonly ACTION_URI_FORM_ABILITY_NONE: string = 'formAbilityNone'; 220 static readonly PROGRESS_LENGTH_DIFF: number = 88; 221 static readonly ALBUM_NAME_MAX_LENGTH: number = 80; 222 static readonly BACK_FROM_FORM_DETAIL: string = 'back_from_form_detail'; 223 static readonly NEGATIVE_FORTY: string = '-40'; 224 static readonly NEGATIVE_THIRTY: string = '-30'; 225 static readonly NEGATIVE_TWENTY: string = '-20'; 226 static readonly NEGATIVE_TEN: string = '-10'; 227 static readonly ZERO_STR: string = '0'; 228 static readonly POSITIVE_TEN: string = '10'; 229 static readonly POSITIVE_TWENTY: string = '20'; 230 static readonly POSITIVE_THIRTY: string = '30'; 231 static readonly POSITIVE_FORTY: string = '40'; 232 static readonly RULER_CONTEXT_FONT_10PX: string = '10px SimSun, Songti SC'; 233 static readonly RULER_CONTEXT_FONT_20PX: string = '20px SimSun, Songti SC'; 234 static readonly RULER_CONTEXT_FONT_25PX: string = '25px SimSun, Songti SC'; 235 static readonly RULER_CONTEXT_FONT_30PX: string = '30px SimSun, Songti SC'; 236 static readonly RULER_CONTEXT_FONT_35PX: string = '35px SimSun, Songti SC'; 237 static readonly RULER_FILL_STYLE_100: string = '#FFFFFF'; 238 static readonly RULER_FILL_STYLE_90: string = '#E5FFFFFF'; 239 static readonly RULER_FILL_STYLE_40: string = '#66FFFFFF'; 240 static readonly RULER_FILL_STYLE_30: string = '#4dffffff'; 241 static readonly RULER_FILL_STYLE_20: string = '#33ffffff'; 242 static readonly RULER_FILL_STYLE_10: string = '#1affffff'; 243 static readonly RULER_TEXT_ALIGN: string = 'center'; 244 static readonly STATUS_BAR_BACKGROUND_COLOR: string = '#F1F3F5'; 245 static readonly STATUS_BAR_CONTENT_COLOR: string = '#000000'; 246 static readonly TOP_BAR_SIZE: number = 56; 247 static readonly TOOL_BAR_SIZE: number = 72; 248 static readonly BOTTOM_TOOL_BAR_SIZE: number = 196; 249 static readonly FILTER_BOTTOM_TOOL_BAR_SIZE: number = 232; 250 static readonly DEFAULT_WIDTH: number = 360; 251 static readonly RESET_SIZE: number = 20; 252 static readonly RESET_SIZE_HORIZONTAL: number = 48; 253 static readonly TIMEOUT: number = 50; 254 static readonly PADDING_VERTICAL: number = 140; 255 static readonly PADDING_HORIZONTAL: number = 160; 256 static readonly MID_LINE_WIDTH: number = 1.5; 257 static readonly MID_LINE_HEIGHT: number = 18; 258 static readonly RULER_LINE_WIDTH: number = 1; 259 static readonly NEGATIVE_1: number = -1; 260 static readonly NEGATIVE_2: number = -2; 261 static readonly NUMBER_1: number = 1; 262 static readonly NUMBER_2: number = 2; 263 static readonly NUMBER_3: number = 3; 264 static readonly NUMBER_4: number = 4; 265 static readonly NUMBER_5: number = 5; 266 static readonly NUMBER_5_5: number = 5.5; 267 static readonly NUMBER_6: number = 6; 268 static readonly NUMBER_6_5: number = 6.5; 269 static readonly NUMBER_7: number = 7; 270 static readonly NUMBER_7_5: number = 7.5; 271 static readonly NUMBER_8: number = 8; 272 static readonly NUMBER_8_5: number = 8.5; 273 static readonly NUMBER_9: number = 9; 274 static readonly NUMBER_9_5: number = 9.5; 275 static readonly NUMBER_10: number = 10; 276 static readonly NUMBER_10_5: number = 10.5; 277 static readonly NUMBER_11_5: number = 11.5; 278 static readonly NUMBER_15: number = 15; 279 static readonly EDGE_ANGLE: number = 45; 280 static readonly LITTLE_CANVAS_SIZE: number = 60; 281 static readonly NUMBER_40: number = 40; 282 static readonly NUMBER_30: number = 30; 283 static readonly NUMBER_20: number = 20; 284 static readonly NUMBER_0: number = 0; 285 static readonly NUMBER_0_5: number = 0.5; 286 static readonly NUMBER_16: number = 16; 287 static readonly NUMBER_96: number = 96; 288 static readonly NUMBER_48: number = 48; 289 static readonly NUMBER_32: number = 32; 290 291 // Grid Constants 292 static readonly TAB_BAR_WIDTH: number = 200; 293 static readonly PAD_TAB_BAR_WIDTH: number = 96; 294 static readonly GRID_GUTTER: number = 2; 295 static readonly GRID_IMAGE_SIZE: number = 256; 296 static readonly GRID_MAX_SIZE_RATIO: number = 1.2; 297 static readonly GRID_MIN_COUNT: number = 2; 298 static readonly SCROLL_BAR_SIDE_MIN_GAP: number = 12; 299 static readonly SCROLL_MARGIN: number = 24; 300 301 // Column Constants 302 static readonly COLUMN_MARGIN: number = 12; 303 static readonly COLUMN_GUTTER: number = 12; 304 305 // Album Card Constants 306 static readonly CARD_ASPECT_RATIO: number = 1; 307 static readonly ALBUM_SET_NEW_ICON_SIZE: number = 22; 308 static readonly ALBUM_SET_NEW_ICON_MARGIN: number = 8; 309 static readonly ALBUM_SET_MARGIN: number = 12; 310 static readonly ALBUM_SET_GUTTER: number = 12; 311 static readonly ALBUM_SET_COVER_SIZE: number = 150; 312 static readonly RECYCLE_ALBUM_OF_PHONE_HEIGHT: number = 88; 313 314 // System Resource Constants 315 static readonly TEXT_SIZE_SUB_TITLE1: number = 18; // ohos_id_text_size_sub_title1 316 static readonly TEXT_SIZE_BODY2: number = 14; // ohos_id_text_size_body2 317 static readonly TEXT_SIZE_SUB_TITLE2: number = 16; // ohos_id_text_size_sub_title2 318 319 // Empty Page 320 static readonly EMPTY_PAGE_OFFSET_RADIO: number = 0.4; 321 static readonly EMPTY_PAGE_DEFAULT_OFFSET: number = 300; 322 static readonly EMPTY_PAGE_MARGIN: number = 12; 323 static readonly DETAILS_DIALOG_PATH_MAX_LINE: number = 7; 324 static readonly DETAILS_DIALOG_NAME_MAX_LINE: number = 5; 325 static readonly BIG_SCREEN_WIDTH: number = 600; 326 static readonly BIG_EMPTY_ICON_SIZE: number = 160; 327 static readonly SMALL_EMPTY_ICON_SIZE: number = 120; 328 329 // Menu 330 static readonly MENU_DIVIDER_STROKE_WIDTH: number = 0.5; 331 332 // Double click time delay 333 static readonly DOUBLE_CLICK_GAP: number = 300; 334 335 // Empty page picture size 336 static readonly EMPTY_PAGE_PIC_SIZE: number = 120; 337 338 // Button status 339 static readonly BUTTON_STATUS_NORMAL: string = 'NORMAL'; 340 static readonly BUTTON_STATUS_HOVER: string = 'HOVER'; 341 static readonly BUTTON_STATUS_PRESS: string = 'PRESS'; 342 static readonly BUTTON_STATUS_DISABLE: string = 'DISABLE'; 343 static readonly BUTTON_STATUS_FOCUS: string = 'FOCUS'; 344 345 // Video status 346 static readonly VIDEO_STATUS_INITIAL: string = 'initial'; 347 static readonly VIDEO_STATUS_PLAYING: string = 'playing'; 348 static readonly VIDEO_STATUS_PAUSE: string = 'pause'; 349 static readonly VIDEO_STATUS_FINISH: string = 'finish'; 350 static readonly VIDEO_STATUS_ERROR: string = 'error'; 351 352 // Edit rulerBar line length 353 static readonly EDITOR_MIDDLE_TICK_LINE_HEIGHT: number = 8; 354 static readonly EDITOR_SMALL_TICK_LINE_HEIGHT: number = 4; 355 static readonly EDITOR_LARGE_TICK_LINE_HEIGHT: number = 18; 356 357 // Angle 358 static readonly ANGLE_360: number = 360; 359 static readonly ANGLE_270: number = 270; 360 static readonly ANGLE_180: number = 180; 361 static readonly ANGLE_90: number = 90; 362 363 // Button set-gray transparency 364 static readonly BUTTON_INVALID_OPACITY: number = 0.4; 365 366 // Device types 367 static readonly DEFAULT_DEVICE_TYPE: string = 'phone'; 368 static readonly PAD_DEVICE_TYPE: string = 'pad'; 369 static readonly PC_DEVICE_TYPE: string = 'pc'; 370 371 // Device album page minimal column count 372 static readonly PAD_ALBUM_GRID_COLUMN_MIN_COUNT: number = 1; 373 static readonly DEFAULT_ALBUM_GRID_COLUMN_MIN_COUNT: number = 2; 374 375 // Maximum recycle days 376 static readonly RECYCLE_DAYS_MAX: number = 30; 377 static readonly RECYCLE_DAYS_WARN: number = 3; 378 379 // Get want info with key 380 static readonly KEY_WANT_PARAMETERS_CALLER_BUNDLE_NAME: string = 'ohos.aafwk.param.callerBundleName'; 381 382 // Keys of photo detail text 383 static readonly KEY_FOR_AUTO_TEST_TITLE: string = 'DetailTitle'; 384 static readonly KEY_FOR_AUTO_TEST_TIME: string = 'DetailTime'; 385 static readonly KEY_FOR_AUTO_TEST_SIZE: string = 'DetailSize'; 386 static readonly KEY_FOR_AUTO_TEST_RESOLUTION: string = 'DetailResolution'; 387 static readonly KEY_FOR_AUTO_TEST_DURATION: string = 'DetailDuration'; 388 static readonly KEY_FOR_AUTO_TEST_PATH: string = 'DetailPath'; 389 390 // Properties of edit page 391 static readonly PUNCH_HOLE_HEIGHT: number = 30; 392 static readonly ACTION_BUTTON_WIDTH: number = 60; 393 static readonly ACTION_BUTTON_HEIGHT: number = 79.5; 394 static readonly CROP_RULER_WIDTH: number = 78; 395 static readonly CROP_STYLE_BAR: number = 40; 396 // 横屏状态下编辑页各组件的属性 397 static readonly HORIZONTAL_RESET_BUTTON_WIDTH: number = 35; 398 static readonly HORIZONTAL_RESET_BUTTON_HEIGHT: number = 24; 399 static readonly HORIZONTAL_RESET_BUTTON_MARGIN: number = 5; 400 static readonly HORIZONTAL_CROP_STYLE_BAR_HEIGHT: number = 70; 401 static readonly HORIZONTAL_CROP_RULER_WIDTH: number = 70; 402 static readonly HORIZONTAL_RESET_BUTTON_TEXT_SIZE: number = 17.5; 403 static readonly HORIZONTAL_TOOL_BAR_WIDTH: number = 70; 404 static readonly HORIZONTAL_TOOL_BAR_HEIGHT: number = 97.5; 405 static readonly HORIZONTAL_MAIN_MENU_WIDTH: number = 277.5; 406 static readonly HORIZONTAL_CROP_STYLE_BAR_TOP_PADDING: number = 15; 407 static readonly HORIZONTAL_CROP_STYLE_BAR_BOTTOM_PADDING: number = 15; 408 static readonly HORIZONTAL_CROP_STYLE_BAR_LEFT_PADDING: number = 20; 409 static readonly HORIZONTAL_CROP_STYLE_BAR_RIGHT_PADDING: number = 20; 410 static readonly HORIZONTAL_ACTION_BUTTON_WIDTH: number = 30; 411 static readonly HORIZONTAL_ACTION_BUTTON_HEIGHT: number = 50; 412 static readonly HORIZONTAL_ACTION_BUTTON_LEFT_MARGIN: number = 27.5; 413 static readonly HORIZONTAL_ACTION_BUTTON_LEFT_PADDING: number = 25.5; 414 static readonly HORIZONTAL_RULER_COMPONENT_WIDTH: number = 97.5; 415 static readonly HORIZONTAL_CROP_RULER_MARGIN: number = 27; 416 static readonly HORIZONTAL_OUTSIDE_ACTION_BUTTON_CONTAINER_HEIGHT: number = 90; 417 static readonly HORIZONTAL_OUTSIDE_ACTION_BUTTON_CONTAINER_WIDTH: number = 81; 418 // 竖屏状态下编辑页各组件的属性 419 static readonly VERTICAL_RESET_BUTTON_HEIGHT: number = 19; 420 static readonly VERTICAL_RESET_BUTTON_TEXT_SIZE: number = 14; 421 static readonly VERTICAL_RESET_BUTTON_MARGIN: number = 6; 422 static readonly VERTICAL_CROP_STYLE_BAR_HEIGHT: number = 56; 423 static readonly VERTICAL_RULER_COMPONENT_HEIGHT: number = 60; 424 static readonly VERTICAL_TOOL_BAR_WIDTH: number = 104; 425 static readonly VERTICAL_TOOL_BAR_HEIGHT: number = 72; 426 static readonly VERTICAL_MAIN_MENU_BAR_HEIGHT: number = 219; 427 static readonly VERTICAL_CROP_STYLE_BAR_TOP_PADDING: number = 16; 428 static readonly VERTICAL_CROP_STYLE_BAR_BOTTOM_PADDING: number = 16; 429 static readonly VERTICAL_CROP_STYLE_BAR_LEFT_PADDING: number = 24; 430 static readonly VERTICAL_CROP_STYLE_BAR_RIGHT_PADDING: number = 24; 431 static readonly VERTICAL_OUTSIDE_ACTION_BUTTON_CONTAINER_HEIGHT: number = 60; 432 static readonly VERTICAL_OUTSIDE_ACTION_BUTTON_CONTAINER_WIDTH: number = 79.5; 433 434 // Types and minimal screen size of breakpoints 435 static readonly BREAKPOINT_XS: string = 'xs'; // The screen size ranges from 0 to 320.excluding 320. 436 static readonly BREAKPOINT_XS_MIN_SIZE: number = 0; 437 static readonly BREAKPOINT_SM: string = 'sm'; // The screen size ranges from 320 to 520.excluding 520. 438 static readonly BREAKPOINT_SM_MIN_SIZE: number = 320; 439 static readonly BREAKPOINT_MD: string = 'md'; // The screen size ranges from 520 to 840.excluding 840. 440 static readonly BREAKPOINT_MD_MIN_SIZE: number = 520; 441 static readonly BREAKPOINT_LG: string = 'lg'; // The screen size is greater than or equal to 840. 442 static readonly BREAKPOINT_LG_MIN_SIZE: number = 840; 443 static readonly PERCENT_100: string = '100%'; 444 static readonly PERCENT_0: string = '0%'; 445 static readonly DEFAULT_DIVIDER_COLOR: string = 'rgb(207, 195, 195)'; 446 static readonly DEFAULT_DIVIDER_HEIGHT: string = '24vp'; 447 static readonly PHOTOS_STORE_KEY: string = 'PhotosStore'; 448 static readonly PHOTOS_PERMISSION_FLAG: string = 'PhotosPermissionFlag'; 449 static readonly PHOTOS_CNT_FOR_HIDE_SCROLL_BAR: number = 100; 450 451 // First delete flag 452 static readonly IS_FIRST_TIME_DELETE: string = 'isFirstTimeDelete'; 453 454 // Media operation from page 455 static readonly MEDIA_OPERATION_FROM_TIMELINE: string = 'FromTimelinePage'; 456 static readonly MEDIA_OPERATION_FROM_PHOTO_GRID: string = 'FromPhotoGridPage'; 457 static readonly MEDIA_OPERATION_FROM_PHOTO_BROWSER: string = 'FromPhotoBrowser'; 458 static readonly MOUSE_TURN_PAGE_BUTTON_DISAPPEAR_TIMEOUT: number = 2000; 459 460 // AppStorage Key 461 static readonly CONFIRM_TEXT_KEY: string = 'confirmText'; 462 static readonly KEY_OF_PHOTO_GRID_VIEW_ALBUM_ITEM: string = 'photoGridViewAlbumItem'; 463 static readonly KEY_OF_ALBUM_ID: string = 'albumId'; //TODO API10整改完成后删除 464 static readonly KEY_OF_ALBUM_URI: string = 'albumUri'; 465 static readonly KEY_OF_ALBUM_HEIGHT: string = 'albumHeight'; 466 static readonly KEY_OF_ALBUM_WIDTH: string = 'albumWidth'; 467 static readonly KEY_OF_GEOMETRY_TRANSITION_ID_HEIGHT: string = 'geometryTransitionId'; 468 static readonly KEY_OF_PLACE_HOLDER_INDEX: string = 'placeHolderIndex'; 469 static readonly KEY_OF_SELECTED_ALBUM_INDEX: string = 'selectedAlbumIndex'; 470 static readonly KEY_OF_IS_SHOW_PHOTO_GRID_VIEW: string = 'isShowPhotoGridView'; 471 static readonly KEY_OF_PHOTO_COUNT_IN_ALBUM: string = 'photoCount'; 472 static readonly KEY_OF_ALBUM_ACTIONBAR_OPACITY: string = 'albumActionBarOpacity'; 473 static readonly KEY_OF_PHOTO_GRID_ACTIONBAR_OPACITY: string = 'photoGridActionBarOpacity'; 474 static readonly KEY_OF_SIDE_BAR_OPACITY: string = 'sideBarOpacity'; 475 static readonly KEY_OF_IS_FIRST_PHOTO_ITEM: string = 'isFirstPhotoItem'; 476 static readonly KEY_OF_SELECTED_ALBUM_ID: string = 'selectedAlbumId'; //TODO API10整改完成后删除 477 static readonly KEY_OF_SELECTED_ALBUM_URI: string = 'selectedAlbumUri'; 478 static readonly KEY_OF_PHOTO_GRID_VIEW_OPACITY: string = 'photoGridViewOpacity'; 479 static readonly KEY_OF_ALBUM_OPACITY: string = 'albumOpacity'; 480 static readonly KEY_OF_ALBUM_OTHER_SCALE: string = 'albumOtherScale'; 481 static readonly KEY_OF_PHOTO_GRID_VIEW_SCALE: string = 'photoGridViewScale'; 482 static readonly KEY_OF_IS_SHOW_VIDEO_MASK: string = 'isShowVideoMask'; 483 static readonly KEY_OF_SIDE_BAR_BOUNDARY_LINE_OPACITY: string = 'sideBarBoundaryLineOpacity'; 484 static readonly KEY_OF_IS_THIRD_EDITABLE: string = 'isThirdEditAble'; 485 486 // Properties of image Properties component 487 static readonly PHOTO_TITLE_LINE_HEIGHT: number = 19; 488 static readonly PHOTO_TITLE_MAX_WIDTH: number = 296; 489 static readonly EDIT_FONT_WIDTH: number = 24; 490 static readonly EDIT_FONT_HEIGHT: number = 16; 491 static readonly EDIT_FONT_SIZE: number = 12; 492 static readonly PHOTO_DATE_FONT_HEIGHT: number = 16; 493 static readonly PHOTO_DATE_TOP_MARGIN: number = 2; 494 static readonly COLUMN_RADIUS: number = 16; 495 static readonly COLUMN_PADDING: number = 12; 496 static readonly HISTOGRAM_HEIGHT: number = 96; 497 static readonly PHOTO_PROPERTIES_ROW_GAP: number = 16; 498 499 static readonly PHOTO_BAR_MULTIPLES_1_5: number = 1.5; 500 501 // Histogram 502 static readonly HISTOGRAM_INSTANCE_KEY: string = 'HistogramInstance'; 503 static readonly HISTOGRAM_READY_STATUS_KEY: string = 'HistogramReadyStatus'; 504 static readonly HISTOGRAM_ARRAY_BUFFER_KEY: string = 'HistogramArrayBuffer'; 505 static readonly WORKER_INSTANCE_NAME_RED: string = 'WorkerInstanceRed'; 506 static readonly WORKER_INSTANCE_NAME_GREEN: string = 'WorkerInstanceGreen'; 507 static readonly WORKER_INSTANCE_NAME_BLUE: string = 'WorkerInstanceBlue'; 508 static readonly PIXEL_NUMBER: number = 256; 509 static readonly HISTOGRAM_CONSTANT_256: number = 256; 510 static readonly HISTOGRAM_CONSTANT_512: number = 512; 511 static readonly HISTOGRAM_WORKER_NUMBER: number = 3; 512 static readonly RGB_CHANNELS: number = 3; 513 static readonly RGBA_CHANNELS: number = 4; 514 static readonly HISTOGRAM_DIVIDE_LINE_NUM: number = 2; 515 static readonly HISTOGRAM_DIVIDER_REGION_NUM: number = 3; 516 static readonly HISTOGRAM_WIDTH: number = 312; 517 static readonly HISTOGRAM_RED_FILL_COLOR: string = '#FF0000'; 518 static readonly HISTOGRAM_GREEN_FILL_COLOR: string = '#00FF00'; 519 static readonly HISTOGRAM_BLUE_FILL_COLOR: string = '#0000FF'; 520 static readonly HISTOGRAM_STROKE_WIDTH: number = 0.8; 521 static readonly HISTOGRAM_INTERNAL_STROKE_COLOR: string = '#1A000000'; 522 static readonly HISTOGRAM_REGION_STROKE_COLOR: string = '#ffffff'; 523 static readonly HISTOGRAM_LINE_WIDTH: number = 0.5; 524 static readonly WORKER_SMOOTH_PARAM: number = 4; 525 526 static readonly IS_ON_SWIPER_ANIMATION: string = 'isOnSwiperAnimation'; 527 static readonly NAME_PATTERN: RegExp = /[\\.\\\\/:*?"'`<>|\[\]{}]/; 528 529 // fileAsset path data 530 static readonly KEY_FILE_DATA: string = 'data'; 531 static readonly PHOTO_PICKER_SESSION_KEY: string = 'photopicker_PickerUIExtensionAbility_session'; 532 static readonly PHOTO_PICKER_PARAMS_KEY: string = 'photopicker_PickerUIExtensionAbility_params'; 533 static readonly PHOTO_PICKER_EXTENSION_WINDOW: string = 'photopicker_PickerUIExtensionAbility_extension_window'; 534 static readonly UPDATE_SELECTED: string = 'update_selected'; 535}