index.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = void 0;
  4. var _translation = require("@superset-ui/translation");
  5. var _chart = require("@superset-ui/chart");
  6. var _transformProps = _interopRequireDefault(require("./transformProps"));
  7. var _thumbnail = _interopRequireDefault(require("./images/thumbnail.png"));
  8. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9. function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
  10. function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
  11. const metadata = new _chart.ChartMetadata({
  12. description: '',
  13. name: (0, _translation.t)('Partition Chart'),
  14. thumbnail: _thumbnail.default,
  15. useLegacyApi: true
  16. });
  17. class PartitionChartPlugin extends _chart.ChartPlugin {
  18. constructor() {
  19. super({
  20. loadChart: () => Promise.resolve().then(() => _interopRequireWildcard(require('./ReactPartition.js'))),
  21. metadata,
  22. transformProps: _transformProps.default
  23. });
  24. }
  25. }
  26. exports.default = PartitionChartPlugin;