1/* 2 * Copyright (c) 2021 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 path from 'path'; 17 18export const NATIVE_MODULE: Set<string> = new Set( 19 ['system.app', 'ohos.app', 'system.router', 'system.curves', 'ohos.curves', 'system.matrix4', 'ohos.matrix4']); 20export const VALIDATE_MODULE: string[] = ['application', 'util', 'screen', 'mediaquery']; 21export const SYSTEM_PLUGIN: string = 'system'; 22export const OHOS_PLUGIN: string = 'ohos'; 23// 'arkui-x' represents cross platform related APIs, processed as 'ohos' 24export const ARKUI_X_PLUGIN: string = 'arkui-x'; 25 26export const COMPONENT_DECORATOR_ENTRY: string = '@Entry'; 27export const COMPONENT_DECORATOR_PREVIEW: string = '@Preview'; 28export const COMPONENT_DECORATOR_COMPONENT: string = '@Component'; 29export const COMPONENT_DECORATOR_CUSTOM_DIALOG: string = '@CustomDialog'; 30export const COMPONENT_DECORATOR_REUSEABLE: string = '@Reusable'; 31export const DECORATOR_REUSEABLE: string = 'Reusable'; 32 33export const COMPONENT_RECYCLE: string = '__Recycle__'; 34export const RECYCLE_REUSE_ID: string = 'reuseId'; 35 36export const COMPONENT_NON_DECORATOR: string = 'regular'; 37export const COMPONENT_STATE_DECORATOR: string = '@State'; 38export const COMPONENT_PROP_DECORATOR: string = '@Prop'; 39export const COMPONENT_LINK_DECORATOR: string = '@Link'; 40export const COMPONENT_STORAGE_PROP_DECORATOR: string = '@StorageProp'; 41export const COMPONENT_STORAGE_LINK_DECORATOR: string = '@StorageLink'; 42export const COMPONENT_PROVIDE_DECORATOR: string = '@Provide'; 43export const COMPONENT_CONSUME_DECORATOR: string = '@Consume'; 44export const COMPONENT_OBJECT_LINK_DECORATOR: string = '@ObjectLink'; 45export const COMPONENT_WATCH_DECORATOR: string = '@Watch'; 46export const COMPONENT_BUILDERPARAM_DECORATOR: string = '@BuilderParam'; 47export const COMPONENT_LOCAL_STORAGE_LINK_DECORATOR: string = '@LocalStorageLink'; 48export const COMPONENT_LOCAL_STORAGE_PROP_DECORATOR: string = '@LocalStorageProp'; 49export const COMPONENT_CUSTOM_DECORATOR: string = 'COMPONENT_CUSTOM_DECORATOR'; 50export const COMPONENT_REQUIRE_DECORATOR: string = '@Require'; 51 52export const CLASS_TRACK_DECORATOR: string = 'Track'; 53 54export const COMPONENT_DECORATORS_PARAMS: Set<string> = new Set([COMPONENT_CONSUME_DECORATOR, 55 COMPONENT_STORAGE_PROP_DECORATOR, COMPONENT_STORAGE_LINK_DECORATOR, COMPONENT_PROVIDE_DECORATOR, 56 COMPONENT_WATCH_DECORATOR]); 57export const INNER_COMPONENT_DECORATORS: Set<string> = new Set([COMPONENT_DECORATOR_ENTRY, 58 COMPONENT_DECORATOR_PREVIEW, COMPONENT_DECORATOR_COMPONENT, COMPONENT_DECORATOR_CUSTOM_DIALOG, 59 COMPONENT_DECORATOR_REUSEABLE]); 60export const INNER_COMPONENT_MEMBER_DECORATORS: Set<string> = new Set([COMPONENT_STATE_DECORATOR, 61 COMPONENT_PROP_DECORATOR, COMPONENT_LINK_DECORATOR, COMPONENT_STORAGE_PROP_DECORATOR, 62 COMPONENT_STORAGE_LINK_DECORATOR, COMPONENT_PROVIDE_DECORATOR, COMPONENT_CONSUME_DECORATOR, 63 COMPONENT_OBJECT_LINK_DECORATOR, COMPONENT_WATCH_DECORATOR, COMPONENT_BUILDERPARAM_DECORATOR, 64 COMPONENT_LOCAL_STORAGE_LINK_DECORATOR, COMPONENT_LOCAL_STORAGE_PROP_DECORATOR, 65 COMPONENT_REQUIRE_DECORATOR]); 66export const STRUCT_DECORATORS: Set<string> = new Set([...INNER_COMPONENT_DECORATORS, 67 ...INNER_COMPONENT_MEMBER_DECORATORS]); 68 69export const COMPONENT_OBSERVED_DECORATOR: string = '@Observed'; 70export const OBSERVED: string = 'Observed'; 71export const COMPONENT_BUILDER_DECORATOR: string = '@Builder'; 72export const COMPONENT_EXTEND_DECORATOR: string = '@Extend'; 73export const COMPONENT_STYLES_DECORATOR: string = '@Styles'; 74export const COMPONENT_ANIMATABLE_EXTEND_DECORATOR: string = '@AnimatableExtend'; 75export const COMPONENT_CONCURRENT_DECORATOR: string = '@Concurrent'; 76export const COMPONENT_SENDABLE_DECORATOR: string = '@Sendable'; 77export const CHECK_COMPONENT_EXTEND_DECORATOR: string = 'Extend'; 78export const STRUCT_CONTEXT_METHOD_DECORATORS: Set<string> = new Set([COMPONENT_BUILDER_DECORATOR, 79 COMPONENT_STYLES_DECORATOR]); 80export const CHECK_COMPONENT_ANIMATABLE_EXTEND_DECORATOR: string = 'AnimatableExtend'; 81export const EXTEND_DECORATORS: string[] = [ 82 COMPONENT_EXTEND_DECORATOR, 83 COMPONENT_ANIMATABLE_EXTEND_DECORATOR 84]; 85export const CHECK_EXTEND_DECORATORS: string[] = [ 86 CHECK_COMPONENT_EXTEND_DECORATOR, 87 CHECK_COMPONENT_ANIMATABLE_EXTEND_DECORATOR 88]; 89 90export const CREATE_ANIMATABLE_PROPERTY: string = 'createAnimatableProperty'; 91export const UPDATE_ANIMATABLE_PROPERTY: string = 'updateAnimatableProperty'; 92export const GET_AND_PUSH_FRAME_NODE: string = 'GetAndPushFrameNode'; 93export const FINISH_UPDATE_FUNC: string = 'finishUpdateFunc'; 94 95export const OBSERVED_PROPERTY_SIMPLE: string = 'ObservedPropertySimple'; 96export const OBSERVED_PROPERTY_OBJECT: string = 'ObservedPropertyObject'; 97export const SYNCHED_PROPERTY_SIMPLE_ONE_WAY: string = 'SynchedPropertySimpleOneWay'; 98export const SYNCHED_PROPERTY_SIMPLE_TWO_WAY: string = 'SynchedPropertySimpleTwoWay'; 99export const SYNCHED_PROPERTY_OBJECT_TWO_WAY: string = 'SynchedPropertyObjectTwoWay'; 100export const SYNCHED_PROPERTY_NESED_OBJECT: string = 'SynchedPropertyNesedObject'; 101export const DECORATOR_TYPE_ANY: string = 'any'; 102 103export const INITIALIZE_CONSUME_FUNCTION: string = 'initializeConsume'; 104export const ADD_PROVIDED_VAR: string = 'addProvidedVar'; 105 106export const APP_STORAGE: string = 'AppStorage'; 107export const APP_STORAGE_SET_AND_PROP: string = 'SetAndProp'; 108export const APP_STORAGE_SET_AND_LINK: string = 'SetAndLink'; 109 110export const PAGE_ENTRY_FUNCTION_NAME: string = 'loadDocument'; 111export const STORE_PREVIEW_COMPONENTS: string = 'storePreviewComponents'; 112export const PREVIEW_COMPONENT_FUNCTION_NAME: string = 'previewComponent'; 113export const GET_PREVIEW_FLAG_FUNCTION_NAME: string = 'getPreviewComponentFlag'; 114 115export const COMPONENT_DECORATOR_NAME_COMPONENT: string = 'Component'; 116export const XCOMPONENT_SINGLE_QUOTATION: string = `'component'`; 117export const XCOMPONENT_DOUBLE_QUOTATION: string = `"component"`; 118export const XCOMPONENTTYPE: string = 'XComponentType'; 119export const XCOMPONENTTYPE_CONTAINER: string = 'COMPONENT'; 120export const COMPONENT_DECORATOR_NAME_CUSTOMDIALOG: string = 'CustomDialog'; 121export const CUSTOM_DECORATOR_NAME: Set<string> = new Set([ 122 COMPONENT_DECORATOR_NAME_COMPONENT, COMPONENT_DECORATOR_NAME_CUSTOMDIALOG 123]); 124 125export const EXTNAME_ETS: string = '.ets'; 126export const NODE_MODULES: string = 'node_modules'; 127export const PACKAGES: string = 'pkg_modules'; 128export const INDEX_ETS: string = 'index.ets'; 129export const INDEX_TS: string = 'index.ts'; 130export const PACKAGE_JSON: string = 'package.json'; 131export const CUSTOM_COMPONENT_DEFAULT: string = 'default'; 132export const TS_WATCH_END_MSG: string = 'TS Watch End'; 133 134export const BASE_COMPONENT_NAME: string = 'View'; 135export const STRUCT: string = 'struct'; 136export const CLASS: string = 'class'; 137export const COMPONENT_BUILD_FUNCTION: string = 'build'; 138export const COMPONENT_RENDER_FUNCTION: string = 'render'; 139export const COMPONENT_TRANSITION_FUNCTION: string = 'pageTransition'; 140export const COMPONENT_TRANSITION_NAME: string = 'PageTransition'; 141export const CUSTOM_COMPONENT: string = 'CustomComponent'; 142export const GLOBAL_THIS_REQUIRE_NATIVE_MODULE: string = 'globalThis.requireNativeModule'; 143export const GLOBAL_THIS_REQUIRE_NAPI: string = 'globalThis.requireNapi'; 144 145export const COMPONENT_BUTTON: string = 'Button'; 146export const COMPONENT_FOREACH: string = 'ForEach'; 147export const COMPONENT_LAZYFOREACH: string = 'LazyForEach'; 148export const IS_RENDERING_IN_PROGRESS: string = 'isRenderingInProgress'; 149export const FOREACH_OBSERVED_OBJECT: string = 'ObservedObject'; 150export const FOREACH_GET_RAW_OBJECT: string = 'GetRawObject'; 151export const COMPONENT_IF: string = 'If'; 152export const COMPONENT_IF_BRANCH_ID_FUNCTION: string = 'branchId'; 153export const COMPONENT_IF_UNDEFINED: string = 'undefined'; 154export const GLOBAL_CONTEXT: string = 'Context'; 155export const ATTRIBUTE_ANIMATION: string = 'animation'; 156export const ATTRIBUTE_ANIMATETO_SET: Set<string> = new Set(['animateTo', 'animateToImmediately']); 157export const ATTRIBUTE_STATESTYLES: string = 'stateStyles'; 158export const ATTRIBUTE_ID: string = 'id'; 159export const ATTRIBUTE_ATTRIBUTE_MODIFIER: string = 'attributeModifier'; 160export const TRUE: string = 'true'; 161export const FALSE: string = 'false'; 162export const NULL: string = 'null'; 163export const FOREACH_LAZYFOREACH: Set<string> = new Set([ 164 COMPONENT_FOREACH, COMPONENT_LAZYFOREACH 165]); 166 167export const COMPONENT_CONSTRUCTOR_ID: string = 'compilerAssignedUniqueChildId'; 168export const COMPONENT_CONSTRUCTOR_PARENT: string = 'parent'; 169export const COMPONENT_CONSTRUCTOR_PARAMS: string = 'params'; 170export const COMPONENT_PARAMS_FUNCTION: string = 'paramsGenerator_'; 171export const COMPONENT_PARAMS_LAMBDA_FUNCTION: string = 'paramsLambda'; 172export const COMPONENT_CONSTRUCTOR_UNDEFINED: string = 'undefined'; 173export const COMPONENT_CONSTRUCTOR_LOCALSTORAGE: string = 'localStorage'; 174export const COMPONENT_ABOUTTOREUSEINTERNAL_FUNCTION: string = 'aboutToReuseInternal'; 175export const COMPONENT_SET_AND_LINK: string = 'setAndLink'; 176export const COMPONENT_SET_AND_PROP: string = 'setAndProp'; 177 178export const BUILD_ON: string = 'on'; 179export const BUILD_OFF: string = 'off'; 180 181export const START: string = 'start'; 182export const END: string = 'end'; 183 184export const COMPONENT_CREATE_FUNCTION: string = 'create'; 185export const COMPONENT_CREATE_LABEL_FUNCTION: string = 'createWithLabel'; 186export const COMPONENT_CREATE_CHILD_FUNCTION: string = 'createWithChild'; 187export const COMPONENT_POP_FUNCTION: string = 'pop'; 188export const COMPONENT_DEBUGLINE_FUNCTION: string = 'debugLine'; 189export const COMPONENT_COMMON: string = '__Common__'; 190 191export const OBSERVE_RECYCLE_COMPONENT_CREATION: string = 'observeRecycleComponentCreation'; 192export const COMPONENT_CREATE_RECYCLE: string = 'createRecycle'; 193export const RECYCLE_NODE: string = 'recycleNode'; 194export const ABOUT_TO_REUSE: string = 'aboutToReuse'; 195export const COMPONENT_UPDATE_ELMT_ID: string = 'updateElmtId'; 196export const UPDATE_RECYCLE_ELMT_ID: string = 'updateRecycleElmtId'; 197export const OLD_ELMT_ID: string = 'oldElmtId'; 198export const NEW_ELMT_ID: string = 'newElmtId'; 199 200export const COMPONENT_CONSTRUCTOR_UPDATE_PARAMS: string = 'updateWithValueParams'; 201export const COMPONENT_CONSTRUCTOR_DELETE_PARAMS: string = 'aboutToBeDeleted'; 202 203export const CREATE_GET_METHOD: string = 'get'; 204export const CREATE_SET_METHOD: string = 'set'; 205export const CREATE_NEWVALUE_IDENTIFIER: string = 'newValue'; 206export const CREATE_CONSTRUCTOR_PARAMS: string = 'params'; 207export const CREATE_CONSTRUCTOR_SUBSCRIBER_MANAGER: string = 'SubscriberManager'; 208export const CREATE_CONSTRUCTOR_GET_FUNCTION: string = 'Get'; 209export const CREATE_CONSTRUCTOR_DELETE_FUNCTION: string = 'delete'; 210export const ABOUT_TO_BE_DELETE_FUNCTION_ID: string = 'id'; 211export const COMPONENT_WATCH_FUNCTION: string = 'declareWatch'; 212 213export const CREATE_STATE_METHOD: string = 'createState'; 214export const CREATE_PROP_METHOD: string = 'createProp'; 215export const CREATE_LINK_METHOD: string = 'createLink'; 216export const CREATE_OBSERVABLE_OBJECT_METHOD: string = 'createObservableObject'; 217 218export const CUSTOM_COMPONENT_EARLIER_CREATE_CHILD: string = 'earlierCreatedChild_'; 219export const CUSTOM_COMPONENT_FUNCTION_FIND_CHILD_BY_ID: string = 'findChildById'; 220export const CUSTOM_COMPONENT_NEEDS_UPDATE_FUNCTION: string = 'needsUpdate'; 221export const CUSTOM_COMPONENT_MARK_STATIC_FUNCTION: string = 'markStatic'; 222export const CUSTOM_COMPONENT_EXTRAINFO:string = 'extraInfo'; 223 224export const COMPONENT_GESTURE: string = 'Gesture'; 225export const COMPONENT_GESTURE_GROUP: string = 'GestureGroup'; 226export const GESTURE_ATTRIBUTE: string = 'gesture'; 227export const PARALLEL_GESTURE_ATTRIBUTE: string = 'parallelGesture'; 228export const PRIORITY_GESTURE_ATTRIBUTE: string = 'priorityGesture'; 229export const GESTURE_ENUM_KEY: string = 'GesturePriority'; 230export const GESTURE_ENUM_VALUE_HIGH: string = 'High'; 231export const GESTURE_ENUM_VALUE_LOW: string = 'Low'; 232export const GESTURE_ENUM_VALUE_PARALLEL: string = 'Parallel'; 233 234export const RESOURCE: string = '$r'; 235export const RESOURCE_RAWFILE: string = '$rawfile'; 236export const RESOURCE_NAME_ID: string = 'id'; 237export const RESOURCE_NAME_TYPE: string = 'type'; 238export const RESOURCE_NAME_PARAMS: string = 'params'; 239export const RESOURCE_NAME_BUNDLE: string = 'bundleName'; 240export const RESOURCE_NAME_MODULE: string = 'moduleName'; 241export const RESOURCE_TYPE = { 242 color: 10001, 243 float: 10002, 244 string: 10003, 245 plural: 10004, 246 boolean: 10005, 247 intarray: 10006, 248 integer: 10007, 249 pattern: 10008, 250 strarray: 10009, 251 media: 20000, 252 rawfile: 30000, 253 symbol: 40000 254}; 255 256export const WORKERS_DIR: string = 'workers'; 257export const WORKER_OBJECT: string = 'Worker'; 258 259export const TEST_RUNNER_DIR_SET: Set<string> = new Set(['TestRunner', 'testrunner']); 260 261export const SET_CONTROLLER_METHOD: string = 'setController'; 262export const SET_CONTROLLER_CTR: string = 'ctr'; 263export const SET_CONTROLLER_CTR_TYPE: string = 'CustomDialogController'; 264export const JS_DIALOG: string = 'jsDialog'; 265export const CUSTOM_DIALOG_CONTROLLER_BUILDER: string = 'builder'; 266 267export const BUILDER_ATTR_NAME: string = 'builder'; 268export const BUILDER_ATTR_BIND: string = 'bind'; 269 270export const GEOMETRY_VIEW: string = 'GeometryView'; 271 272export const MODULE_SHARE_PATH: string = 'src' + path.sep + 'main' + path.sep + 'ets' + path.sep + 'share'; 273export const BUILD_SHARE_PATH: string = '../share'; 274export const MODULE_ETS_PATH: string = 'src' + path.sep + 'main' + path.sep + 'ets'; 275export const MODULE_VISUAL_PATH: string = 'src' + path.sep + 'main' + path.sep + 'supervisual'; 276 277export const THIS: string = 'this'; 278export const STYLES: string = 'Styles'; 279export const VISUAL_STATE: string = 'visualState'; 280export const VIEW_STACK_PROCESSOR: string = 'ViewStackProcessor'; 281 282export const BIND_POPUP: string = 'bindPopup'; 283export const BIND_POPUP_SET: Set<string> = new Set(['bindPopup']); 284export const BIND_DRAG_SET: Set<string> = new Set(['onDragStart', 'onItemDragStart']); 285export const ALL_COMPONENTS: string = 'AllComponents'; 286export const BIND_OBJECT_PROPERTY: Map<string, Set<string>> = new Map([ 287 ['Navigation', new Set(['title'])], 288 ['NavDestination', new Set(['title'])], 289 ['ListItem', new Set(['swipeAction'])], 290 ['MenuItem', new Set([COMPONENT_CREATE_FUNCTION])], 291 ['MenuItemGroup', new Set([COMPONENT_CREATE_FUNCTION])], 292 ['Refresh', new Set([COMPONENT_CREATE_FUNCTION])], 293 ['WaterFlow', new Set([COMPONENT_CREATE_FUNCTION])], 294 [ALL_COMPONENTS, new Set(['bindContextMenu', 'bindSheet', 'dragPreview'])] 295]); 296 297export const CHECKED: string = 'checked'; 298export const RADIO: string = 'Radio'; 299export const $$_VALUE: string = 'value'; 300export const $$_CHANGE_EVENT: string = 'changeEvent'; 301export const TEXT_TIMER: string = 'TextTimer'; 302export const REFRESH: string = 'Refresh'; 303export const REFRESHING: string = 'refreshing'; 304export const FORMAT: string = 'format'; 305export const IS_COUNT_DOWN: string = 'isCountDown'; 306export const COUNT: string = 'count'; 307export const $$_THIS: string = '$$this'; 308export const $$_NEW_VALUE: string = 'newValue'; 309export const $$: string = '$$'; 310export const $$_VISIBILITY: string = 'visibility'; 311export const BIND_CONTENT_COVER: string = 'bindContentCover'; 312export const BIND_SHEET: string = 'bindSheet'; 313export const DATE_PICKER: string = 'DatePicker'; 314export const TIME_PICKER: string = 'TimePicker'; 315export const RATING: string = 'Rating'; 316export const SEAECH: string = 'Search'; 317export const CALENDAR: string = 'Calendar'; 318export const MODE: string = 'mode'; 319export const SHOW_SIDE_BAR: string = 'showSideBar'; 320export const CHECK_BOX: string = 'Checkbox'; 321export const SELECT_LOW: string = 'select'; 322export const CHECKBOX_GROUP: string = 'CheckboxGroup'; 323export const SELECT_ALL: string = 'selectAll'; 324export const SELECTED: string = 'selected'; 325export const MENU_ITEM: string = 'MenuItem'; 326export const PANEL: string = 'Panel'; 327export const RATING_LOW: string = 'rating'; 328export const VALUE: string = 'value'; 329export const SIDE_BAR_CONTAINER: string = 'SideBarContainer'; 330export const SLIDER: string = 'Slider'; 331export const STEPPER: string = 'Stepper'; 332export const INDEX: string = 'index'; 333export const SWIPER: string = 'Swiper'; 334export const TABS: string = 'Tabs'; 335export const TEXT_AREA: string = 'TextArea'; 336export const TEXT: string = 'text'; 337export const SELECT: string = 'Select'; 338export const TEXT_INPUT: string = 'TextInput'; 339export const TEXT_PICKER: string = 'TextPicker'; 340export const TOGGLE: string = 'Toggle'; 341export const ALPHABET_INDEXER: string = 'AlphabetIndexer'; 342export const IS_ON: string = 'isOn'; 343export const DATE: string = 'date'; 344export const GRID_ITEM: string = 'GridItem'; 345export const LIST_ITEM: string = 'ListItem'; 346export const UPDATE_FUNC_BY_ELMT_ID: string = 'updateFuncByElmtId'; 347 348export const $$_BLOCK_INTERFACE: Set<string> = new Set([ 349 REFRESH, DATE_PICKER, TIME_PICKER, RATING, SEAECH, CALENDAR, STEPPER, TABS, MENU_ITEM, 350 TIME_PICKER, GRID_ITEM, LIST_ITEM]); 351export const STYLE_ADD_DOUBLE_DOLLAR: Set<string> = new Set([ 352 BIND_POPUP, $$_VISIBILITY, BIND_CONTENT_COVER, BIND_SHEET]); 353export const PROPERTIES_ADD_DOUBLE_DOLLAR: Map<string, Set<string>> = new Map([ 354 [RADIO, new Set([CHECKED])], 355 [TEXT_TIMER, new Set([FORMAT, COUNT, IS_COUNT_DOWN])], 356 [REFRESH, new Set([REFRESHING])], 357 [CHECK_BOX, new Set([SELECT_LOW])], 358 [CHECKBOX_GROUP, new Set([SELECT_ALL])], 359 [DATE_PICKER, new Set([SELECTED])], 360 [TIME_PICKER, new Set([SELECTED])], 361 [MENU_ITEM, new Set([SELECTED])], 362 [PANEL, new Set([MODE])], 363 [RATING, new Set([RATING_LOW])], 364 [SEAECH, new Set([VALUE])], 365 [SIDE_BAR_CONTAINER, new Set([SHOW_SIDE_BAR])], 366 [SLIDER, new Set([VALUE])], 367 [STEPPER, new Set([INDEX])], 368 [SWIPER, new Set([INDEX])], 369 [TABS, new Set([INDEX])], 370 [TEXT_AREA, new Set([TEXT])], 371 [TEXT_INPUT, new Set([TEXT])], 372 [TEXT_PICKER, new Set([VALUE, SELECTED])], 373 [TOGGLE, new Set([IS_ON])], 374 [ALPHABET_INDEXER, new Set([SELECTED])], 375 [SELECT, new Set([SELECTED, VALUE])], 376 [CALENDAR, new Set([DATE])], 377 [GRID_ITEM, new Set([SELECTED])], 378 [LIST_ITEM, new Set([SELECTED])] 379]); 380 381export const CREATE_BIND_COMPONENT: Set<string> = new Set(['ListItemGroup', REFRESH]); 382export const HEADER: string = 'header'; 383export const FOOTER: string = 'footer'; 384 385export const INTERFACE_NAME_SUFFIX:string = '_Params'; 386export const OBSERVED_PROPERTY_ABSTRACT:string = 'ObservedPropertyAbstract'; 387 388export const SUPERVISUAL: string = './supervisual'; 389export const SUPERVISUAL_SOURCEMAP_EXT: string = '.visual.js.map'; 390 391export const INSTANCE: string = 'Instance'; 392 393export const COMPONENT_TOGGLE: string = 'Toggle'; 394export const TTOGGLE_CHECKBOX: string = 'Checkbox'; 395export const TOGGLE_SWITCH: string = 'Switch'; 396 397export const FILESINFO_TXT: string = 'filesInfo.txt'; 398export const NPMENTRIES_TXT: string = 'npmEntries.txt'; 399export const MODULES_CACHE: string = 'modules.cache'; 400export const MODULES_ABC: string = 'modules.abc'; 401export const MODULELIST_JSON: string = 'moduleList.json'; 402export const PREBUILDINFO_JSON: string = 'preBuildInfo.json'; 403export const SOURCEMAPS_JSON: string = 'sourceMaps.json'; 404export const SOURCEMAPS: string = 'sourceMaps.map'; 405export const PROTO_FILESINFO_TXT: string = 'protoFilesInfo.txt'; 406export const AOT_FULL: string = 'full'; 407export const AOT_TYPE: string = 'type'; 408export const AOT_PARTIAL: string = 'partial'; 409export const AOT_PROFILE_SUFFIX: string = '.ap'; 410 411export const ESMODULE: string = 'esmodule'; 412export const JSBUNDLE: string = 'jsbundle'; 413export const ARK: string = 'ark'; 414export const TEMPORARY: string = 'temporary'; 415export const MAIN: string = 'main'; 416export const AUXILIARY: string = 'auxiliary'; 417export const ZERO: string = '0'; 418export const ONE: string = '1'; 419export const EXTNAME_JS: string = '.js'; 420export const EXTNAME_TS: string = '.ts'; 421export const EXTNAME_JS_MAP: string = '.js.map'; 422export const EXTNAME_TS_MAP: string = '.ts.map'; 423export const EXTNAME_MJS: string = '.mjs'; 424export const EXTNAME_CJS: string = '.cjs'; 425export const EXTNAME_D_TS: string = '.d.ts'; 426export const EXTNAME_D_ETS: string = '.d.ets'; 427export const EXTNAME_JSON: string = '.json'; 428export const EXTNAME_ABC: string = '.abc'; 429export const EXTNAME_PROTO_BIN: string = '.protoBin'; 430export const PATCH_SYMBOL_TABLE: string = 'symbol.txt'; 431export const MANAGE_WORKERS_SCRIPT: string = 'manage_workers.js'; 432export const GEN_ABC_SCRIPT: string = 'gen_abc.js'; 433export const GEN_MODULE_ABC_SCRIPT: string = 'gen_module_abc.js'; 434 435export const SUCCESS: number = 0; 436export const FAIL: number = 1; 437 438export const TS2ABC: string = 'ts2abc'; 439export const ES2ABC: string = 'es2abc'; 440 441export const MAX_WORKER_NUMBER: number = 3; 442 443export const GENERATE_ID = 'generateId'; 444export const _GENERATE_ID = '__generate__Id'; 445 446export const COMPONENT_CONSTRUCTOR_INITIAL_PARAMS: string = 'setInitiallyProvidedValue'; 447export const COMPONENT_UPDATE_STATE_VARS: string = 'updateStateVars'; 448export const COMPONENT_RERENDER_FUNCTION: string = 'rerender'; 449export const COMPONENT_CONSTRUCTOR_PURGE_VARIABLE_DEP: string = 'purgeVariableDependenciesOnElmtId'; 450export const MARKDEPENDENTELEMENTSDIRTY: string = 'markDependentElementsDirty'; 451export const ABOUT_TO_BE_DELETE_FUNCTION_ID__: string = 'id__'; 452export const RMELMTID: string = 'rmElmtId'; 453export const PURGEDEPENDENCYONELMTID: string = 'purgeDependencyOnElmtId'; 454export const SETPROPERTYUNCHANGED: string = 'SetPropertyUnchanged'; 455export const ABOUTTOBEDELETEDINTERNAL: string = 'aboutToBeDeletedInternal'; 456export const UPDATEDIRTYELEMENTS: string = 'updateDirtyElements'; 457export const BASICDECORATORS: Set<string> = new Set([COMPONENT_STATE_DECORATOR, COMPONENT_PROP_DECORATOR, 458 COMPONENT_LINK_DECORATOR, COMPONENT_OBJECT_LINK_DECORATOR, COMPONENT_PROVIDE_DECORATOR, COMPONENT_CONSUME_DECORATOR, 459 COMPONENT_STORAGE_LINK_DECORATOR, COMPONENT_STORAGE_PROP_DECORATOR, COMPONENT_LOCAL_STORAGE_LINK_DECORATOR, 460 COMPONENT_LOCAL_STORAGE_PROP_DECORATOR]); 461export const LINKS_DECORATORS: Set<string> = new Set([COMPONENT_LINK_DECORATOR, COMPONENT_OBJECT_LINK_DECORATOR]); 462export const ISINITIALRENDER: string = 'isInitialRender'; 463export const ELMTID: string = 'elmtId'; 464export const STARTGETACCESSRECORDINGFOR: string = 'StartGetAccessRecordingFor'; 465export const STOPGETACCESSRECORDING: string = 'StopGetAccessRecording'; 466export const UPDATE_STATE_VARS_OF_CHIND_BY_ELMTID: string = 'updateStateVarsOfChildByElmtId'; 467export const VIEWSTACKPROCESSOR: string = 'ViewStackProcessor'; 468export const OBSERVECOMPONENTCREATION: string = 'observeComponentCreation'; 469export const OBSERVECOMPONENTCREATION2: string = 'observeComponentCreation2'; 470export const ISLAZYCREATE: string = 'isLazyCreate'; 471export const DEEPRENDERFUNCTION: string = 'deepRenderFunction'; 472export const ITEMCREATION: string = 'itemCreation'; 473export const ITEMCREATION2: string = 'itemCreation2'; 474export const OBSERVEDSHALLOWRENDER: string = 'observedShallowRender'; 475export const OBSERVEDDEEPRENDER:string = 'observedDeepRender'; 476export const ItemComponents: string[] = ['ListItem', 'GridItem']; 477export const FOREACHITEMGENFUNCTION: string = 'forEachItemGenFunction'; 478export const __LAZYFOREACHITEMGENFUNCTION: string = '__lazyForEachItemGenFunction'; 479export const _ITEM: string = '_item'; 480export const FOREACHITEMIDFUNC: string = 'forEachItemIdFunc'; 481export const __LAZYFOREACHITEMIDFUNC: string = '__lazyForEachItemIdFunc'; 482export const FOREACHUPDATEFUNCTION: string = 'forEachUpdateFunction'; 483export const ALLOCATENEWELMETIDFORNEXTCOMPONENT: string = 'AllocateNewElmetIdForNextComponent'; 484export const STATE_OBJECTLINK_DECORATORS: string[] = [COMPONENT_STATE_DECORATOR, COMPONENT_OBJECT_LINK_DECORATOR]; 485export const COMPONENT_INITIAl_RENDER_FUNCTION: string = 'initialRender'; 486export const DECORATOR_COMPONENT_FREEZEWHENINACTIVE: string = 'freezeWhenInactive'; 487export const INIT_ALLOW_COMPONENT_FREEZE: string = 'initAllowComponentFreeze'; 488export const GRID_COMPONENT: string = 'Grid'; 489export const GRIDITEM_COMPONENT: string = 'GridItem'; 490export const WILLUSEPROXY: string = 'willUseProxy'; 491export const BASE_COMPONENT_NAME_PU: string = 'ViewPU'; 492export const GLOBAL_THIS: string = 'globalThis'; 493export const OBSERVED_PROPERTY_SIMPLE_PU: string = 'ObservedPropertySimplePU'; 494export const OBSERVED_PROPERTY_OBJECT_PU: string = 'ObservedPropertyObjectPU'; 495export const SYNCHED_PROPERTY_SIMPLE_ONE_WAY_PU: string = 'SynchedPropertySimpleOneWayPU'; 496export const SYNCHED_PROPERTY_OBJECT_ONE_WAY_PU: string = 'SynchedPropertyObjectOneWayPU'; 497export const SYNCHED_PROPERTY_SIMPLE_TWO_WAY_PU: string = 'SynchedPropertySimpleTwoWayPU'; 498export const SYNCHED_PROPERTY_OBJECT_TWO_WAY_PU: string = 'SynchedPropertyObjectTwoWayPU'; 499export const SYNCHED_PROPERTY_NESED_OBJECT_PU: string = 'SynchedPropertyNesedObjectPU'; 500export const OBSERVED_PROPERTY_ABSTRACT_PU:string = 'ObservedPropertyAbstractPU'; 501export const COMPONENT_CONSTRUCTOR_LOCALSTORAGE_PU: string = '__localStorage'; 502export const COMPONENT_CONSTRUCTOR_LOCALSTORAGE_TYPE_PU: string = 'LocalStorage'; 503export const IFELSEBRANCHUPDATEFUNCTION = 'ifElseBranchUpdateFunction'; 504export const CREATE_STORAGE_LINK = 'createStorageLink'; 505export const CREATE_STORAGE_PROP = 'createStorageProp'; 506export const CREATE_LOCAL_STORAGE_LINK = 'createLocalStorageLink'; 507export const CREATE_LOCAL_STORAGE_PROP = 'createLocalStorageProp'; 508export const GET_ENTRYNAME: string = 'getEntryName'; 509 510export const CARD_ENTRY_FUNCTION_NAME: string = 'loadEtsCard'; 511export const CARD_ENABLE_DECORATORS: Set<string> = new Set([ 512 '@StorageLink', '@StorageProp', '@LocalStorageLink', '@LocalStorageProp' 513]); 514export const CARD_ENABLE_COMPONENTS: Set<string> = new Set([ 515 'AbilityComponent', 'PluginComponent', 'FormComponent', 'RemoteWindow', 516 'XComponent', 'Web', 'RichText' 517]); 518export const TabContentAndNavDestination: Set<string> = new Set(['TabContent', 519 'NavDestination']); 520export const CARD_LOG_TYPE_DECORATORS = 1; 521export const CARD_LOG_TYPE_COMPONENTS = 2; 522export const CARD_LOG_TYPE_IMPORT = 3; 523 524export const CALL = 'call'; 525export const RESERT = 'reset'; 526 527export const TS_NOCHECK: string = '// @ts-nocheck'; 528 529export const BUILDER_PARAM_PROXY: string = 'makeBuilderParameterProxy'; 530export const BUILDER_TYPE: string = 'BuilderType'; 531 532export const FUNCTION: string = 'function'; 533export const NAME: string = 'name'; 534 535export const ROUTENAME_NODE: string = 'routeNameNode'; 536export const STORAGE_NODE: string = 'storageNode'; 537export const STORAGE: string = 'storage'; 538export const REGISTER_NAMED_ROUTE: string = 'registerNamedRoute'; 539export const ROUTE_NAME: string = 'routeName'; 540export const PAGE_PATH: string = 'pagePath'; 541 542export const CAN_RETAKE: string = 'canRetake'; 543export const DECORATOR_SUFFIX: string = '@'; 544export const TRANSFORMED_MOCK_CONFIG: string = 'mock-config.json'; 545export const USER_DEFINE_MOCK_CONFIG: string = 'mock-config.json5'; 546 547export const FORM_TAG_CHECK_NAME: string = 'form'; 548export const FORM_TAG_CHECK_ERROR: string = "'{0}' can't support form application."; 549export const CROSSPLATFORM_TAG_CHECK_NAME: string = 'crossplatform'; 550export const CROSSPLATFORM_TAG_CHECK_ERROER: string = "'{0}' can't support crossplatform application."; 551export const DEPRECATED_TAG_CHECK_NAME: string = 'deprecated'; 552export const DEPRECATED_TAG_CHECK_WARNING: string = "'{0}' has been deprecated."; 553export const FA_TAG_CHECK_NAME: string = 'famodelonly'; 554export const FA_TAG_HUMP_CHECK_NAME: string = 'FAModelOnly'; 555export const FA_TAG_CHECK_ERROR: string = 'This API is used only in FA Mode, but the current Mode is Stage.'; 556export const STAGE_TAG_CHECK_NAME: string = 'stagemodelonly'; 557export const STAGE_TAG_HUMP_CHECK_NAME: string = 'StageModelOnly'; 558export const STAGE_TAG_CHECK_ERROR: string = 'This API is used only in Stage Mode, but the current Mode is FA.'; 559export const STAGE_COMPILE_MODE: string = 'moduleJson'; 560export const ATOMICSERVICE_BUNDLE_TYPE: string = 'atomicService'; 561export const ATOMICSERVICE_TAG_CHECK_NAME: string = 'atomicservice'; 562export const ATOMICSERVICE_TAG_CHECK_ERROER: string = "'{0}' can't support atomicservice application."; 563export const SINCE_TAG_NAME: string = 'since'; 564export const ATOMICSERVICE_TAG_CHECK_VERSION: number = 11; 565export const FIND_MODULE_WARNING: string = "Cannot find name '{0}'."; 566export const SYSCAP_TAG_CHECK_NAME: string = 'syscap'; 567export const SYSCAP_TAG_CHECK_WARNING: string = "The default system capabilities of devices $DT do not include system capability of '{0}'. Configure the capabilities in syscap.json. It may cause your application crush in some devices. Attention: Such illegal interface call will lead to compilation error in the future version!" 568 569export const WRAPBUILDER_FUNCTION: string = 'wrapBuilder'; 570export const WRAPPEDBUILDER_CLASS: string = 'WrappedBuilder'; 571export const WRAPBUILDER_BUILDERPROP: string = 'builder'; 572 573export const PREVIEW: string = 'preview'; 574export const TITLE: string = 'title'; 575 576export const IDS: string = 'ids'; 577export const PUSH: string = 'push'; 578export const UPDATE_LAZY_FOREACH_ELEMENTS = 'UpdateLazyForEachElements'; 579export const IS_INITIAL_ITEM = 'isInitialItem'; 580export const MY_IDS = 'myIds'; 581export const COMPONENT_CALL: string = 'componentCall'; 582 583export const TS_BUILD_INFO_SUFFIX = '.tsbuildinfo'; 584export const ARKTS_LINTER_BUILD_INFO_SUFFIX = 'inversedArkTsLinter.tsbuildinfo'; 585export const HOT_RELOAD_BUILD_INFO_SUFFIX = 'hotReload.tsbuildinfo'; 586 587export const GLOBAL_DECLARE_WHITE_LIST: Set<string> = new Set(['Context', 'PointerStyle', 'PixelMap', 'UnifiedData', 'Summary', 'UniformDataType', 'IntentionCode', 'NavDestinationInfo', 'UIContext', 'Resource', 'WebviewController']) 588 589export const RUNTIME_OS_OH: string = 'OpenHarmony';