qauMaWeb/node_modules/.cache/babel-loader/bb643f048f99d51712b2745f04c...

1 line
20 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.function.name.js\";\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SeriesModel from '../../model/Series.js';\nimport Tree from '../../data/Tree.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nimport Model from '../../model/Model.js';\nimport enableAriaDecalForTree from '../helper/enableAriaDecalForTree.js';\n\nvar SunburstSeriesModel =\n/** @class */\nfunction (_super) {\n __extends(SunburstSeriesModel, _super);\n\n function SunburstSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = SunburstSeriesModel.type;\n _this.ignoreStyleOnData = true;\n return _this;\n }\n\n SunburstSeriesModel.prototype.getInitialData = function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levelModels = this._levelModels = zrUtil.map(option.levels || [], function (levelDefine) {\n return new Model(levelDefine, this, ecModel);\n }, this); // Make sure always a new tree is created when setOption,\n // in TreemapView, we check whether oldTree === newTree\n // to choose mappings approach among old shapes and new shapes.\n\n var tree = Tree.createTree(root, this, beforeLink);\n\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n var levelModel = levelModels[node.depth];\n levelModel && (model.parentModel = levelModel);\n return model;\n });\n }\n\n return tree.data;\n };\n\n SunburstSeriesModel.prototype.optionUpdated = function () {\n this.resetViewRoot();\n };\n /*\n * @override\n */\n\n\n SunburstSeriesModel.prototype.getDataParams = function (dataIndex) {\n var params = _super.prototype.getDataParams.apply(this, arguments);\n\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treePathInfo = wrapTreePathInfo(node, this);\n return params;\n };\n\n SunburstSeriesModel.prototype.getLevelModel = function (node) {\n return this._levelModels && this._levelModels[node.depth];\n };\n\n SunburstSeriesModel.prototype.getViewRoot = function () {\n return this._viewRoot;\n };\n\n SunburstSeriesModel.prototype.resetViewRoot = function (viewRoot) {\n viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot;\n var root = this.getRawData().tree.root;\n\n if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) {\n this._viewRoot = root;\n }\n };\n\n SunburstSeriesModel.prototype.enableAriaDecal = function () {\n enableAriaDecalForTree(this);\n };\n\n SunburstSeriesModel.type = 'series.sunburst';\n SunburstSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n // 默认全局居中\n center: ['50%', '50%'],\n radius: [0, '75%'],\n // 默认顺时针\n clockwise: true,\n startAngle: 90,\n // 最小角度改为0\n minAngle: 0,\n // If still show when all data zero.\n stillShowZeroSum: true,\n // 'rootToNode', 'link', or false\n nodeClick: 'rootToNode',\n renderLabelForZeroData: false,\n label: {\n // could be: 'radial', 'tangential', or 'none'\n rotate: 'radial',\n show: true,\n opacity: 1,\n // 'left' is for inner side of inside, and 'right' is for outer\n // side for inside\n align: 'center',\n position: 'inside',\n distance: 5,\n silent: true\n },\n itemStyle: {\n borderWidth: 1,\n borderColor: 'white',\n borderType: 'solid',\n shadowBlur: 0,\n shadowColor: 'rgba(0, 0, 0, 0.2)',\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n },\n emphasis: {\n focus: 'descendant'\n },\n blur: {\n itemStyle: {\n opacity: 0.2\n },\n label: {\n opacity: 0.1\n }\n },\n // Animation type can be expansion, scale.\n animationType: 'expansion',\n animationDuration: 1000,\n animationDurationUpdate: 500,\n data: [],\n\n /**\n * Sort order.\n *\n * Valid values: 'desc', 'asc', null, or callback function.\n * 'desc' and 'asc' for descend and ascendant order;\n * null for not sorting;\n * example of callback function:\n * function(nodeA, nodeB) {\n * return nodeA.getValue() - nodeB.getValue();\n * }\n */\n sort: 'desc'\n };\n return SunburstSeriesModel;\n}(SeriesModel);\n\nfunction completeTreeValue(dataNode) {\n // Postorder travel tree.\n // If value of none-leaf node is not set,\n // calculate it by suming up the value of all children.\n var sum = 0;\n zrUtil.each(dataNode.children, function (child) {\n completeTreeValue(child);\n var childValue = child.value; // TODO First value of array must be a number\n\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n sum += childValue;\n });\n var thisValue = dataNode.value;\n\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n } // Value should not less than 0.\n\n\n if (thisValue < 0) {\n thisValue = 0;\n }\n\n zrUtil.isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;\n}\n\nexport default SunburstSeriesModel;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/echarts/lib/chart/sunburst/SunburstSeries.js"],"names":["__extends","zrUtil","SeriesModel","Tree","wrapTreePathInfo","Model","enableAriaDecalForTree","SunburstSeriesModel","_super","_this","apply","arguments","type","ignoreStyleOnData","prototype","getInitialData","option","ecModel","root","name","children","data","completeTreeValue","levelModels","_levelModels","map","levels","levelDefine","tree","createTree","beforeLink","nodeData","wrapMethod","model","idx","node","getNodeByDataIndex","levelModel","depth","parentModel","optionUpdated","resetViewRoot","getDataParams","dataIndex","params","getData","treePathInfo","getLevelModel","getViewRoot","_viewRoot","viewRoot","getRawData","contains","enableAriaDecal","defaultOption","z","center","radius","clockwise","startAngle","minAngle","stillShowZeroSum","nodeClick","renderLabelForZeroData","label","rotate","show","opacity","align","position","distance","silent","itemStyle","borderWidth","borderColor","borderType","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","emphasis","focus","blur","animationType","animationDuration","animationDurationUpdate","sort","dataNode","sum","each","child","childValue","value","isArray","thisValue","isNaN"],"mappings":";;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,OAA1B;AACA,OAAO,KAAKC,MAAZ,MAAwB,0BAAxB;AACA,OAAOC,WAAP,MAAwB,uBAAxB;AACA,OAAOC,IAAP,MAAiB,oBAAjB;AACA,SAASC,gBAAT,QAAiC,yBAAjC;AACA,OAAOC,KAAP,MAAkB,sBAAlB;AACA,OAAOC,sBAAP,MAAmC,qCAAnC;;AAEA,IAAIC,mBAAmB;AACvB;AACA,UAAUC,MAAV,EAAkB;AAChBR,EAAAA,SAAS,CAACO,mBAAD,EAAsBC,MAAtB,CAAT;;AAEA,WAASD,mBAAT,GAA+B;AAC7B,QAAIE,KAAK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;;;AAGF,MAAIM,SAAS,GAAG,CAAhB,EAAmB;AACjBA,IAAAA,SAAS,GAAG,CAAZ;AACD;;AAED7F,EAAAA,MAAM,CAAC4F,OAAP,CAAeN,QAAQ,CAACK,KAAxB,IAAiCL,QAAQ,CAACK,KAAT,CAAe,CAAf,IAAoBE,SAArD,GAAiEP,QAAQ,CAACK,KAAT,GAAiBE,SAAlF;AACD;;AAED,eAAevF,mBAAf","sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SeriesModel from '../../model/Series.js';\nimport Tree from '../../data/Tree.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nimport Model from '../../model/Model.js';\nimport enableAriaDecalForTree from '../helper/enableAriaDecalForTree.js';\n\nvar SunburstSeriesModel =\n/** @class */\nfunction (_super) {\n __extends(SunburstSeriesModel, _super);\n\n function SunburstSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = SunburstSeriesModel.type;\n _this.ignoreStyleOnData = true;\n return _this;\n }\n\n SunburstSeriesModel.prototype.getInitialData = function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levelModels = this._levelModels = zrUtil.map(option.levels || [], function (levelDefine) {\n return new Model(levelDefine, this, ecModel);\n }, this); // Make sure always a new tree is created when setOption,\n // in TreemapView, we check whether oldTree === newTree\n // to choose mappings approach among old shapes and new shapes.\n\n var tree = Tree.createTree(root, this, beforeLink);\n\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n var levelModel = levelModels[node.depth];\n levelModel && (model.parentModel = levelModel);\n return model;\n });\n }\n\n return tree.data;\n };\n\n SunburstSeriesModel.prototype.optionUpdated = function () {\n this.resetViewRoot();\n };\n /*\n * @override\n */\n\n\n SunburstSeriesModel.prototype.getDataParams = function (dataIndex) {\n var params = _super.prototype.getDataParams.apply(this, arguments);\n\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treePathInfo = wrapTreePathInfo(node, this);\n return params;\n };\n\n SunburstSeriesModel.prototype.getLevelModel = function (node) {\n return this._levelModels && this._levelModels[node.depth];\n };\n\n SunburstSeriesModel.prototype.getViewRoot = function () {\n return this._viewRoot;\n };\n\n SunburstSeriesModel.prototype.resetViewRoot = function (viewRoot) {\n viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot;\n var root = this.getRawData().tree.root;\n\n if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) {\n this._viewRoot = root;\n }\n };\n\n SunburstSeriesModel.prototype.enableAriaDecal = function () {\n enableAriaDecalForTree(this);\n };\n\n SunburstSeriesModel.type = 'series.sunburst';\n SunburstSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n // 默认全局居中\n center: ['50%', '50%'],\n radius: [0, '75%'],\n // 默认顺时针\n clockwise: true,\n startAngle: 90,\n // 最小角度改为0\n minAngle: 0,\n // If still show when all data zero.\n stillShowZeroSum: true,\n // 'rootToNode', 'link', or false\n nodeClick: 'rootToNode',\n renderLabelForZeroData: false,\n label: {\n // could be: 'radial', 'tangential', or 'none'\n rotate: 'radial',\n show: true,\n opacity: 1,\n // 'left' is for inner side of inside, and 'right' is for outer\n // side for inside\n align: 'center',\n position: 'inside',\n distance: 5,\n silent: true\n },\n itemStyle: {\n borderWidth: 1,\n borderColor: 'white',\n borderType: 'solid',\n shadowBlur: 0,\n shadowColor: 'rgba(0, 0, 0, 0.2)',\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n },\n emphasis: {\n focus: 'descendant'\n },\n blur: {\n itemStyle: {\n opacity: 0.2\n },\n label: {\n opacity: 0.1\n }\n },\n // Animation type can be expansion, scale.\n animationType: 'expansion',\n animationDuration: 1000,\n animationDurationUpdate: 500,\n data: [],\n\n /**\n * Sort order.\n *\n * Valid values: 'desc', 'asc', null, or callback function.\n * 'desc' and 'asc' for descend and ascendant order;\n * null for not sorting;\n * example of callback function:\n * function(nodeA, nodeB) {\n * return nodeA.getValue() - nodeB.getValue();\n * }\n */\n sort: 'desc'\n };\n return SunburstSeriesModel;\n}(SeriesModel);\n\nfunction completeTreeValue(dataNode) {\n // Postorder travel tree.\n // If value of none-leaf node is not set,\n // calculate it by suming up the value of all children.\n var sum = 0;\n zrUtil.each(dataNode.children, function (child) {\n completeTreeValue(child);\n var childValue = child.value; // TODO First value of array must be a number\n\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n sum += childValue;\n });\n var thisValue = dataNode.value;\n\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n } // Value should not less than 0.\n\n\n if (thisValue < 0) {\n thisValue = 0;\n }\n\n zrUtil.isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;\n}\n\nexport default SunburstSeriesModel;"]},"metadata":{},"sourceType":"module"}