@tanstack/table-core 8.21.2 → 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.
- package/build/lib/features/ColumnSizing.js +2 -1
- package/build/lib/features/ColumnSizing.js.map +1 -1
- package/build/lib/index.esm.js +5 -1
- package/build/lib/index.esm.js.map +1 -1
- package/build/lib/index.mjs +5 -1
- package/build/lib/index.mjs.map +1 -1
- package/build/lib/utils/document.d.ts +2 -0
- package/build/lib/utils/document.js +18 -0
- package/build/lib/utils/document.js.map +1 -0
- package/build/umd/index.development.js +5 -1
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/features/ColumnSizing.ts +2 -2
- package/src/utils/document.ts +12 -0
|
@@ -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;;;;"}
|
|
@@ -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
|
|
1360
|
+
const contextDocument = safelyAccessDocument(_contextDocument);
|
|
1357
1361
|
const mouseEvents = {
|
|
1358
1362
|
moveHandler: e => onMove(e.clientX),
|
|
1359
1363
|
upHandler: e => {
|