@tanstack/table-core 8.20.5 → 8.21.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.
@@ -0,0 +1,2 @@
1
+ export declare function safelyAccessDocument(_document?: Document): Document | null;
2
+ export declare function safelyAccessDocumentEvent(event: Event): Document | null;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * table-core
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ 'use strict';
12
+
13
+ function safelyAccessDocument(_document) {
14
+ return _document || (typeof document !== 'undefined' ? document : null);
15
+ }
16
+
17
+ exports.safelyAccessDocument = safelyAccessDocument;
18
+ //# sourceMappingURL=document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sources":["../../../src/utils/document.ts"],"sourcesContent":["export function safelyAccessDocument(_document?: Document): Document | null {\n return _document || (typeof document !== 'undefined' ? document : null)\n}\n\nexport function safelyAccessDocumentEvent(event: Event): Document | null {\n return !!event &&\n !!event.target &&\n typeof event.target === 'object' &&\n 'ownerDocument' in event.target\n ? (event.target.ownerDocument as Document | null)\n : null\n}\n"],"names":["safelyAccessDocument","_document","document"],"mappings":";;;;;;;;;;;;AAAO,SAASA,oBAAoBA,CAACC,SAAoB,EAAmB;EAC1E,OAAOA,SAAS,KAAK,OAAOC,QAAQ,KAAK,WAAW,GAAGA,QAAQ,GAAG,IAAI,CAAC,CAAA;AACzE;;;;"}
@@ -623,7 +623,7 @@
623
623
  var _row$getValue4;
624
624
  return (_row$getValue4 = row.getValue(columnId)) == null ? void 0 : _row$getValue4.includes(filterValue);
625
625
  };
626
- arrIncludes.autoRemove = val => testFalsey(val) || !(val != null && val.length);
626
+ arrIncludes.autoRemove = val => testFalsey(val);
627
627
  const arrIncludesAll = (row, columnId, filterValue) => {
628
628
  return !filterValue.some(val => {
629
629
  var _row$getValue5;
@@ -1214,6 +1214,10 @@
1214
1214
  }
1215
1215
  };
1216
1216
 
1217
+ function safelyAccessDocument(_document) {
1218
+ return _document || (typeof document !== 'undefined' ? document : null);
1219
+ }
1220
+
1217
1221
  //
1218
1222
 
1219
1223
  //
@@ -1353,7 +1357,7 @@
1353
1357
  columnSizingStart: []
1354
1358
  }));
1355
1359
  };
1356
- const contextDocument = _contextDocument || typeof document !== 'undefined' ? document : null;
1360
+ const contextDocument = safelyAccessDocument(_contextDocument);
1357
1361
  const mouseEvents = {
1358
1362
  moveHandler: e => onMove(e.clientX),
1359
1363
  upHandler: e => {