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