export.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. /**
  20. * Do not mount those modules on 'src/echarts' for better tree shaking.
  21. */
  22. import * as zrender from 'zrender/src/zrender';
  23. import * as matrix from 'zrender/src/core/matrix';
  24. import * as vector from 'zrender/src/core/vector';
  25. import * as zrUtil from 'zrender/src/core/util';
  26. import * as colorTool from 'zrender/src/tool/color';
  27. import * as graphicUtil from './util/graphic';
  28. import * as numberUtil from './util/number';
  29. import * as formatUtil from './util/format';
  30. import {throttle} from './util/throttle';
  31. import * as ecHelper from './helper';
  32. import parseGeoJSON from './coord/geo/parseGeoJson';
  33. export {zrender};
  34. export {default as List} from './data/List';
  35. export {default as Model} from './model/Model';
  36. export {default as Axis} from './coord/Axis';
  37. export {numberUtil as number};
  38. export {formatUtil as format};
  39. export {throttle};
  40. export {ecHelper as helper};
  41. export {matrix};
  42. export {vector};
  43. export {colorTool as color};
  44. export {default as env} from 'zrender/src/core/env';
  45. export {parseGeoJSON};
  46. export var parseGeoJson = parseGeoJSON;
  47. var ecUtil = {};
  48. zrUtil.each(
  49. [
  50. 'map', 'each', 'filter', 'indexOf', 'inherits', 'reduce', 'filter',
  51. 'bind', 'curry', 'isArray', 'isString', 'isObject', 'isFunction',
  52. 'extend', 'defaults', 'clone', 'merge'
  53. ],
  54. function (name) {
  55. ecUtil[name] = zrUtil[name];
  56. }
  57. );
  58. export {ecUtil as util};
  59. var graphic = {};
  60. zrUtil.each(
  61. [
  62. 'extendShape', 'extendPath', 'makePath', 'makeImage',
  63. 'mergePath', 'resizePath', 'createIcon',
  64. 'setHoverStyle', 'setLabelStyle', 'setTextStyle', 'setText',
  65. 'getFont', 'updateProps', 'initProps', 'getTransform',
  66. 'clipPointsByRect', 'clipRectByRect',
  67. 'registerShape', 'getShapeClass',
  68. 'Group',
  69. 'Image',
  70. 'Text',
  71. 'Circle',
  72. 'Sector',
  73. 'Ring',
  74. 'Polygon',
  75. 'Polyline',
  76. 'Rect',
  77. 'Line',
  78. 'BezierCurve',
  79. 'Arc',
  80. 'IncrementalDisplayable',
  81. 'CompoundPath',
  82. 'LinearGradient',
  83. 'RadialGradient',
  84. 'BoundingRect'
  85. ],
  86. function (name) {
  87. graphic[name] = graphicUtil[name];
  88. }
  89. );
  90. export {graphic};