From 444fa03f2a6048ce16ad79e8606e61421774bb15 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Fri, 3 Mar 2023 15:31:41 +0000 Subject: [PATCH] c0ce909a29e2dfe354b85597177b72b069b6354c Dev: Moving on version Sync to source repo @c0ce909a29e2dfe354b85597177b72b069b6354c --- datatables.json | 2 +- js/buttons.semanticui.js | 38 ++++++++++++++++++++++-------------- js/buttons.semanticui.min.js | 2 +- js/buttons.semanticui.mjs | 1 - 4 files changed, 25 insertions(+), 18 deletions(-) diff --git a/datatables.json b/datatables.json index 85273ce..9dd7c31 100644 --- a/datatables.json +++ b/datatables.json @@ -15,5 +15,5 @@ ], "src-repo": "http://github.com/DataTables/Buttons", "last-tag": "2.3.5", - "last-sync": "0b1fd42649697aed4f72490eb3c702ded00d79dd" + "last-sync": "c0ce909a29e2dfe354b85597177b72b069b6354c" } \ No newline at end of file diff --git a/js/buttons.semanticui.js b/js/buttons.semanticui.js index 8e4fa8e..dc0503f 100644 --- a/js/buttons.semanticui.js +++ b/js/buttons.semanticui.js @@ -11,19 +11,8 @@ } else if ( typeof exports === 'object' ) { // CommonJS - module.exports = function (root, $) { - if ( ! root ) { - // CommonJS environments without a window global must pass a - // root. This will give an error otherwise - root = window; - } - - if ( ! $ ) { - $ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window - require('jquery') : - require('jquery')( root ); - } - + var jq = require('jquery'); + var cjsRequires = function (root, $) { if ( ! $.fn.dataTable ) { require('datatables.net-se')(root, $); } @@ -31,9 +20,28 @@ if ( ! $.fn.dataTable.Buttons ) { require('datatables.net-buttons')(root, $); } - - return factory( $, root, root.document ); }; + + if (typeof window !== 'undefined') { + module.exports = function (root, $) { + if ( ! root ) { + // CommonJS environments without a window global must pass a + // root. This will give an error otherwise + root = window; + } + + if ( ! $ ) { + $ = jq( root ); + } + + cjsRequires( root, $ ); + return factory( $, root, root.document ); + }; + } + else { + cjsRequires( window, jq ); + module.exports = factory( jq, window, window.document ); + } } else { // Browser diff --git a/js/buttons.semanticui.min.js b/js/buttons.semanticui.min.js index c470e05..94ba298 100644 --- a/js/buttons.semanticui.min.js +++ b/js/buttons.semanticui.min.js @@ -1,4 +1,4 @@ /*! Bootstrap integration for DataTables' Buttons * ©2016 SpryMedia Ltd - datatables.net/license */ -!function(e){"function"==typeof define&&define.amd?define(["jquery","datatables.net-se","datatables.net-buttons"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t=t||window,(n=n||("undefined"!=typeof window?require("jquery"):require("jquery")(t))).fn.dataTable||require("datatables.net-se")(t,n),n.fn.dataTable.Buttons||require("datatables.net-buttons")(t,n),e(n,0,t.document)}:e(jQuery,window,document)}(function(n,t,e,o){"use strict";var a=n.fn.dataTable;return n.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons ui basic buttons"},button:{tag:"button",className:"dt-button ui button",spacerClass:"dt-button ui button"},collection:{tag:"div",className:"ui basic vertical buttons",closeButton:!1},splitWrapper:{tag:"div",className:"dt-btn-split-wrapper buttons",closeButton:!1},splitDropdown:{tag:"button",text:"▼",className:"ui floating button dt-btn-split-drop dropdown icon",closeButton:!1},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button ui button",closeButton:!1}}}),n(e).on("buttons-popover.dt",function(){var t=!1;n(".dtsp-panesContainer").each(function(){n(this).is("button")||(t=!0)}),t&&n(".dtsp-panesContainer").removeClass("vertical buttons")}),a}); \ No newline at end of file +!function(o){var e,a;"function"==typeof define&&define.amd?define(["jquery","datatables.net-se","datatables.net-buttons"],function(t){return o(t,window,document)}):"object"==typeof exports?(e=require("jquery"),a=function(t,n){n.fn.dataTable||require("datatables.net-se")(t,n),n.fn.dataTable.Buttons||require("datatables.net-buttons")(t,n)},"undefined"!=typeof window?module.exports=function(t,n){return t=t||window,n=n||e(t),a(t,n),o(n,0,t.document)}:(a(window,e),module.exports=o(e,window,window.document))):o(jQuery,window,document)}(function(n,t,o,e){"use strict";var a=n.fn.dataTable;return n.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons ui basic buttons"},button:{tag:"button",className:"dt-button ui button",spacerClass:"dt-button ui button"},collection:{tag:"div",className:"ui basic vertical buttons",closeButton:!1},splitWrapper:{tag:"div",className:"dt-btn-split-wrapper buttons",closeButton:!1},splitDropdown:{tag:"button",text:"▼",className:"ui floating button dt-btn-split-drop dropdown icon",closeButton:!1},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button ui button",closeButton:!1}}}),n(o).on("buttons-popover.dt",function(){var t=!1;n(".dtsp-panesContainer").each(function(){n(this).is("button")||(t=!0)}),t&&n(".dtsp-panesContainer").removeClass("vertical buttons")}),a}); \ No newline at end of file diff --git a/js/buttons.semanticui.mjs b/js/buttons.semanticui.mjs index 9c3a0d3..89a923c 100644 --- a/js/buttons.semanticui.mjs +++ b/js/buttons.semanticui.mjs @@ -7,7 +7,6 @@ import DataTable from 'datatables.net-se'; import Buttons from 'datatables.net-buttons'; - $.extend( true, DataTable.Buttons.defaults, { dom: { container: {