1#!/usr/bin/env python 2# -*- coding: utf-8 -*- 3# Copyright (c) 2020-2021 Huawei Device Co., Ltd. 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16 17""" 18config file 19if ace js framework add config, when you use the util should adapter the config 20""" 21 22key_word = [ 23 'UNKNOWN', 24 'alignItems', 25 'animationDelay', 26 'animationDuration', 27 'animationFillMode', 28 'animationIterationCount', 29 'animationName', 30 'animationTimingFunction', 31 'arc', 32 'backgroundColor', 33 'backgroundImage', 34 'blockColor', 35 'borderBottomColor', 36 'borderLeftColor', 37 'borderRightColor', 38 'borderTopColor', 39 'borderColor', 40 'borderRadius', 41 'borderBottomWidth', 42 'borderLeftWidth', 43 'borderRightWidth', 44 'borderTopWidth', 45 'borderWidth', 46 'break', 47 'canvas', 48 'center', 49 'centerX', 50 'centerY', 51 'change', 52 'checked', 53 'checkbox', 54 'click', 55 'clip', 56 'chart', 57 'color', 58 'column', 59 'column-reverse', 60 'datasets', 61 'day', 62 'digit2', 63 'direction', 64 'display', 65 'div', 66 'drag', 67 'duration', 68 'ease-in', 69 'ease-in-out', 70 'ease-out', 71 'ellipsis', 72 'expand', 73 'false', 74 'fillmode', 75 'fixedsize', 76 'flexDirection', 77 'flex-end', 78 'flex-start', 79 'flexWrap', 80 'fontSize', 81 'fontFamily', 82 'forwards', 83 'height', 84 'hour', 85 'hour12', 86 'id', 87 'image', 88 'image-animator', 89 'images', 90 'index', 91 'input', 92 'itemselected', 93 'iteration', 94 'justifyContent', 95 'labels', 96 'larger', 97 'left', 98 'letterSpacing', 99 'lineHeight', 100 'list', 101 'list-item', 102 'long', 103 'longpress', 104 'loop', 105 'margin', 106 'marginBottom', 107 'marginLeft', 108 'marginRight', 109 'marginTop', 110 'marquee', 111 'max', 112 'min', 113 'mini', 114 'minute', 115 'month', 116 'name', 117 'none', 118 'numeric', 119 'opacity', 120 'options', 121 'padding', 122 'paddingBottom', 123 'paddingLeft', 124 'paddingRight', 125 'paddingTop', 126 'percent', 127 'picker-view', 128 'ref', 129 'progress', 130 'qrcode', 131 'radio', 132 'radius', 133 'range', 134 'reverse', 135 'right', 136 'rotate', 137 'row', 138 'row-reverse', 139 'scrollamount', 140 'scrollend', 141 'scrollstart', 142 'second', 143 'selected', 144 'selectedColor', 145 'selectedFontFamily', 146 'selectedFontSize', 147 'short', 148 'show', 149 'slider', 150 'space-around', 151 'space-between', 152 'space-evenly', 153 'src', 154 'stack', 155 'standard', 156 'stop', 157 'startAngle', 158 'step', 159 'strokeWidth', 160 'swipe', 161 'swiper', 162 'switch', 163 'text', 164 'textAlign', 165 'textOverflow', 166 'time', 167 'top', 168 'total-angle', 169 'translateX', 170 'translateY', 171 'true', 172 'value', 173 'vertical', 174 'width', 175 'wrap', 176 'weekday', 177 'year', 178 'style', 179 'useGroup', 180 'minimumFractionDigits', 181 'maximumFractionDigits' 182] 183 184label_name = [ 185 'UNKNOWN', 186 'LAUNCH', 187 'ENGINE_INIT', 188 'FWK_INIT', 189 'JS_BEGIN', 190 'JS_FWK_EVAL', 191 'JS_APP_INIT', 192 'JS_INIT_STATE', 193 'JS_INIT_DATA_GET_DATA', 194 'JS_INIT_DATA_PROXY', 195 'JS_INIT_DATA_OBSERVE', 196 'JS_END', 197 'FWK_CODE_LOAD', 198 'FWK_CODE_EVAL', 199 'APP_CODE_LOAD', 200 'APP_CODE_EVAL', 201 'PAGE_CODE_LOAD', 202 'PAGE_CODE_EVAL', 203 'STYLESHEET_INIT', 204 'APP_ON_CREATE', 205 'APP_ON_DESTROY', 206 'ROUTER_REPLACE', 207 'PAGE_TRANSFER_DATA', 208 'PAGE_ON_INIT', 209 'PAGE_ON_READY', 210 'PAGE_ON_SHOW', 211 'PAGE_ON_BACKGROUND', 212 'PAGE_ON_DESTROY', 213 'RENDER', 214 'ADD_TO_ROOT_VIEW', 215 'RENDER_CREATE_COMPONENT', 216 'RENDER_COMBINE_STYLE', 217 'RENDER_BIND_JS_OBJECT', 218 'RENDER_PARSE_ATTR', 219 'RENDER_PARSE_EVENT', 220 'RENDER_APPLY_STYLE', 221 'RENDER_PROCESS_CHILDREN', 222 'SET_ATTR_PARSE_EXPRESSION', 223 'SET_ATTR_STRING_OF', 224 'SET_ATTR_PARSE_KEY_ID', 225 'SET_ATTR_SET_TO_NATIVE', 226 'APPLY_STYLE_ITEM', 227 'WATCHER_CALLBACK_FUNC', 228 'FOR_WATCHER_CALLBACK_FUNC', 229 'WATCHER_CONSTRUCT' 230] 231 232profiler_name = { 233 'UNKNOWN': 'P_UNKNOWN', 234 'LAUNCH': 'P_UNKNOWN', 235 'ENGINE_INIT': 'LAUNCH', 236 'FWK_INIT': 'LAUNCH', 237 'JS_BEGIN': 'P_UNKNOWN', 238 'JS_FWK_EVAL': 'PAGE_CODE_EVAL', 239 'JS_APP_INIT': 'FWK_CODE_EVAL', 240 'JS_INIT_STATE': 'JS_FWK_EVAL', 241 'JS_INIT_DATA_GET_DATA': 'JS_INIT_STATE', 242 'JS_INIT_DATA_PROXY': 'JS_INIT_STATE', 243 'JS_INIT_DATA_OBSERVE': 'JS_INIT_STATE', 244 'JS_END': 'P_UNKNOWN', 245 'FWK_CODE_LOAD': 'FWK_INIT', 246 'FWK_CODE_EVAL': 'FWK_INIT', 247 'APP_CODE_LOAD': 'LAUNCH', 248 'APP_CODE_EVAL': 'LAUNCH', 249 'PAGE_CODE_LOAD': 'ROUTER_REPLACE', 250 'PAGE_CODE_EVAL': 'ROUTER_REPLACE', 251 'STYLESHEET_INIT': 'JS_FWK_EVAL', 252 'APP_ON_CREATE': 'LAUNCH', 253 'APP_ON_DESTROY': 'LAUNCH', 254 'ROUTER_REPLACE': 'LAUNCH', 255 'PAGE_TRANSFER_DATA': 'ROUTER_REPLACE', 256 'PAGE_ON_INIT': 'ROUTER_REPLACE', 257 'PAGE_ON_READY': 'ROUTER_REPLACE', 258 'PAGE_ON_SHOW': 'ROUTER_REPLACE', 259 'PAGE_ON_BACKGROUND': 'ROUTER_REPLACE', 260 'PAGE_ON_DESTROY': 'P_UNKNOWN', 261 'RENDER': 'ROUTER_REPLACE', 262 'ADD_TO_ROOT_VIEW': 'LAUNCH', 263 'RENDER_CREATE_COMPONENT': 'RENDER', 264 'RENDER_COMBINE_STYLE': 'RENDER', 265 'RENDER_BIND_JS_OBJECT': 'RENDER', 266 'RENDER_PARSE_ATTR': 'RENDER', 267 'RENDER_PARSE_EVENT': 'RENDER', 268 'RENDER_APPLY_STYLE': 'RENDER', 269 'RENDER_PROCESS_CHILDREN': 'RENDER', 270 'SET_ATTR_PARSE_EXPRESSION': 'RENDER_PARSE_ATTR', 271 'SET_ATTR_STRING_OF': 'RENDER_PARSE_ATTR', 272 'SET_ATTR_PARSE_KEY_ID': 'RENDER_PARSE_ATTR', 273 'SET_ATTR_SET_TO_NATIVE': 'RENDER_PARSE_ATTR', 274 'APPLY_STYLE_ITEM': 'RENDER_APPLY_STYLE', 275 'WATCHER_CALLBACK_FUNC': 'P_UNKNOWN', 276 'FOR_WATCHER_CALLBACK_FUNC': 'P_UNKNOWN', 277 'WATCHER_CONSTRUCT': 'SET_ATTR_PARSE_EXPRESSION' 278} 279