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