UNPKG

@mongodb-js/charts-embed-dom

Version:

JavaScript library for embedding MongoDB Charts

22 lines (21 loc) 846 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const event_source_1 = require("./mixins/event-source"); const refreshable_1 = require("./mixins/refreshable"); const common_chart_1 = require("./mixins/common-chart"); const filterable_1 = require("./mixins/filterable"); class DashboardChartEventSender { constructor(chartId, dashboard) { this.chartId = chartId; this.dashboard = dashboard; } /** * Send message to embedded app via dashboard. */ _send(msgName, ...payload) { return this.dashboard._send(msgName, ...payload, this.chartId); } } class DashboardChart extends (0, common_chart_1.CommonChart)((0, filterable_1.Filterable)((0, refreshable_1.Refreshable)((0, event_source_1.EventSource)(DashboardChartEventSender)))) { } exports.default = DashboardChart;