Path: blob/main/dev-docs/feature-format-matrix/dist/js/jquery_wrapper.js
3562 views
/*1* This file is part of the Tabulator package.2*3* (c) Oliver Folkerd <[email protected]>4*5* For the full copyright and license information, please view the LICENSE6* file that was distributed with this source code.7*8* Full Documentation & Demos can be found at: http://olifolkerd.github.io/tabulator/9*10*/1112(function (root, factory) {13"use strict";14if (typeof define === 'function' && define.amd) {15define(['jquery', 'tabulator', 'jquery-ui'], factory);16}17else if(typeof module !== 'undefined' && module.exports) {18module.exports = factory(19require('jquery'),20require('tabulator'),21require('jquery-ui')22);23}24else {25factory(root.jQuery, root.Tabulator);26}27}(this, function ($, Tabulator) {2829$.widget("ui.tabulator", {30_create:function(){31var options = Object.assign({}, this.options);32var props = [];3334delete options.create;35delete options.disabled;3637this.table = new Tabulator(this.element[0], options);38window.table = this.table;3940//retrieve properties on prototype41props = Object.getOwnPropertyNames(Object.getPrototypeOf(Object.getPrototypeOf(this.table)));4243//retrieve properties added by modules44props = props.concat(Object.getOwnPropertyNames(this.table));4546//map tabulator functions to jquery wrapper47for(let key of props){48if(typeof this.table[key] === "function" && key.charAt(0) !== "_"){49this[key] = this.table[key].bind(this.table);50}51}52},5354_setOption: function(option, value){55console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated");56},5758_destroy: function(option, value){59this.table.destroy();60},61});62}));636465