UNPKG

vue-flexmonster

Version:

Vue 2 and Vue 3 wrapper for Flexmonster Pivot Table and Charts

102 lines (91 loc) 2.86 kB
import { defineComponent, openBlock, createElementBlock } from 'vue'; import Flexmonster from 'flexmonster'; var script = /*#__PURE__*/defineComponent({ name: 'Pivot', // vue component name props: { afterchartdraw: Function, aftergriddraw: Function, beforegriddraw: Function, beforetoolbarcreated: Function, cellclick: Function, celldoubleclick: Function, componentFolder: String, customizeAPIRequest: Function, customizeCell: Function, customizeChartElement: Function, customizeContextMenu: Function, datachanged: Function, dataerror: Function, datafilecancelled: Function, dataloaded: Function, drillthroughclose: Function, drillthroughopen: Function, fieldslistclose: Function, fieldslistopen: Function, filterclose: Function, filteropen: Function, fullscreen: Function, global: Object, height: [String, Number], licenseKey: [String, Array], licenseFilePath: String, loadingdata: Function, loadinglocalization: Function, loadingolapstructure: Function, loadingreportfile: Function, localizationerror: Function, localizationloaded: Function, olapstructureerror: Function, olapstructureloaded: Function, openingreportfile: Function, querycomplete: Function, queryerror: Function, ready: Function, report: [String, Object], reportchange: Function, reportcomplete: Function, reportfilecancelled: Function, reportfileerror: Function, runningquery: Function, sortFieldsList: Function, toolbar: Boolean, unauthorizederror: Function, update: Function, width: [Number, String], accessibility: Object, shareReportConnection: Object }, mounted: function () { this.flexmonster = new Flexmonster({ ...this.$props, container: this.$el }); }, unmounted: function () { if (this.flexmonster) { this.flexmonster.dispose(); this.flexmonster = null; } }, beforeUpdate() { return false; } }); function render(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", null, "Pivot"); } script.render = render; // Import vue component // IIFE injects install function into component, allowing component // to be registered via Vue.use() as well as Vue.component(), var entry_esm = /*#__PURE__*/(() => { // Get component instance const installable = script; // Attach install function executed by Vue.use() installable.install = app => { app.component('Pivot', installable); }; return installable; })(); // It's possible to expose named exports when writing components that can // also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; // export const RollupDemoDirective = directive; export { entry_esm as default };