@kanunilabs/pivotgrid-react 1.8.2 → 1.8.4
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/dist/index.cjs +2 -2
- package/dist/index.d.cts +172 -34
- package/dist/index.d.ts +172 -34
- package/dist/index.js +2 -2
- package/dist/styles.css +224 -41
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -844,9 +844,15 @@
|
|
|
844
844
|
position: fixed;
|
|
845
845
|
left: 50%;
|
|
846
846
|
top: 50%;
|
|
847
|
-
transform
|
|
847
|
+
/* `translate`, not `transform`: the zoom-in animation animates `transform`,
|
|
848
|
+
and while it ran (0.2s) the centring was lost and the dialog flew in from
|
|
849
|
+
the lower right — on a phone, half off the screen. */
|
|
850
|
+
translate: -50% -50%;
|
|
848
851
|
width: 100%;
|
|
849
|
-
|
|
852
|
+
/* Never wider than the window (Tekax B.42): the settings dialog's 400px
|
|
853
|
+
ran off a 360-390px phone. An inline width still asks for its own size,
|
|
854
|
+
this caps it; both renderers share the rule. */
|
|
855
|
+
max-width: min(450px, calc(100vw - 16px));
|
|
850
856
|
background-color: var(--pivot-modal-bg);
|
|
851
857
|
border: 1px solid var(--pivot-border);
|
|
852
858
|
border-radius: var(--pivot-border-radius-lg);
|
|
@@ -1180,22 +1186,109 @@
|
|
|
1180
1186
|
}
|
|
1181
1187
|
|
|
1182
1188
|
/* Touch drag needs the gesture, and the browser claims it first.
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
the
|
|
1189
|
+
|
|
1190
|
+
The plain JS renderer drags on POINTER events and starts after a hold
|
|
1191
|
+
(touchDragDelay, 200 ms by default). Once the browser starts panning it
|
|
1192
|
+
sends pointercancel, so its chips must claim the gesture outright with
|
|
1193
|
+
`touch-action: none` (#195). Scope matters: a strip chip drags from
|
|
1194
|
+
anywhere, so the whole chip claims it; a CHOOSER chip drags only from its
|
|
1195
|
+
grip and lives in a long scrollable list, so only the grip does.
|
|
1196
|
+
|
|
1197
|
+
The React renderer drags on TOUCH events after the same hold (Tekax
|
|
1198
|
+
B.35). Its sensor cancels the hold when the finger moves first and
|
|
1199
|
+
prevents the default of every touchmove after it, so a chip can let the
|
|
1200
|
+
page pan: a quick swipe over a chip scrolls, a hold then a move drags.
|
|
1201
|
+
Its chips carry data-touch-hold. */
|
|
1193
1202
|
.kanuni-pivot-field-chip:not([data-drag-scope='grip']) {
|
|
1194
1203
|
touch-action: none;
|
|
1195
1204
|
}
|
|
1196
1205
|
[data-drag-grip] {
|
|
1197
1206
|
touch-action: none;
|
|
1198
1207
|
}
|
|
1208
|
+
.kanuni-pivot-field-chip[data-touch-hold],
|
|
1209
|
+
[data-drag-grip][data-touch-hold] {
|
|
1210
|
+
touch-action: manipulation;
|
|
1211
|
+
-webkit-touch-callout: none;
|
|
1212
|
+
-webkit-user-select: none;
|
|
1213
|
+
user-select: none;
|
|
1214
|
+
}
|
|
1215
|
+
/* The chooser's drag handle is a 44x44 target on touch (B.41, the B.22
|
|
1216
|
+
standard), the same size as the chip's own buttons. */
|
|
1217
|
+
.kanuni-pivot-field-chip [data-drag-grip] {
|
|
1218
|
+
min-width: 44px;
|
|
1219
|
+
min-height: 44px;
|
|
1220
|
+
display: inline-flex;
|
|
1221
|
+
align-items: center;
|
|
1222
|
+
justify-content: center;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
/* Tekax B.48 / B.49: the pivot's chips on touch. The filter and remove
|
|
1226
|
+
buttons were 2 x 44px that never shrank: in a 109px (iPad) or 56px
|
|
1227
|
+
(phone) row header the caption went to 0, and the buttons — at opacity
|
|
1228
|
+
0, with no hover to raise them — still took the taps (a tap filtered,
|
|
1229
|
+
the right edge removed the field). Now they are gone, not hidden: one
|
|
1230
|
+
"…" opens the chip menu, which filters, removes and moves. In a row
|
|
1231
|
+
header cell even that gives way to the caption; a hold opens the menu.
|
|
1232
|
+
Every chip stays a 44x44 target. */
|
|
1233
|
+
.kanuni-pivot-field-chip[data-chip-menu] > .kanuni-pivot-field-chip-actions {
|
|
1234
|
+
display: none;
|
|
1235
|
+
}
|
|
1236
|
+
.kanuni-pivot-field-chip[data-chip-menu] {
|
|
1237
|
+
min-width: 44px;
|
|
1238
|
+
min-height: 44px;
|
|
1239
|
+
}
|
|
1240
|
+
.kanuni-pivot-field-chip[data-chip-menu] > .pivot-truncate {
|
|
1241
|
+
flex: 0 1 auto;
|
|
1242
|
+
min-width: 0;
|
|
1243
|
+
}
|
|
1244
|
+
.kanuni-pivot-field-chip[data-chip-menu] > .kanuni-pivot-chip-more {
|
|
1245
|
+
display: inline-flex;
|
|
1246
|
+
align-items: center;
|
|
1247
|
+
justify-content: center;
|
|
1248
|
+
flex: 0 0 auto;
|
|
1249
|
+
min-width: 44px;
|
|
1250
|
+
min-height: 44px;
|
|
1251
|
+
margin-inline: auto -6px;
|
|
1252
|
+
font-size: 16px;
|
|
1253
|
+
font-weight: 700;
|
|
1254
|
+
line-height: 1;
|
|
1255
|
+
color: var(--pivot-text-muted);
|
|
1256
|
+
cursor: pointer;
|
|
1257
|
+
}
|
|
1258
|
+
.kanuni-pivot-chip-more.is-filtered {
|
|
1259
|
+
color: var(--pivot-danger);
|
|
1260
|
+
}
|
|
1261
|
+
.kanuni-pivot-header-corner .kanuni-pivot-field-chip[data-chip-menu] > .kanuni-pivot-chip-more {
|
|
1262
|
+
display: none;
|
|
1263
|
+
}
|
|
1264
|
+
.kanuni-pivot-header-corner .kanuni-pivot-field-chip[data-chip-menu] > .kanuni-pivot-chip-filtered-mark {
|
|
1265
|
+
display: inline-block;
|
|
1266
|
+
flex: 0 0 auto;
|
|
1267
|
+
color: var(--pivot-danger);
|
|
1268
|
+
}
|
|
1269
|
+
/* The cell's 8px sides left a 56px column (the narrowest the budget
|
|
1270
|
+
paints) a 40px chip; 4px leaves it 48. */
|
|
1271
|
+
.kanuni-pivot-table .kanuni-pivot-header-corner {
|
|
1272
|
+
padding-inline: 4px !important;
|
|
1273
|
+
}
|
|
1274
|
+
.kanuni-pivot-header-corner .kanuni-pivot-field-chip[data-chip-menu] {
|
|
1275
|
+
padding-inline: 4px;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
.kanuni-pivot-chip-more,
|
|
1279
|
+
.kanuni-pivot-chip-filtered-mark {
|
|
1280
|
+
display: none;
|
|
1281
|
+
}
|
|
1282
|
+
/* Drawn, not text: a chip's textContent stays its caption (tests and apps read it). */
|
|
1283
|
+
.kanuni-pivot-chip-more::before {
|
|
1284
|
+
content: '\2026';
|
|
1285
|
+
}
|
|
1286
|
+
.kanuni-pivot-density-touch .kanuni-pivot-field-chip [data-drag-grip] {
|
|
1287
|
+
min-width: 44px;
|
|
1288
|
+
min-height: 44px;
|
|
1289
|
+
display: inline-flex;
|
|
1290
|
+
align-items: center;
|
|
1291
|
+
justify-content: center;
|
|
1199
1292
|
}
|
|
1200
1293
|
.kanuni-pivot-footer-divider {
|
|
1201
1294
|
height: 16px;
|
|
@@ -1264,6 +1357,49 @@
|
|
|
1264
1357
|
letter-spacing: 0.05em;
|
|
1265
1358
|
}
|
|
1266
1359
|
|
|
1360
|
+
/* The filter strip's collapse button and, collapsed, its count of filtering
|
|
1361
|
+
fields (Tekax B.38). Root-qualified: the root's button reset (0,1,1) beats
|
|
1362
|
+
a single class. */
|
|
1363
|
+
.kanuni-pivot-root .kanuni-pivot-area-collapse {
|
|
1364
|
+
margin-inline-start: auto;
|
|
1365
|
+
display: inline-flex;
|
|
1366
|
+
align-items: center;
|
|
1367
|
+
justify-content: center;
|
|
1368
|
+
padding: 2px;
|
|
1369
|
+
border: 0;
|
|
1370
|
+
border-radius: var(--pivot-border-radius-sm);
|
|
1371
|
+
background: transparent;
|
|
1372
|
+
color: inherit;
|
|
1373
|
+
cursor: pointer;
|
|
1374
|
+
}
|
|
1375
|
+
.kanuni-pivot-root .kanuni-pivot-area-collapse:hover {
|
|
1376
|
+
background-color: var(--pivot-surface-hover);
|
|
1377
|
+
color: var(--pivot-primary);
|
|
1378
|
+
}
|
|
1379
|
+
.kanuni-pivot-root .kanuni-pivot-area-collapse:focus-visible {
|
|
1380
|
+
outline: 2px solid var(--pivot-primary);
|
|
1381
|
+
outline-offset: 1px;
|
|
1382
|
+
}
|
|
1383
|
+
@media (pointer: coarse) {
|
|
1384
|
+
.kanuni-pivot-root .kanuni-pivot-area-collapse {
|
|
1385
|
+
min-width: 44px;
|
|
1386
|
+
min-height: 44px;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
.kanuni-pivot-area-filtered-count {
|
|
1390
|
+
text-transform: none;
|
|
1391
|
+
letter-spacing: 0;
|
|
1392
|
+
font-weight: 600;
|
|
1393
|
+
padding: 0 6px;
|
|
1394
|
+
border-radius: 999px;
|
|
1395
|
+
color: var(--pivot-danger);
|
|
1396
|
+
background-color: color-mix(in srgb, var(--pivot-danger) 10%, transparent);
|
|
1397
|
+
}
|
|
1398
|
+
/* A capped strip scrolls inside itself; the page does not take over at its ends. */
|
|
1399
|
+
.kanuni-pivot-area-content {
|
|
1400
|
+
overscroll-behavior-y: contain;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1267
1403
|
.kanuni-pivot-area-content {
|
|
1268
1404
|
flex: 1;
|
|
1269
1405
|
display: flex;
|
|
@@ -1274,6 +1410,33 @@
|
|
|
1274
1410
|
align-content: flex-start;
|
|
1275
1411
|
}
|
|
1276
1412
|
|
|
1413
|
+
/* B.61: on a phone the filter strip must leave the data its room. With 8-10
|
|
1414
|
+
filter chips the strip filled the whole 400-500px pivot and the first data
|
|
1415
|
+
row sat ~150px outside the box. At 768px and below the strip takes at most
|
|
1416
|
+
40% of the pivot's height and scrolls inside itself past that; this holds
|
|
1417
|
+
WITH `layout.filterAreaMaxRows` set (a smaller cap still wins; a larger one
|
|
1418
|
+
stops at 40%). Percent of a pivot whose box has no height is ignored, and
|
|
1419
|
+
then the pivot is as tall as its contents anyway. */
|
|
1420
|
+
@media (max-width: 768px) {
|
|
1421
|
+
.kanuni-pivot-filter-strip {
|
|
1422
|
+
box-sizing: border-box;
|
|
1423
|
+
max-height: 40%;
|
|
1424
|
+
min-height: 0;
|
|
1425
|
+
overflow: hidden;
|
|
1426
|
+
}
|
|
1427
|
+
.kanuni-pivot-filter-strip > .pivot-flex {
|
|
1428
|
+
flex: 1 1 auto;
|
|
1429
|
+
min-height: 0;
|
|
1430
|
+
}
|
|
1431
|
+
.kanuni-pivot-filter-strip .kanuni-pivot-area-dropzone {
|
|
1432
|
+
min-height: 0;
|
|
1433
|
+
}
|
|
1434
|
+
.kanuni-pivot-filter-strip .kanuni-pivot-area-content {
|
|
1435
|
+
min-height: 0;
|
|
1436
|
+
overflow-y: auto;
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1277
1440
|
.kanuni-pivot-field-chip {
|
|
1278
1441
|
display: flex;
|
|
1279
1442
|
align-items: center;
|
|
@@ -1297,6 +1460,16 @@
|
|
|
1297
1460
|
box-shadow: 0 0 0 2px var(--pivot-primary);
|
|
1298
1461
|
cursor: grabbing !important;
|
|
1299
1462
|
}
|
|
1463
|
+
/* B.34: the area under the pointer will not take the dragged field. (The
|
|
1464
|
+
chooser box carries inline over/out colours, hence !important there.) */
|
|
1465
|
+
.kanuni-pivot-area-dropzone.is-drop-denied {
|
|
1466
|
+
box-shadow: inset 0 0 0 1px var(--pivot-danger);
|
|
1467
|
+
background-color: color-mix(in srgb, var(--pivot-danger) 6%, transparent);
|
|
1468
|
+
}
|
|
1469
|
+
.is-drop-denied[data-chooser-area] {
|
|
1470
|
+
box-shadow: inset 0 0 0 1px var(--pivot-danger) !important;
|
|
1471
|
+
background-color: color-mix(in srgb, var(--pivot-danger) 6%, transparent) !important;
|
|
1472
|
+
}
|
|
1300
1473
|
|
|
1301
1474
|
.kanuni-pivot-field-chip-actions {
|
|
1302
1475
|
display: flex;
|
|
@@ -1310,6 +1483,15 @@
|
|
|
1310
1483
|
.kanuni-pivot-field-chip:focus-within .kanuni-pivot-field-chip-actions {
|
|
1311
1484
|
opacity: 1;
|
|
1312
1485
|
}
|
|
1486
|
+
/* A chip that is a table header cell's only child is as wide as the cell; its
|
|
1487
|
+
filter and remove buttons then sat right after the caption, in the middle
|
|
1488
|
+
of the chip, invisible until hovered — a click on the middle of "Region"
|
|
1489
|
+
in the row header opened the filter or removed the field instead of
|
|
1490
|
+
sorting. At the chip's end they are where the strip's compact chips have
|
|
1491
|
+
them, and the rest of the chip sorts. */
|
|
1492
|
+
th > .kanuni-pivot-field-chip > .kanuni-pivot-field-chip-actions {
|
|
1493
|
+
margin-inline-start: auto;
|
|
1494
|
+
}
|
|
1313
1495
|
/* Chips are keyboard-operable (#207): the ring is the only sign of focus. */
|
|
1314
1496
|
.kanuni-pivot-field-chip:focus-visible {
|
|
1315
1497
|
outline: 2px solid var(--pivot-primary);
|
|
@@ -1339,6 +1521,19 @@
|
|
|
1339
1521
|
color: var(--pivot-danger);
|
|
1340
1522
|
}
|
|
1341
1523
|
|
|
1524
|
+
/* The field chooser as a side panel (React, `fieldChooserMode: 'panel'`,
|
|
1525
|
+
Tekax B.37): at the pivot's end side, its full height, no backdrop. */
|
|
1526
|
+
.kanuni-pivot-chooser-panel {
|
|
1527
|
+
flex: 0 0 auto;
|
|
1528
|
+
width: var(--pivot-chooser-panel-width, 320px);
|
|
1529
|
+
max-width: 50%;
|
|
1530
|
+
height: 100%;
|
|
1531
|
+
min-height: 0;
|
|
1532
|
+
margin-inline-start: 8px;
|
|
1533
|
+
border: 1px solid var(--pivot-border);
|
|
1534
|
+
border-radius: var(--pivot-radius-md);
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1342
1537
|
/* The field chooser's backdrop (both renderers). */
|
|
1343
1538
|
.kanuni-pivot-chooser-backdrop {
|
|
1344
1539
|
background-color: var(--pivot-chooser-overlay-bg);
|
|
@@ -1387,6 +1582,13 @@
|
|
|
1387
1582
|
.kanuni-pivot-dropdown-item:hover svg {
|
|
1388
1583
|
color: var(--pivot-text);
|
|
1389
1584
|
}
|
|
1585
|
+
/* B.34: "Move to" an area the field's allowedAreas leave out. */
|
|
1586
|
+
.kanuni-pivot-dropdown-item:disabled,
|
|
1587
|
+
.kanuni-pivot-dropdown-item:disabled:hover {
|
|
1588
|
+
opacity: 0.45;
|
|
1589
|
+
cursor: not-allowed;
|
|
1590
|
+
background-color: transparent;
|
|
1591
|
+
}
|
|
1390
1592
|
.kanuni-pivot-dropdown-item-danger {
|
|
1391
1593
|
color: var(--pivot-danger);
|
|
1392
1594
|
}
|
|
@@ -1883,6 +2085,9 @@
|
|
|
1883
2085
|
.kanuni-pivot-root .h-full {
|
|
1884
2086
|
height: 100%;
|
|
1885
2087
|
}
|
|
2088
|
+
.kanuni-pivot-root .min-h-0 {
|
|
2089
|
+
min-height: 0;
|
|
2090
|
+
}
|
|
1886
2091
|
.kanuni-pivot-root .w-1\.5 {
|
|
1887
2092
|
width: calc(var(--spacing) * 1.5);
|
|
1888
2093
|
}
|
|
@@ -1965,6 +2170,9 @@
|
|
|
1965
2170
|
.kanuni-pivot-root .grid-cols-1 {
|
|
1966
2171
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
1967
2172
|
}
|
|
2173
|
+
.kanuni-pivot-root .grid-cols-2 {
|
|
2174
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
2175
|
+
}
|
|
1968
2176
|
.kanuni-pivot-root .flex-col {
|
|
1969
2177
|
flex-direction: column;
|
|
1970
2178
|
}
|
|
@@ -2150,10 +2358,6 @@
|
|
|
2150
2358
|
.kanuni-pivot-root .italic {
|
|
2151
2359
|
font-style: italic;
|
|
2152
2360
|
}
|
|
2153
|
-
.kanuni-pivot-root .tabular-nums {
|
|
2154
|
-
--tw-numeric-spacing: tabular-nums;
|
|
2155
|
-
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
2156
|
-
}
|
|
2157
2361
|
.kanuni-pivot-root .opacity-0 {
|
|
2158
2362
|
opacity: 0%;
|
|
2159
2363
|
}
|
|
@@ -2166,6 +2370,10 @@
|
|
|
2166
2370
|
.kanuni-pivot-root .opacity-100 {
|
|
2167
2371
|
opacity: 100%;
|
|
2168
2372
|
}
|
|
2373
|
+
.kanuni-pivot-root .shadow {
|
|
2374
|
+
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
2375
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2376
|
+
}
|
|
2169
2377
|
.kanuni-pivot-root .shadow-2xl {
|
|
2170
2378
|
--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));
|
|
2171
2379
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -2382,26 +2590,6 @@
|
|
|
2382
2590
|
syntax: "*";
|
|
2383
2591
|
inherits: false;
|
|
2384
2592
|
}
|
|
2385
|
-
@property --tw-ordinal {
|
|
2386
|
-
syntax: "*";
|
|
2387
|
-
inherits: false;
|
|
2388
|
-
}
|
|
2389
|
-
@property --tw-slashed-zero {
|
|
2390
|
-
syntax: "*";
|
|
2391
|
-
inherits: false;
|
|
2392
|
-
}
|
|
2393
|
-
@property --tw-numeric-figure {
|
|
2394
|
-
syntax: "*";
|
|
2395
|
-
inherits: false;
|
|
2396
|
-
}
|
|
2397
|
-
@property --tw-numeric-spacing {
|
|
2398
|
-
syntax: "*";
|
|
2399
|
-
inherits: false;
|
|
2400
|
-
}
|
|
2401
|
-
@property --tw-numeric-fraction {
|
|
2402
|
-
syntax: "*";
|
|
2403
|
-
inherits: false;
|
|
2404
|
-
}
|
|
2405
2593
|
@property --tw-shadow {
|
|
2406
2594
|
syntax: "*";
|
|
2407
2595
|
inherits: false;
|
|
@@ -2588,11 +2776,6 @@
|
|
|
2588
2776
|
--tw-border-style: solid;
|
|
2589
2777
|
--tw-font-weight: initial;
|
|
2590
2778
|
--tw-tracking: initial;
|
|
2591
|
-
--tw-ordinal: initial;
|
|
2592
|
-
--tw-slashed-zero: initial;
|
|
2593
|
-
--tw-numeric-figure: initial;
|
|
2594
|
-
--tw-numeric-spacing: initial;
|
|
2595
|
-
--tw-numeric-fraction: initial;
|
|
2596
2779
|
--tw-shadow: 0 0 #0000;
|
|
2597
2780
|
--tw-shadow-color: initial;
|
|
2598
2781
|
--tw-shadow-alpha: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanunilabs/pivotgrid-react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.4",
|
|
4
4
|
"description": "High-performance React pivot table with a Web Worker engine — drag-and-drop pivoting, filtering, sorting, theming and export",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@kanunilabs/pivotgrid-core": "1.11.
|
|
68
|
+
"@kanunilabs/pivotgrid-core": "1.11.4"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@tailwindcss/postcss": "^4.3.0",
|