1 line
18 KiB
JSON
1 line
18 KiB
JSON
{"ast":null,"code":"import _typeof from \"D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src\\u554A/ElectronicMallVue/node_modules/@babel/runtime/helpers/esm/typeof.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.split.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 env from 'zrender/lib/core/env.js';\nimport { enableClassExtend, enableClassCheck } from '../util/clazz.js';\nimport { AreaStyleMixin } from './mixin/areaStyle.js';\nimport TextStyleMixin from './mixin/textStyle.js';\nimport { LineStyleMixin } from './mixin/lineStyle.js';\nimport { ItemStyleMixin } from './mixin/itemStyle.js';\nimport { mixin, clone, merge } from 'zrender/lib/core/util.js';\n\nvar Model =\n/** @class */\nfunction () {\n function Model(option, parentModel, ecModel) {\n this.parentModel = parentModel;\n this.ecModel = ecModel;\n this.option = option; // Simple optimization\n // if (this.init) {\n // if (arguments.length <= 4) {\n // this.init(option, parentModel, ecModel, extraOpt);\n // }\n // else {\n // this.init.apply(this, arguments);\n // }\n // }\n }\n\n Model.prototype.init = function (option, parentModel, ecModel) {\n var rest = [];\n\n for (var _i = 3; _i < arguments.length; _i++) {\n rest[_i - 3] = arguments[_i];\n }\n };\n /**\n * Merge the input option to me.\n */\n\n\n Model.prototype.mergeOption = function (option, ecModel) {\n merge(this.option, option, true);\n }; // `path` can be 'a.b.c', so the return value type have to be `ModelOption`\n // TODO: TYPE strict key check?\n // get(path: string | string[], ignoreParent?: boolean): ModelOption;\n\n\n Model.prototype.get = function (path, ignoreParent) {\n if (path == null) {\n return this.option;\n }\n\n return this._doGet(this.parsePath(path), !ignoreParent && this.parentModel);\n };\n\n Model.prototype.getShallow = function (key, ignoreParent) {\n var option = this.option;\n var val = option == null ? option : option[key];\n\n if (val == null && !ignoreParent) {\n var parentModel = this.parentModel;\n\n if (parentModel) {\n // FIXME:TS do not know how to make it works\n val = parentModel.getShallow(key);\n }\n }\n\n return val;\n }; // `path` can be 'a.b.c', so the return value type have to be `Model<ModelOption>`\n // getModel(path: string | string[], parentModel?: Model): Model;\n // TODO 'a.b.c' is deprecated\n\n\n Model.prototype.getModel = function (path, parentModel) {\n var hasPath = path != null;\n var pathFinal = hasPath ? this.parsePath(path) : null;\n var obj = hasPath ? this._doGet(pathFinal) : this.option;\n parentModel = parentModel || this.parentModel && this.parentModel.getModel(this.resolveParentPath(pathFinal));\n return new Model(obj, parentModel, this.ecModel);\n };\n /**\n * If model has option\n */\n\n\n Model.prototype.isEmpty = function () {\n return this.option == null;\n };\n\n Model.prototype.restoreData = function () {}; // Pending\n\n\n Model.prototype.clone = function () {\n var Ctor = this.constructor;\n return new Ctor(clone(this.option));\n }; // setReadOnly(properties): void {\n // clazzUtil.setReadOnly(this, properties);\n // }\n // If path is null/undefined, return null/undefined.\n\n\n Model.prototype.parsePath = function (path) {\n if (typeof path === 'string') {\n return path.split('.');\n }\n\n return path;\n }; // Resolve path for parent. Perhaps useful when parent use a different property.\n // Default to be a identity resolver.\n // Can be modified to a different resolver.\n\n\n Model.prototype.resolveParentPath = function (path) {\n return path;\n }; // FIXME:TS check whether put this method here\n\n\n Model.prototype.isAnimationEnabled = function () {\n if (!env.node && this.option) {\n if (this.option.animation != null) {\n return !!this.option.animation;\n } else if (this.parentModel) {\n return this.parentModel.isAnimationEnabled();\n }\n }\n };\n\n Model.prototype._doGet = function (pathArr, parentModel) {\n var obj = this.option;\n\n if (!pathArr) {\n return obj;\n }\n\n for (var i = 0; i < pathArr.length; i++) {\n // Ignore empty\n if (!pathArr[i]) {\n continue;\n } // obj could be number/string/... (like 0)\n\n\n obj = obj && _typeof(obj) === 'object' ? obj[pathArr[i]] : null;\n\n if (obj == null) {\n break;\n }\n }\n\n if (obj == null && parentModel) {\n obj = parentModel._doGet(this.resolveParentPath(pathArr), parentModel.parentModel);\n }\n\n return obj;\n };\n\n return Model;\n}();\n\n; // Enable Model.extend.\n\nenableClassExtend(Model);\nenableClassCheck(Model);\nmixin(Model, LineStyleMixin);\nmixin(Model, ItemStyleMixin);\nmixin(Model, AreaStyleMixin);\nmixin(Model, TextStyleMixin);\nexport default Model;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src啊/ElectronicMallVue/node_modules/echarts/lib/model/Model.js"],"names":["env","enableClassExtend","enableClassCheck","AreaStyleMixin","TextStyleMixin","LineStyleMixin","ItemStyleMixin","mixin","clone","merge","Model","option","parentModel","ecModel","prototype","init","rest","_i","arguments","length","mergeOption","get","path","ignoreParent","_doGet","parsePath","getShallow","key","val","getModel","hasPath","pathFinal","obj","resolveParentPath","isEmpty","restoreData","Ctor","constructor","split","isAnimationEnabled","node","animation","pathArr","i"],"mappings":";;;;AACA;AACA;AACA;AACA;AACA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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 env from 'zrender/lib/core/env.js';\nimport { enableClassExtend, enableClassCheck } from '../util/clazz.js';\nimport { AreaStyleMixin } from './mixin/areaStyle.js';\nimport TextStyleMixin from './mixin/textStyle.js';\nimport { LineStyleMixin } from './mixin/lineStyle.js';\nimport { ItemStyleMixin } from './mixin/itemStyle.js';\nimport { mixin, clone, merge } from 'zrender/lib/core/util.js';\n\nvar Model =\n/** @class */\nfunction () {\n function Model(option, parentModel, ecModel) {\n this.parentModel = parentModel;\n this.ecModel = ecModel;\n this.option = option; // Simple optimization\n // if (this.init) {\n // if (arguments.length <= 4) {\n // this.init(option, parentModel, ecModel, extraOpt);\n // }\n // else {\n // this.init.apply(this, arguments);\n // }\n // }\n }\n\n Model.prototype.init = function (option, parentModel, ecModel) {\n var rest = [];\n\n for (var _i = 3; _i < arguments.length; _i++) {\n rest[_i - 3] = arguments[_i];\n }\n };\n /**\n * Merge the input option to me.\n */\n\n\n Model.prototype.mergeOption = function (option, ecModel) {\n merge(this.option, option, true);\n }; // `path` can be 'a.b.c', so the return value type have to be `ModelOption`\n // TODO: TYPE strict key check?\n // get(path: string | string[], ignoreParent?: boolean): ModelOption;\n\n\n Model.prototype.get = function (path, ignoreParent) {\n if (path == null) {\n return this.option;\n }\n\n return this._doGet(this.parsePath(path), !ignoreParent && this.parentModel);\n };\n\n Model.prototype.getShallow = function (key, ignoreParent) {\n var option = this.option;\n var val = option == null ? option : option[key];\n\n if (val == null && !ignoreParent) {\n var parentModel = this.parentModel;\n\n if (parentModel) {\n // FIXME:TS do not know how to make it works\n val = parentModel.getShallow(key);\n }\n }\n\n return val;\n }; // `path` can be 'a.b.c', so the return value type have to be `Model<ModelOption>`\n // getModel(path: string | string[], parentModel?: Model): Model;\n // TODO 'a.b.c' is deprecated\n\n\n Model.prototype.getModel = function (path, parentModel) {\n var hasPath = path != null;\n var pathFinal = hasPath ? this.parsePath(path) : null;\n var obj = hasPath ? this._doGet(pathFinal) : this.option;\n parentModel = parentModel || this.parentModel && this.parentModel.getModel(this.resolveParentPath(pathFinal));\n return new Model(obj, parentModel, this.ecModel);\n };\n /**\n * If model has option\n */\n\n\n Model.prototype.isEmpty = function () {\n return this.option == null;\n };\n\n Model.prototype.restoreData = function () {}; // Pending\n\n\n Model.prototype.clone = function () {\n var Ctor = this.constructor;\n return new Ctor(clone(this.option));\n }; // setReadOnly(properties): void {\n // clazzUtil.setReadOnly(this, properties);\n // }\n // If path is null/undefined, return null/undefined.\n\n\n Model.prototype.parsePath = function (path) {\n if (typeof path === 'string') {\n return path.split('.');\n }\n\n return path;\n }; // Resolve path for parent. Perhaps useful when parent use a different property.\n // Default to be a identity resolver.\n // Can be modified to a different resolver.\n\n\n Model.prototype.resolveParentPath = function (path) {\n return path;\n }; // FIXME:TS check whether put this method here\n\n\n Model.prototype.isAnimationEnabled = function () {\n if (!env.node && this.option) {\n if (this.option.animation != null) {\n return !!this.option.animation;\n } else if (this.parentModel) {\n return this.parentModel.isAnimationEnabled();\n }\n }\n };\n\n Model.prototype._doGet = function (pathArr, parentModel) {\n var obj = this.option;\n\n if (!pathArr) {\n return obj;\n }\n\n for (var i = 0; i < pathArr.length; i++) {\n // Ignore empty\n if (!pathArr[i]) {\n continue;\n } // obj could be number/string/... (like 0)\n\n\n obj = obj && typeof obj === 'object' ? obj[pathArr[i]] : null;\n\n if (obj == null) {\n break;\n }\n }\n\n if (obj == null && parentModel) {\n obj = parentModel._doGet(this.resolveParentPath(pathArr), parentModel.parentModel);\n }\n\n return obj;\n };\n\n return Model;\n}();\n\n; // Enable Model.extend.\n\nenableClassExtend(Model);\nenableClassCheck(Model);\nmixin(Model, LineStyleMixin);\nmixin(Model, ItemStyleMixin);\nmixin(Model, AreaStyleMixin);\nmixin(Model, TextStyleMixin);\nexport default Model;"]},"metadata":{},"sourceType":"module"} |