lab.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Lab = exports.notice = exports.Stage = void 0;
  4. var mix_1 = require("./plots/mix");
  5. /** 实验室图表所处的阶段 */
  6. var Stage;
  7. (function (Stage) {
  8. Stage["DEV"] = "DEV";
  9. Stage["BETA"] = "BETA";
  10. Stage["STABLE"] = "STABLE";
  11. })(Stage = exports.Stage || (exports.Stage = {}));
  12. /**
  13. * 不同阶段打印一些消息给开发者
  14. * @param stage
  15. */
  16. function notice(stage, plotType) {
  17. console.warn(stage === Stage.DEV
  18. ? "Plot '".concat(plotType, "' is in DEV stage, just give us issues.")
  19. : stage === Stage.BETA
  20. ? "Plot '".concat(plotType, "' is in BETA stage, DO NOT use it in production env.")
  21. : stage === Stage.STABLE
  22. ? "Plot '".concat(plotType, "' is in STABLE stage, import it by \"import { ").concat(plotType, " } from '@antv/g2plot'\".")
  23. : 'invalid Stage type.');
  24. }
  25. exports.notice = notice;
  26. /**
  27. * 实验室图表,实验室中的图表分成不同的阶段。
  28. */
  29. var Lab = /** @class */ (function () {
  30. function Lab() {
  31. }
  32. Object.defineProperty(Lab, "MultiView", {
  33. get: function () {
  34. notice(Stage.STABLE, 'MultiView');
  35. return mix_1.Mix;
  36. },
  37. enumerable: false,
  38. configurable: true
  39. });
  40. return Lab;
  41. }());
  42. exports.Lab = Lab;
  43. //# sourceMappingURL=lab.js.map