@tanstack/react-table 8.0.0-alpha.86 → 8.0.0-alpha.87

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.
@@ -2669,7 +2669,7 @@ var drawChart = (function (exports) {
2669
2669
  </script>
2670
2670
  <script>
2671
2671
  /*<!--*/
2672
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"74a1-127"},{"name":"react-table/src/index.tsx","uid":"74a1-129"}]}]}],"isRoot":true},"nodeParts":{"74a1-127":{"renderedLength":137358,"gzipLength":23347,"brotliLength":0,"mainUid":"74a1-126"},"74a1-129":{"renderedLength":2102,"gzipLength":836,"brotliLength":0,"mainUid":"74a1-128"}},"nodeMetas":{"74a1-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"74a1-127"},"imported":[],"importedBy":[{"uid":"74a1-128"}]},"74a1-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"74a1-129"},"imported":[{"uid":"74a1-130"},{"uid":"74a1-126"}],"importedBy":[],"isEntry":true},"74a1-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"74a1-128"}],"isExternal":true}},"env":{"rollup":"2.70.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
2672
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"3258-127"},{"name":"react-table/src/index.tsx","uid":"3258-129"}]}]}],"isRoot":true},"nodeParts":{"3258-127":{"renderedLength":137395,"gzipLength":23363,"brotliLength":0,"mainUid":"3258-126"},"3258-129":{"renderedLength":2102,"gzipLength":836,"brotliLength":0,"mainUid":"3258-128"}},"nodeMetas":{"3258-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"3258-127"},"imported":[],"importedBy":[{"uid":"3258-128"}]},"3258-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"3258-129"},"imported":[{"uid":"3258-130"},{"uid":"3258-126"}],"importedBy":[],"isEntry":true},"3258-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"3258-128"}],"isExternal":true}},"env":{"rollup":"2.70.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
2673
2673
 
2674
2674
  const run = () => {
2675
2675
  const width = window.innerWidth;
@@ -11,11 +11,11 @@
11
11
  "children": [
12
12
  {
13
13
  "name": "table-core/build/esm/index.js",
14
- "uid": "74a1-132"
14
+ "uid": "3258-132"
15
15
  },
16
16
  {
17
17
  "name": "react-table/src/index.tsx",
18
- "uid": "74a1-134"
18
+ "uid": "3258-134"
19
19
  }
20
20
  ]
21
21
  }
@@ -25,55 +25,55 @@
25
25
  "isRoot": true
26
26
  },
