1/* 2 * Copyright (c) 2024 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 16const NAVIGATION_BUILDER_REGISTER: string = 'NavigationBuilderRegister'; 17 18const MONITOR: string = 'Monitor'; 19const COMPUTED: string = 'Computed'; 20const REQUIRE: string = 'Require'; 21const BUILDER_PARAM: string = 'BuilderParam'; 22const DECORATOR_BUILDER_PARAM: string = '@BuilderParam'; 23const MONITOR_DECORATOR: string = '@Monitor'; 24const COMPUTED_DECORATOR: string = '@Computed'; 25const EVENT_DECORATOR: string = '@Event'; 26 27const COMPONENT_MEMBER_DECORATOR_V1: string[] = [ 28 '@State', '@Prop', '@Link', '@Provide', '@Consume', '@Watch', '@StorageLink', '@StorageProp', 29 '@LocalStorageLink', '@LocalStorageProp', '@ObjectLink' 30]; 31 32const COMPONENT_MEMBER_DECORATOR_V2: string[] = [ 33 '@Local', '@Param', '@Once', '@Event', '@Provider', '@Consumer' 34]; 35const STRUCT_CLASS_MEMBER_DECORATOR_V2: string[] = [ 36 '@Monitor', '@Computed' 37]; 38const DECORATOR_V2: string[] = [ 39 ...COMPONENT_MEMBER_DECORATOR_V2, ...STRUCT_CLASS_MEMBER_DECORATOR_V2 40]; 41 42const STRUCT_PARENT: string = 'ViewV2'; 43const INIT_PARAM: string = 'initParam'; 44const UPDATE_PARAM: string = 'updateParam'; 45const RESET_PARAM: string = 'resetParam'; 46const UPDATE_STATE_VARS: string = 'updateStateVars'; 47const RESET_STATE_VARS_METHOD: string = 'resetStateVarsOnReuse'; 48const RESET_CONSUMER: string = 'resetConsumer'; 49const RESET_COMPUTED: string = 'resetComputed'; 50const RESET_MONITORS_ON_REUSE: string = 'resetMonitorsOnReuse'; 51const OBJECT_TYPE: string = 'Object'; 52const REUSE_OR_CREATE_METHOD: string = 'reuseOrCreateNewComponent'; 53const COMPONENT_CLASS: string = 'componentClass'; 54const GET_PARAMS: string = 'getParams'; 55const GET_REUSE_ID: string = 'getReuseId'; 56const EXTRA_INFO: string = 'extraInfo'; 57 58const BYTE_CODE_HAR: string = 'byteCodeHar'; 59const CLOSED_SOURCE_HAR: string = 'closedSourceHar'; 60const SHARED_HSP: string = 'sharedHsp'; 61const MODULE_TYPE: string = 'moduleType'; 62const HAR_DEFAULT_PAGE_PATH: string = '__harDefaultPagePath__'; 63const HAR_DEFAULT_INTEGRATED_HSP_TYPE: string = '__harDefaultIntegratedHspType__'; 64const FOLLOW_WITH_HAP: string = 'followWithHap'; 65 66export default { 67 NAVIGATION_BUILDER_REGISTER, 68 MONITOR, 69 COMPUTED, 70 STRUCT_PARENT, 71 COMPONENT_MEMBER_DECORATOR_V1, 72 COMPONENT_MEMBER_DECORATOR_V2, 73 INIT_PARAM, 74 UPDATE_PARAM, 75 RESET_PARAM, 76 UPDATE_STATE_VARS, 77 REQUIRE, 78 MONITOR_DECORATOR, 79 COMPUTED_DECORATOR, 80 DECORATOR_V2, 81 BUILDER_PARAM, 82 DECORATOR_BUILDER_PARAM, 83 BYTE_CODE_HAR, 84 CLOSED_SOURCE_HAR, 85 SHARED_HSP, 86 MODULE_TYPE, 87 HAR_DEFAULT_PAGE_PATH, 88 HAR_DEFAULT_INTEGRATED_HSP_TYPE, 89 FOLLOW_WITH_HAP, 90 EVENT_DECORATOR, 91 RESET_STATE_VARS_METHOD, 92 RESET_CONSUMER, 93 RESET_COMPUTED, 94 RESET_MONITORS_ON_REUSE, 95 OBJECT_TYPE, 96 REUSE_OR_CREATE_METHOD, 97 COMPONENT_CLASS, 98 GET_PARAMS, 99 GET_REUSE_ID, 100 EXTRA_INFO 101}; 102