UNPKG

vue-flexmonster

Version:

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

196 lines (172 loc) 6.33 kB
'use strict';var vue=require('vue'),Flexmonster=require('flexmonster');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var Flexmonster__default=/*#__PURE__*/_interopDefaultLegacy(Flexmonster);function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }var script = /*#__PURE__*/vue.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 mounted() { this.flexmonster = new Flexmonster__default["default"](_objectSpread2(_objectSpread2({}, this.$props), {}, { container: this.$el })); }, unmounted: function unmounted() { if (this.flexmonster) { this.flexmonster.dispose(); this.flexmonster = null; } }, beforeUpdate: function beforeUpdate() { return false; } });function render(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.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 component = /*#__PURE__*/(function () { // Get component instance var installable = script; // Attach install function executed by Vue.use() installable.install = function (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; var namedExports=/*#__PURE__*/Object.freeze({__proto__:null,'default':component});// only expose one global var, with named exports exposed as properties of // that global var (eg. plugin.namedExport) Object.entries(namedExports).forEach(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), exportName = _ref2[0], exported = _ref2[1]; if (exportName !== 'default') component[exportName] = exported; });module.exports=component;