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