datatables.net-select-dt 1.6.0 → 1.6.2

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-dt')(root, $);
29
18
  }
@@ -31,9 +20,28 @@
31
20
  if ( ! $.fn.dataTable.select ) {
32
21
  require('datatables.net-select')(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
  /*! DataTables styling wrapper for Select
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
- !function(n){"function"==typeof define&&define.amd?define(["jquery","datatables.net-dt","datatables.net-select"],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-dt")(e,t),t.fn.dataTable.select||require("datatables.net-select")(e,t),n(t,0,e.document)}:n(jQuery,window,document)}(function(e,t,n,d){"use strict";return e.fn.dataTable});
4
+ !function(n){var d,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net-dt","datatables.net-select"],function(e){return n(e,window,document)}):"object"==typeof exports?(d=require("jquery"),o=function(e,t){t.fn.dataTable||require("datatables.net-dt")(e,t),t.fn.dataTable.select||require("datatables.net-select")(e,t)},"undefined"!=typeof window?module.exports=function(e,t){return e=e||window,t=t||d(e),o(e,t),n(t,0,e.document)}:(o(window,d),module.exports=n(d,window,window.document))):n(jQuery,window,document)}(function(e,t,n,d){"use strict";return e.fn.dataTable});
@@ -8,5 +8,4 @@ import select from 'datatables.net-select';
8
8
 
9
9
 
10
10
 
11
-
12
11
  export default DataTable;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "module": "js/select.dataTables.mjs",
6
6
  "style": "css/select.dataTables.css",
7
7
  "types": "./types/types.d.ts",
8
- "version": "1.6.0",
8
+ "version": "1.6.2",
9
9
  "files": [
10
10
  "css/**/*.css",
11
11
  "js/**/*.js",
package/types/types.d.ts CHANGED
@@ -25,6 +25,13 @@ declare module 'datatables.net' {
25
25
  select: ApiSelect<Api<T>>
26
26
  }
27
27
 
28
+ interface ApiSelectorModifier {
29
+ /**
30
+ * Pick rows / columns / cells which are selected
31
+ */
32
+ selected?: boolean | undefined;
33
+ }
34
+
28
35
  interface ApiRowMethods<T> {
29
36
  /**
30
37
  * Select a row