27
27
  "nodeParts": {
28
- "74a1-132": {
29
- "renderedLength": 137358,
30
- "gzipLength": 23347,
28
+ "3258-132": {
29
+ "renderedLength": 137395,
30
+ "gzipLength": 23363,
31
31
  "brotliLength": 0,
32
- "mainUid": "74a1-131"
32
+ "mainUid": "3258-131"
33
33
  },
34
- "74a1-134": {
34
+ "3258-134": {
35
35
  "renderedLength": 2102,
36
36
  "gzipLength": 836,
37
37
  "brotliLength": 0,
38
- "mainUid": "74a1-133"
38
+ "mainUid": "3258-133"
39
39
  }
40
40
  },
41
41
  "nodeMetas": {
42
- "74a1-131": {
42
+ "3258-131": {
43
43
  "id": "/packages/table-core/build/esm/index.js",
44
44
  "moduleParts": {
45
- "index.production.js": "74a1-132"
45
+ "index.production.js": "3258-132"
46
46
  },
47
47
  "imported": [],
48
48
  "importedBy": [
49
49
  {
50
- "uid": "74a1-133"
50
+ "uid": "3258-133"
51
51
  }
52
52
  ]
53
53
  },
54
- "74a1-133": {
54
+ "3258-133": {
55
55
  "id": "/packages/react-table/src/index.tsx",
56
56
  "moduleParts": {
57
- "index.production.js": "74a1-134"
57
+ "index.production.js": "3258-134"
58
58
  },
59
59
  "imported": [
60
60
  {
61
- "uid": "74a1-135"
61
+ "uid": "3258-135"
62
62
  },
63
63
  {
64
- "uid": "74a1-131"
64
+ "uid": "3258-131"
65
65
  }
66
66
  ],
67
67
  "importedBy": [],
68
68
  "isEntry": true
69
69
  },
70
- "74a1-135": {
70
+ "3258-135": {
71
71
  "id": "react",
72
72
  "moduleParts": {},
73
73
  "imported": [],
74
74
  "importedBy": [
75
75
  {
76
- "uid": "74a1-133"
76
+ "uid": "3258-133"
77
77
  }
78
78
  ],
79
79
  "isExternal": true
@@ -2364,21 +2364,54 @@
2364
2364
  }
2365
2365
 
2366
2366
  const reSplitAlphaNumeric = /([0-9]+)/gm;
2367
- const sortingFns = {
2368
- alphanumeric,
2369
- alphanumericCaseSensitive,
2370
- text,
2371
- textCaseSensitive,
2372
- datetime,
2373
- basic
2374
- };
2375
2367
 
2376
- function alphanumeric(rowA, rowB, columnId) {
2368
+ const alphanumeric = (rowA, rowB, columnId) => {
2377
2369
  return compareAlphanumeric(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());
2378
- }
2370
+ };
2379
2371
 
2380
- function alphanumericCaseSensitive(rowA, rowB, columnId) {
2372
+ const alphanumericCaseSensitive = (rowA, rowB, columnId) => {
2381
2373
  return compareAlphanumeric(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));
2374
+ }; // The text filter is more basic (less numeric support)
2375
+ // but is much faster
2376
+
2377
+
2378
+ const text = (rowA, rowB, columnId) => {
2379
+ return compareBasic(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());
2380
+ }; // The text filter is more basic (less numeric support)
2381
+ // but is much faster
2382
+
2383
+
2384
+ const textCaseSensitive = (rowA, rowB, columnId) => {
2385
+ return compareBasic(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));
2386
+ };
2387
+
2388
+ const datetime = (rowA, rowB, columnId) => {
2389
+ return compareBasic(rowA.getValue(columnId).getTime(), rowB.getValue(columnId).getTime());
2390
+ };
2391
+
2392
+ const basic = (rowA, rowB, columnId) => {
2393
+ return compareBasic(rowA.getValue(columnId), rowB.getValue(columnId));
2394
+ }; // Utils
2395
+
2396
+
2397
+ function compareBasic(a, b) {
2398
+ return a === b ? 0 : a > b ? 1 : -1;
2399
+ }
2400
+
2401
+ function toString(a) {
2402
+ if (typeof a === 'number') {
2403
+ if (isNaN(a) || a === Infinity || a === -Infinity) {
2404
+ return '';
2405
+ }
2406
+
2407
+ return String(a);
2408
+ }
2409
+
2410
+ if (typeof a === 'string') {
2411
+ return a;
2412
+ }
2413
+
2414
+ return '';
2382
2415
  } // Mixed sorting is slow, but very inclusive of many edge cases.
2383
2416
  // It handles numbers, mixed alphanumeric combinations, and even
2384
2417
  // null, undefined, and Infinity
@@ -2425,48 +2458,17 @@
2425
2458
  }
2426
2459
 
2427
2460
  return a.length - b.length;
2428
- } // The text filter is more basic (less numeric support)
2429
- // but is much faster
2430
-
2431
-
2432
- function text(rowA, rowB, columnId) {
2433
- return compareBasic(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());
2434
- } // The text filter is more basic (less numeric support)
2435
- // but is much faster
2436
-
2437
-
2438
- function textCaseSensitive(rowA, rowB, columnId) {
2439
- return compareBasic(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));
2440
- }
2441
-
2442
- function datetime(rowA, rowB, columnId) {
2443
- return compareBasic(rowA.getValue(columnId).getTime(), rowB.getValue(columnId).getTime());
2444
- }
2445
-
2446
- function basic(rowA, rowB, columnId) {
2447
- return compareBasic(rowA.getValue(columnId), rowB.getValue(columnId));
2448
- } // Utils
2449
-
2450
-
2451
- function compareBasic(a, b) {
2452
- return a === b ? 0 : a > b ? 1 : -1;
2453
- }
2454
-
2455
- function toString(a) {
2456
- if (typeof a === 'number') {
2457
- if (isNaN(a) || a === Infinity || a === -Infinity) {
2458
- return '';
2459
- }
2461
+ } // Exports
2460
2462
 
2461
- return String(a);
2462
- }
2463
-
2464
- if (typeof a === 'string') {
2465
- return a;
2466
- }
2467
2463
 
2468
- return '';
2469
- }
2464
+ const sortingFns = {
2465
+ alphanumeric,
2466
+ alphanumericCaseSensitive,
2467
+ text,
2468
+ textCaseSensitive,
2469
+ datetime,
2470
+ basic
2471
+ };
2470
2472
 
2471
2473
  //
2472
2474
  const Sorting = {