#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2020-2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ config file if ace js framework add config, when you use the util should adapter the config """ key_word = [ 'UNKNOWN', 'alignItems', 'animationDelay', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationTimingFunction', 'arc', 'backgroundColor', 'backgroundImage', 'blockColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'borderColor', 'borderRadius', 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth', 'borderWidth', 'break', 'canvas', 'center', 'centerX', 'centerY', 'change', 'checked', 'checkbox', 'click', 'clip', 'chart', 'color', 'column', 'column-reverse', 'datasets', 'day', 'digit2', 'direction', 'display', 'div', 'drag', 'duration', 'ease-in', 'ease-in-out', 'ease-out', 'ellipsis', 'expand', 'false', 'fillmode', 'fixedsize', 'flexDirection', 'flex-end', 'flex-start', 'flexWrap', 'fontSize', 'fontFamily', 'forwards', 'height', 'hour', 'hour12', 'id', 'image', 'image-animator', 'images', 'index', 'input', 'itemselected', 'iteration', 'justifyContent', 'labels', 'larger', 'left', 'letterSpacing', 'lineHeight', 'list', 'list-item', 'long', 'longpress', 'loop', 'margin', 'marginBottom', 'marginLeft', 'marginRight', 'marginTop', 'marquee', 'max', 'min', 'mini', 'minute', 'month', 'name', 'none', 'numeric', 'opacity', 'options', 'padding', 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'percent', 'picker-view', 'ref', 'progress', 'qrcode', 'radio', 'radius', 'range', 'reverse', 'right', 'rotate', 'row', 'row-reverse', 'scrollamount', 'scrollend', 'scrollstart', 'second', 'selected', 'selectedColor', 'selectedFontFamily', 'selectedFontSize', 'short', 'show', 'slider', 'space-around', 'space-between', 'space-evenly', 'src', 'stack', 'standard', 'stop', 'startAngle', 'step', 'strokeWidth', 'swipe', 'swiper', 'switch', 'text', 'textAlign', 'textOverflow', 'time', 'top', 'total-angle', 'translateX', 'translateY', 'true', 'value', 'vertical', 'width', 'wrap', 'weekday', 'year', 'style', 'useGroup', 'minimumFractionDigits', 'maximumFractionDigits' ] label_name = [ 'UNKNOWN', 'LAUNCH', 'ENGINE_INIT', 'FWK_INIT', 'JS_BEGIN', 'JS_FWK_EVAL', 'JS_APP_INIT', 'JS_INIT_STATE', 'JS_INIT_DATA_GET_DATA', 'JS_INIT_DATA_PROXY', 'JS_INIT_DATA_OBSERVE', 'JS_END', 'FWK_CODE_LOAD', 'FWK_CODE_EVAL', 'APP_CODE_LOAD', 'APP_CODE_EVAL', 'PAGE_CODE_LOAD', 'PAGE_CODE_EVAL', 'STYLESHEET_INIT', 'APP_ON_CREATE', 'APP_ON_DESTROY', 'ROUTER_REPLACE', 'PAGE_TRANSFER_DATA', 'PAGE_ON_INIT', 'PAGE_ON_READY', 'PAGE_ON_SHOW', 'PAGE_ON_BACKGROUND', 'PAGE_ON_DESTROY', 'RENDER', 'ADD_TO_ROOT_VIEW', 'RENDER_CREATE_COMPONENT', 'RENDER_COMBINE_STYLE', 'RENDER_BIND_JS_OBJECT', 'RENDER_PARSE_ATTR', 'RENDER_PARSE_EVENT', 'RENDER_APPLY_STYLE', 'RENDER_PROCESS_CHILDREN', 'SET_ATTR_PARSE_EXPRESSION', 'SET_ATTR_STRING_OF', 'SET_ATTR_PARSE_KEY_ID', 'SET_ATTR_SET_TO_NATIVE', 'APPLY_STYLE_ITEM', 'WATCHER_CALLBACK_FUNC', 'FOR_WATCHER_CALLBACK_FUNC', 'WATCHER_CONSTRUCT' ] profiler_name = { 'UNKNOWN': 'P_UNKNOWN', 'LAUNCH': 'P_UNKNOWN', 'ENGINE_INIT': 'LAUNCH', 'FWK_INIT': 'LAUNCH', 'JS_BEGIN': 'P_UNKNOWN', 'JS_FWK_EVAL': 'PAGE_CODE_EVAL', 'JS_APP_INIT': 'FWK_CODE_EVAL', 'JS_INIT_STATE': 'JS_FWK_EVAL', 'JS_INIT_DATA_GET_DATA': 'JS_INIT_STATE', 'JS_INIT_DATA_PROXY': 'JS_INIT_STATE', 'JS_INIT_DATA_OBSERVE': 'JS_INIT_STATE', 'JS_END': 'P_UNKNOWN', 'FWK_CODE_LOAD': 'FWK_INIT', 'FWK_CODE_EVAL': 'FWK_INIT', 'APP_CODE_LOAD': 'LAUNCH', 'APP_CODE_EVAL': 'LAUNCH', 'PAGE_CODE_LOAD': 'ROUTER_REPLACE', 'PAGE_CODE_EVAL': 'ROUTER_REPLACE', 'STYLESHEET_INIT': 'JS_FWK_EVAL', 'APP_ON_CREATE': 'LAUNCH', 'APP_ON_DESTROY': 'LAUNCH', 'ROUTER_REPLACE': 'LAUNCH', 'PAGE_TRANSFER_DATA': 'ROUTER_REPLACE', 'PAGE_ON_INIT': 'ROUTER_REPLACE', 'PAGE_ON_READY': 'ROUTER_REPLACE', 'PAGE_ON_SHOW': 'ROUTER_REPLACE', 'PAGE_ON_BACKGROUND': 'ROUTER_REPLACE', 'PAGE_ON_DESTROY': 'P_UNKNOWN', 'RENDER': 'ROUTER_REPLACE', 'ADD_TO_ROOT_VIEW': 'LAUNCH', 'RENDER_CREATE_COMPONENT': 'RENDER', 'RENDER_COMBINE_STYLE': 'RENDER', 'RENDER_BIND_JS_OBJECT': 'RENDER', 'RENDER_PARSE_ATTR': 'RENDER', 'RENDER_PARSE_EVENT': 'RENDER', 'RENDER_APPLY_STYLE': 'RENDER', 'RENDER_PROCESS_CHILDREN': 'RENDER', 'SET_ATTR_PARSE_EXPRESSION': 'RENDER_PARSE_ATTR', 'SET_ATTR_STRING_OF': 'RENDER_PARSE_ATTR', 'SET_ATTR_PARSE_KEY_ID': 'RENDER_PARSE_ATTR', 'SET_ATTR_SET_TO_NATIVE': 'RENDER_PARSE_ATTR', 'APPLY_STYLE_ITEM': 'RENDER_APPLY_STYLE', 'WATCHER_CALLBACK_FUNC': 'P_UNKNOWN', 'FOR_WATCHER_CALLBACK_FUNC': 'P_UNKNOWN', 'WATCHER_CONSTRUCT': 'SET_ATTR_PARSE_EXPRESSION' }