1 line
11 KiB
JSON
1 line
11 KiB
JSON
{"ast":null,"code":"import \"core-js/modules/es.function.name.js\";\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n// @ts-nocheck\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function timelinePreprocessor(option) {\n var timelineOpt = option && option.timeline;\n\n if (!zrUtil.isArray(timelineOpt)) {\n timelineOpt = timelineOpt ? [timelineOpt] : [];\n }\n\n zrUtil.each(timelineOpt, function (opt) {\n if (!opt) {\n return;\n }\n\n compatibleEC2(opt);\n });\n}\n\nfunction compatibleEC2(opt) {\n var type = opt.type;\n var ec2Types = {\n 'number': 'value',\n 'time': 'time'\n }; // Compatible with ec2\n\n if (ec2Types[type]) {\n opt.axisType = ec2Types[type];\n delete opt.type;\n }\n\n transferItem(opt);\n\n if (has(opt, 'controlPosition')) {\n var controlStyle = opt.controlStyle || (opt.controlStyle = {});\n\n if (!has(controlStyle, 'position')) {\n controlStyle.position = opt.controlPosition;\n }\n\n if (controlStyle.position === 'none' && !has(controlStyle, 'show')) {\n controlStyle.show = false;\n delete controlStyle.position;\n }\n\n delete opt.controlPosition;\n }\n\n zrUtil.each(opt.data || [], function (dataItem) {\n if (zrUtil.isObject(dataItem) && !zrUtil.isArray(dataItem)) {\n if (!has(dataItem, 'value') && has(dataItem, 'name')) {\n // In ec2, using name as value.\n dataItem.value = dataItem.name;\n }\n\n transferItem(dataItem);\n }\n });\n}\n\nfunction transferItem(opt) {\n var itemStyle = opt.itemStyle || (opt.itemStyle = {});\n var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {}); // Transfer label out\n\n var label = opt.label || opt.label || {};\n var labelNormal = label.normal || (label.normal = {});\n var excludeLabelAttr = {\n normal: 1,\n emphasis: 1\n };\n zrUtil.each(label, function (value, name) {\n if (!excludeLabelAttr[name] && !has(labelNormal, name)) {\n labelNormal[name] = value;\n }\n });\n\n if (itemStyleEmphasis.label && !has(label, 'emphasis')) {\n label.emphasis = itemStyleEmphasis.label;\n delete itemStyleEmphasis.label;\n }\n}\n\nfunction has(obj, attr) {\n return obj.hasOwnProperty(attr);\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/component/timeline/preprocessor.js"],"names":["zrUtil","timelinePreprocessor","option","timelineOpt","timeline","isArray","each","opt","compatibleEC2","type","ec2Types","axisType","transferItem","has","controlStyle","position","controlPosition","show","data","dataItem","isObject","value","name","itemStyle","itemStyleEmphasis","emphasis","label","labelNormal","normal","excludeLabelAttr","obj","attr","hasOwnProperty"],"mappings":";;AACA;AACA;AACA;AACA;AAC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AE;AAFW,GAAvB;AAIAzB,EAAAA,MAAM,CAACM,IAAP,CAAYoB,KAAZ,EAAmB,UAAUL,KAAV,EAAiBC,IAAjB,EAAuB;AACxC,QAAI,CAACO,gBAAgB,CAACP,IAAD,CAAjB,IAA2B,CAACT,GAAG,CAACc,WAAD,EAAcL,IAAd,CAAnC,EAAwD;AACtDK,MAAAA,WAAW,CAACL,IAAD,CAAX,GAAoBD,KAApB;AACD;AACF,GAJD;;AAMA,MAAIG,iBAAiB,CAACE,KAAlB,IAA2B,CAACb,GAAG,CAACa,KAAD,EAAQ,UAAR,CAAnC,EAAwD;AACtDA,IAAAA,KAAK,CAACD,QAAN,GAAiBD,iBAAiB,CAACE,KAAnC;AACA,WAAOF,iBAAiB,CAACE,KAAzB;AACD;AACF;;AAED,SAASb,GAAT,CAAaiB,GAAb,EAAkBC,IAAlB,EAAwB;AACtB,SAAOD,GAAG,CAACE,cAAJ,CAAmBD,IAAnB,CAAP;AACD","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n// @ts-nocheck\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nexport default function timelinePreprocessor(option) {\r\n var timelineOpt = option && option.timeline;\r\n\r\n if (!zrUtil.isArray(timelineOpt)) {\r\n timelineOpt = timelineOpt ? [timelineOpt] : [];\r\n }\r\n\r\n zrUtil.each(timelineOpt, function (opt) {\r\n if (!opt) {\r\n return;\r\n }\r\n\r\n compatibleEC2(opt);\r\n });\r\n}\r\n\r\nfunction compatibleEC2(opt) {\r\n var type = opt.type;\r\n var ec2Types = {\r\n 'number': 'value',\r\n 'time': 'time'\r\n }; // Compatible with ec2\r\n\r\n if (ec2Types[type]) {\r\n opt.axisType = ec2Types[type];\r\n delete opt.type;\r\n }\r\n\r\n transferItem(opt);\r\n\r\n if (has(opt, 'controlPosition')) {\r\n var controlStyle = opt.controlStyle || (opt.controlStyle = {});\r\n\r\n if (!has(controlStyle, 'position')) {\r\n controlStyle.position = opt.controlPosition;\r\n }\r\n\r\n if (controlStyle.position === 'none' && !has(controlStyle, 'show')) {\r\n controlStyle.show = false;\r\n delete controlStyle.position;\r\n }\r\n\r\n delete opt.controlPosition;\r\n }\r\n\r\n zrUtil.each(opt.data || [], function (dataItem) {\r\n if (zrUtil.isObject(dataItem) && !zrUtil.isArray(dataItem)) {\r\n if (!has(dataItem, 'value') && has(dataItem, 'name')) {\r\n // In ec2, using name as value.\r\n dataItem.value = dataItem.name;\r\n }\r\n\r\n transferItem(dataItem);\r\n }\r\n });\r\n}\r\n\r\nfunction transferItem(opt) {\r\n var itemStyle = opt.itemStyle || (opt.itemStyle = {});\r\n var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {}); // Transfer label out\r\n\r\n var label = opt.label || opt.label || {};\r\n var labelNormal = label.normal || (label.normal = {});\r\n var excludeLabelAttr = {\r\n normal: 1,\r\n emphasis: 1\r\n };\r\n zrUtil.each(label, function (value, name) {\r\n if (!excludeLabelAttr[name] && !has(labelNormal, name)) {\r\n labelNormal[name] = value;\r\n }\r\n });\r\n\r\n if (itemStyleEmphasis.label && !has(label, 'emphasis')) {\r\n label.emphasis = itemStyleEmphasis.label;\r\n delete itemStyleEmphasis.label;\r\n }\r\n}\r\n\r\nfunction has(obj, attr) {\r\n return obj.hasOwnProperty(attr);\r\n}"]},"metadata":{},"sourceType":"module"} |