datatables.net-autofill-se 2.5.2 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,19 +11,8 @@
11
11
  }
12
12
  else if ( typeof exports === 'object' ) {
13
13
  // CommonJS
14
- module.exports = function (root, $) {
15
- if ( ! root ) {
16
- // CommonJS environments without a window global must pass a
17
- // root. This will give an error otherwise
18
- root = window;
19
- }
20
-
21
- if ( ! $ ) {
22
- $ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window
23
- require('jquery') :
24
- require('jquery')( root );
25
- }
26
-
14
+ var jq = require('jquery');
15
+ var cjsRequires = function (root, $) {
27
16
  if ( ! $.fn.dataTable ) {
28
17
  require('datatables.net-se')(root, $);
29
18
  }
@@ -31,9 +20,28 @@
31
20
  if ( ! $.fn.dataTable.AutoFill ) {
32
21
  require('datatables.net-autofill')(root, $);
33
22
  }
34
-
35
- return factory( $, root, root.document );
36
23
  };
24
+
25
+ if (typeof window !== 'undefined') {
26
+ module.exports = function (root, $) {
27
+ if ( ! root ) {
28
+ // CommonJS environments without a window global must pass a
29
+ // root. This will give an error otherwise
30
+ root = window;
31
+ }
32
+
33
+ if ( ! $ ) {
34
+ $ = jq( root );
35
+ }
36
+
37
+ cjsRequires( root, $ );
38
+ return factory( $, root, root.document );
39
+ };
40
+ }
41
+ else {
42
+ cjsRequires( window, jq );
43
+ module.exports = factory( jq, window, window.document );
44
+ }
37
45
  }
38
46
  else {
39
47
  // Browser
@@ -1,4 +1,4 @@
1
1
  /*! Bootstrap integration for DataTables' AutoFill
2
2
  * ©2015 SpryMedia Ltd - datatables.net/license
3
3
  */
4
- !function(n){"function"==typeof define&&define.amd?define(["jquery","datatables.net-se","datatables.net-autofill"],function(e){return n(e,window,document)}):"object"==typeof exports?module.exports=function(e,t){return e=e||window,(t=t||("undefined"!=typeof window?require("jquery"):require("jquery")(e))).fn.dataTable||require("datatables.net-se")(e,t),t.fn.dataTable.AutoFill||require("datatables.net-autofill")(e,t),n(t,0,e.document)}:n(jQuery,window,document)}(function(e,t,n,u){"use strict";e=e.fn.dataTable;return e.AutoFill.classes.btn="ui button",e});
4
+ !function(n){var o,u;"function"==typeof define&&define.amd?define(["jquery","datatables.net-se","datatables.net-autofill"],function(e){return n(e,window,document)}):"object"==typeof exports?(o=require("jquery"),u=function(e,t){t.fn.dataTable||require("datatables.net-se")(e,t),t.fn.dataTable.AutoFill||require("datatables.net-autofill")(e,t)},"undefined"!=typeof window?module.exports=function(e,t){return e=e||window,t=t||o(e),u(e,t),n(t,0,e.document)}:(u(window,o),module.exports=n(o,window,window.document))):n(jQuery,window,document)}(function(e,t,n,o){"use strict";e=e.fn.dataTable;return e.AutoFill.classes.btn="ui button",e});
@@ -7,7 +7,6 @@ import DataTable from 'datatables.net-se';
7
7
  import AutoFill from 'datatables.net-autofill';
8
8
 
9
9
 
10
-
11
10
  DataTable.AutoFill.classes.btn = 'ui button';
12
11
 
13
12
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "module": "js/autoFill.semanticui.mjs",
6
6
  "style": "css/autoFill.semanticui.css",
7
7
  "types": "./types/types.d.ts",
8
- "version": "2.5.2",
8
+ "version": "2.5.3",
9
9
  "files": [
10
10
  "css/**/*.css",
11
11
  "js/**/*.js",