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