@agile-team/mach-table-vue 0.5.0 → 0.13.0
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/LICENSE +110 -21
- package/README.md +61 -6
- package/dist/MachTable-ESOIV4CZ.cjs +2 -0
- package/dist/MachTable-ESOIV4CZ.cjs.map +1 -0
- package/dist/MachTable-USYTNQV5.js +2 -0
- package/dist/async.cjs +1 -22
- package/dist/async.cjs.map +1 -1
- package/dist/async.d.cts +19 -6
- package/dist/async.d.ts +19 -6
- package/dist/async.js +1 -22
- package/dist/async.js.map +1 -1
- package/dist/chunk-7U5IML5K.js +2 -0
- package/dist/chunk-7U5IML5K.js.map +1 -0
- package/dist/chunk-BE4RGLUC.cjs +2 -0
- package/dist/chunk-BE4RGLUC.cjs.map +1 -0
- package/dist/chunk-E7KTBMM6.js +2 -0
- package/dist/chunk-E7KTBMM6.js.map +1 -0
- package/dist/chunk-ICHFPO5U.js +2 -0
- package/dist/chunk-ICHFPO5U.js.map +1 -0
- package/dist/chunk-MVK2O7FM.cjs +2 -0
- package/dist/chunk-MVK2O7FM.cjs.map +1 -0
- package/dist/chunk-Y6OAV3U4.cjs +2 -0
- package/dist/chunk-Y6OAV3U4.cjs.map +1 -0
- package/dist/chunk-Z6YS22CL.cjs +2 -0
- package/dist/chunk-Z6YS22CL.cjs.map +1 -0
- package/dist/chunk-ZUOKB5ID.js +2 -0
- package/dist/chunk-ZUOKB5ID.js.map +1 -0
- package/dist/editors.cjs +2 -0
- package/dist/editors.cjs.map +1 -0
- package/dist/editors.d.cts +34 -0
- package/dist/editors.d.ts +34 -0
- package/dist/editors.js +2 -0
- package/dist/editors.js.map +1 -0
- package/dist/globalRegistration-ySQgs7aA.d.cts +86 -0
- package/dist/globalRegistration-ySQgs7aA.d.ts +86 -0
- package/dist/index.cjs +1 -110
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -12
- package/dist/index.d.ts +54 -12
- package/dist/index.js +1 -110
- package/dist/index.js.map +1 -1
- package/dist/mach-table.css +410 -3
- package/dist/workflows-Dg6KsN85.d.cts +111 -0
- package/dist/workflows-Dg6KsN85.d.ts +111 -0
- package/dist/workflows.cjs +2 -0
- package/dist/workflows.cjs.map +1 -0
- package/dist/workflows.d.cts +3 -0
- package/dist/workflows.d.ts +3 -0
- package/dist/workflows.js +2 -0
- package/dist/workflows.js.map +1 -0
- package/package.json +24 -4
- package/dist/RobotGrid-2KWWM4C4.js +0 -7
- package/dist/RobotGrid-LELHEO4W.cjs +0 -7
- package/dist/RobotGrid-LELHEO4W.cjs.map +0 -1
- package/dist/chunk-345ZEGIE.cjs +0 -21
- package/dist/chunk-345ZEGIE.cjs.map +0 -1
- package/dist/chunk-CHEQLQW4.js +0 -78
- package/dist/chunk-CHEQLQW4.js.map +0 -1
- package/dist/chunk-JJQDDIQU.js +0 -21
- package/dist/chunk-JJQDDIQU.js.map +0 -1
- package/dist/chunk-S3NR7DIG.cjs +0 -78
- package/dist/chunk-S3NR7DIG.cjs.map +0 -1
- package/dist/globalRegistration-CQ2dTNzy.d.cts +0 -25
- package/dist/globalRegistration-CQ2dTNzy.d.ts +0 -25
- /package/dist/{RobotGrid-2KWWM4C4.js.map → MachTable-USYTNQV5.js.map} +0 -0
package/dist/mach-table.css
CHANGED
|
@@ -531,6 +531,23 @@ input.mach-select-all {
|
|
|
531
531
|
transform: rotate(90deg);
|
|
532
532
|
}
|
|
533
533
|
|
|
534
|
+
.mach-detail-toggle--loading {
|
|
535
|
+
animation: mach-tree-spin 0.8s linear infinite;
|
|
536
|
+
color: var(--mach-primary);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.mach-detail-toggle--error {
|
|
540
|
+
color: #dc2626;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
@keyframes mach-tree-spin {
|
|
544
|
+
to { transform: rotate(360deg); }
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
@media (prefers-reduced-motion: reduce) {
|
|
548
|
+
.mach-detail-toggle--loading { animation: none; }
|
|
549
|
+
}
|
|
550
|
+
|
|
534
551
|
.mach-cell--group {
|
|
535
552
|
cursor: pointer;
|
|
536
553
|
background: var(--mach-header-bg);
|
|
@@ -637,6 +654,11 @@ input.mach-select-all {
|
|
|
637
654
|
box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35);
|
|
638
655
|
}
|
|
639
656
|
|
|
657
|
+
.mach-editor-validating {
|
|
658
|
+
cursor: progress;
|
|
659
|
+
opacity: 0.72;
|
|
660
|
+
}
|
|
661
|
+
|
|
640
662
|
.mach-footer {
|
|
641
663
|
display: flex;
|
|
642
664
|
flex-shrink: 0;
|
|
@@ -1025,11 +1047,33 @@ input.mach-select-all {
|
|
|
1025
1047
|
}
|
|
1026
1048
|
|
|
1027
1049
|
.mach-column-panel {
|
|
1028
|
-
min-width:
|
|
1050
|
+
min-width: 220px;
|
|
1029
1051
|
max-height: 70vh;
|
|
1030
1052
|
overflow: auto;
|
|
1031
1053
|
}
|
|
1032
1054
|
|
|
1055
|
+
.mach-column-panel[role="dialog"] {
|
|
1056
|
+
width: min(440px, calc(100vw - 16px));
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.mach-column-workbench-search {
|
|
1060
|
+
box-sizing: border-box;
|
|
1061
|
+
width: 100%;
|
|
1062
|
+
height: 30px;
|
|
1063
|
+
padding: 0 9px;
|
|
1064
|
+
border: 1px solid var(--mach-border-color);
|
|
1065
|
+
border-radius: var(--mach-radius);
|
|
1066
|
+
background: var(--mach-body-bg);
|
|
1067
|
+
color: var(--mach-body-fg);
|
|
1068
|
+
font: inherit;
|
|
1069
|
+
outline: none;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.mach-column-workbench-search:focus {
|
|
1073
|
+
border-color: var(--mach-primary);
|
|
1074
|
+
box-shadow: 0 0 0 2px var(--mach-primary-weak);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1033
1077
|
.mach-column-panel-title {
|
|
1034
1078
|
font-weight: 600;
|
|
1035
1079
|
color: var(--mach-header-fg);
|
|
@@ -1076,7 +1120,7 @@ input.mach-select-all {
|
|
|
1076
1120
|
}
|
|
1077
1121
|
|
|
1078
1122
|
.mach-column-panel-list {
|
|
1079
|
-
max-height:
|
|
1123
|
+
max-height: 280px;
|
|
1080
1124
|
overflow: auto;
|
|
1081
1125
|
display: flex;
|
|
1082
1126
|
flex-direction: column;
|
|
@@ -1086,6 +1130,54 @@ input.mach-select-all {
|
|
|
1086
1130
|
padding: 4px;
|
|
1087
1131
|
}
|
|
1088
1132
|
|
|
1133
|
+
.mach-column-workbench-item {
|
|
1134
|
+
display: grid;
|
|
1135
|
+
grid-template-columns: minmax(120px, 1fr) 108px 26px 26px;
|
|
1136
|
+
align-items: center;
|
|
1137
|
+
gap: 4px;
|
|
1138
|
+
min-height: 32px;
|
|
1139
|
+
padding: 2px 3px;
|
|
1140
|
+
border-radius: var(--mach-radius);
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
.mach-column-workbench-item:hover {
|
|
1144
|
+
background: var(--mach-row-hover-bg);
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
.mach-column-workbench-label {
|
|
1148
|
+
display: flex;
|
|
1149
|
+
min-width: 0;
|
|
1150
|
+
align-items: center;
|
|
1151
|
+
gap: 7px;
|
|
1152
|
+
cursor: pointer;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
.mach-column-workbench-name {
|
|
1156
|
+
overflow: hidden;
|
|
1157
|
+
text-overflow: ellipsis;
|
|
1158
|
+
white-space: nowrap;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
.mach-column-workbench-pin,
|
|
1162
|
+
.mach-column-workbench-move {
|
|
1163
|
+
height: 26px;
|
|
1164
|
+
border: 1px solid var(--mach-border-color);
|
|
1165
|
+
border-radius: var(--mach-radius);
|
|
1166
|
+
background: var(--mach-body-bg);
|
|
1167
|
+
color: inherit;
|
|
1168
|
+
font: inherit;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
.mach-column-workbench-move {
|
|
1172
|
+
padding: 0;
|
|
1173
|
+
cursor: pointer;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
.mach-column-workbench-move:disabled {
|
|
1177
|
+
cursor: not-allowed;
|
|
1178
|
+
opacity: 0.35;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1089
1181
|
.mach-tag {
|
|
1090
1182
|
display: inline-flex;
|
|
1091
1183
|
align-items: center;
|
|
@@ -1177,6 +1269,18 @@ input.mach-select-all {
|
|
|
1177
1269
|
gap: 2px;
|
|
1178
1270
|
}
|
|
1179
1271
|
|
|
1272
|
+
.mach-sr-only {
|
|
1273
|
+
position: absolute !important;
|
|
1274
|
+
width: 1px !important;
|
|
1275
|
+
height: 1px !important;
|
|
1276
|
+
padding: 0 !important;
|
|
1277
|
+
margin: -1px !important;
|
|
1278
|
+
overflow: hidden !important;
|
|
1279
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
1280
|
+
white-space: nowrap !important;
|
|
1281
|
+
border: 0 !important;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1180
1284
|
.mach-action-btn {
|
|
1181
1285
|
display: inline-flex;
|
|
1182
1286
|
align-items: center;
|
|
@@ -1203,6 +1307,50 @@ input.mach-select-all {
|
|
|
1203
1307
|
color: var(--mach-danger);
|
|
1204
1308
|
}
|
|
1205
1309
|
|
|
1310
|
+
.mach-action-btn--primary {
|
|
1311
|
+
color: var(--mach-primary);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
.mach-action-btn--warning {
|
|
1315
|
+
color: var(--mach-warning);
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
.mach-action-btn--success,
|
|
1319
|
+
.mach-edit-control--confirm {
|
|
1320
|
+
color: var(--mach-success);
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
.mach-action-btn--danger {
|
|
1324
|
+
color: var(--mach-danger);
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
.mach-action-btn:focus-visible,
|
|
1328
|
+
.mach-edit-control:focus-visible,
|
|
1329
|
+
.mach-cell-edit-trigger:focus-visible,
|
|
1330
|
+
.mach-action-drawer__close:focus-visible {
|
|
1331
|
+
outline: 2px solid color-mix(in srgb, var(--mach-primary) 65%, transparent);
|
|
1332
|
+
outline-offset: 1px;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
.mach-action-btn:disabled {
|
|
1336
|
+
cursor: not-allowed;
|
|
1337
|
+
opacity: 0.4;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
.mach-action-btn--loading svg {
|
|
1341
|
+
animation: mach-spin 0.8s linear infinite;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
.mach-dictionary-value--loading {
|
|
1345
|
+
color: var(--mach-header-fg);
|
|
1346
|
+
opacity: 0.72;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
.mach-dictionary-value--error {
|
|
1350
|
+
text-decoration: underline dotted;
|
|
1351
|
+
text-underline-offset: 3px;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1206
1354
|
.mach-action-btn--icon {
|
|
1207
1355
|
padding: 0;
|
|
1208
1356
|
width: 24px;
|
|
@@ -1210,7 +1358,262 @@ input.mach-select-all {
|
|
|
1210
1358
|
|
|
1211
1359
|
.mach-context-menu-item--danger {
|
|
1212
1360
|
color: var(--mach-danger);
|
|
1213
|
-
}
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
.mach-context-menu-item,
|
|
1364
|
+
.mach-action-drawer__item {
|
|
1365
|
+
display: flex;
|
|
1366
|
+
align-items: center;
|
|
1367
|
+
gap: 9px;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
.mach-context-menu-item--primary,
|
|
1371
|
+
.mach-action-drawer__item--primary {
|
|
1372
|
+
color: var(--mach-primary);
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
.mach-context-menu-item--warning,
|
|
1376
|
+
.mach-action-drawer__item--warning {
|
|
1377
|
+
color: var(--mach-warning);
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
.mach-context-menu-item--success,
|
|
1381
|
+
.mach-action-drawer__item--success {
|
|
1382
|
+
color: var(--mach-success);
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
.mach-context-menu-item--danger,
|
|
1386
|
+
.mach-action-drawer__item--danger {
|
|
1387
|
+
color: var(--mach-danger);
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
.mach-action-drawer-backdrop {
|
|
1391
|
+
position: fixed;
|
|
1392
|
+
inset: 0;
|
|
1393
|
+
z-index: calc(var(--mach-z-menu) + 2);
|
|
1394
|
+
background: rgba(15, 23, 42, 0.2);
|
|
1395
|
+
backdrop-filter: blur(1px);
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
.mach-action-drawer {
|
|
1399
|
+
position: absolute;
|
|
1400
|
+
top: 0;
|
|
1401
|
+
right: 0;
|
|
1402
|
+
display: flex;
|
|
1403
|
+
flex-direction: column;
|
|
1404
|
+
width: min(340px, calc(100vw - 24px));
|
|
1405
|
+
height: 100%;
|
|
1406
|
+
background: var(--mach-body-bg);
|
|
1407
|
+
color: var(--mach-body-fg);
|
|
1408
|
+
border-left: 1px solid var(--mach-border-color);
|
|
1409
|
+
box-shadow: -16px 0 40px rgba(15, 23, 42, 0.14);
|
|
1410
|
+
font-family: var(--mach-font-family);
|
|
1411
|
+
animation: mach-drawer-in 0.18s ease-out;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
.mach-action-drawer__header {
|
|
1415
|
+
display: flex;
|
|
1416
|
+
align-items: center;
|
|
1417
|
+
justify-content: space-between;
|
|
1418
|
+
min-height: 56px;
|
|
1419
|
+
padding: 0 16px 0 20px;
|
|
1420
|
+
border-bottom: 1px solid var(--mach-border-color);
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
.mach-action-drawer__close {
|
|
1424
|
+
display: inline-flex;
|
|
1425
|
+
align-items: center;
|
|
1426
|
+
justify-content: center;
|
|
1427
|
+
width: 30px;
|
|
1428
|
+
height: 30px;
|
|
1429
|
+
padding: 0;
|
|
1430
|
+
border: 0;
|
|
1431
|
+
border-radius: var(--mach-radius);
|
|
1432
|
+
background: transparent;
|
|
1433
|
+
color: var(--mach-header-fg);
|
|
1434
|
+
cursor: pointer;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
.mach-action-drawer__close:hover {
|
|
1438
|
+
color: var(--mach-primary);
|
|
1439
|
+
background: var(--mach-row-hover-bg);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
.mach-action-drawer__body {
|
|
1443
|
+
display: flex;
|
|
1444
|
+
flex-direction: column;
|
|
1445
|
+
gap: 4px;
|
|
1446
|
+
padding: 12px;
|
|
1447
|
+
overflow: auto;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
.mach-action-drawer__item {
|
|
1451
|
+
width: 100%;
|
|
1452
|
+
min-height: 40px;
|
|
1453
|
+
padding: 0 12px;
|
|
1454
|
+
border: 0;
|
|
1455
|
+
border-radius: var(--mach-radius);
|
|
1456
|
+
background: transparent;
|
|
1457
|
+
font: inherit;
|
|
1458
|
+
text-align: left;
|
|
1459
|
+
cursor: pointer;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
.mach-action-drawer__item:hover:not(:disabled) {
|
|
1463
|
+
background: var(--mach-row-hover-bg);
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
.mach-action-drawer__item:disabled {
|
|
1467
|
+
opacity: 0.4;
|
|
1468
|
+
cursor: not-allowed;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
@keyframes mach-drawer-in {
|
|
1472
|
+
from { transform: translateX(18px); opacity: 0; }
|
|
1473
|
+
to { transform: translateX(0); opacity: 1; }
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
@media (max-width: 640px) {
|
|
1477
|
+
.mach-action-drawer {
|
|
1478
|
+
top: auto;
|
|
1479
|
+
bottom: 0;
|
|
1480
|
+
width: 100%;
|
|
1481
|
+
height: auto;
|
|
1482
|
+
max-height: min(70vh, 520px);
|
|
1483
|
+
border-top: 1px solid var(--mach-border-color);
|
|
1484
|
+
border-left: 0;
|
|
1485
|
+
border-radius: var(--mach-radius-lg) var(--mach-radius-lg) 0 0;
|
|
1486
|
+
animation-name: mach-drawer-up;
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
@keyframes mach-drawer-up {
|
|
1491
|
+
from { transform: translateY(18px); opacity: 0; }
|
|
1492
|
+
to { transform: translateY(0); opacity: 1; }
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
.mach-cell:has(.mach-cell-edit-trigger) {
|
|
1496
|
+
padding-right: 29px;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
.mach-cell-edit-trigger {
|
|
1500
|
+
position: absolute;
|
|
1501
|
+
right: 5px;
|
|
1502
|
+
top: 50%;
|
|
1503
|
+
display: inline-flex;
|
|
1504
|
+
align-items: center;
|
|
1505
|
+
justify-content: center;
|
|
1506
|
+
width: 20px;
|
|
1507
|
+
height: 20px;
|
|
1508
|
+
padding: 0;
|
|
1509
|
+
transform: translateY(-50%);
|
|
1510
|
+
border: 0;
|
|
1511
|
+
border-radius: var(--mach-radius-sm);
|
|
1512
|
+
background: transparent;
|
|
1513
|
+
color: var(--mach-header-fg);
|
|
1514
|
+
cursor: pointer;
|
|
1515
|
+
opacity: 0;
|
|
1516
|
+
transition: opacity var(--mach-transition), color var(--mach-transition), background-color var(--mach-transition);
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
.mach-cell-edit-trigger svg {
|
|
1520
|
+
width: 13px;
|
|
1521
|
+
height: 13px;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
.mach-cell:hover .mach-cell-edit-trigger--hover,
|
|
1525
|
+
.mach-cell:focus-within .mach-cell-edit-trigger--hover,
|
|
1526
|
+
.mach-cell-edit-trigger--always {
|
|
1527
|
+
opacity: 0.72;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
.mach-cell-edit-trigger:hover {
|
|
1531
|
+
opacity: 1;
|
|
1532
|
+
color: var(--mach-primary);
|
|
1533
|
+
background: color-mix(in srgb, var(--mach-primary) 9%, transparent);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
.mach-cell--editing {
|
|
1537
|
+
overflow: visible;
|
|
1538
|
+
z-index: 4;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
.mach-cell-editor-shell,
|
|
1542
|
+
.mach-row-editor-shell {
|
|
1543
|
+
display: flex;
|
|
1544
|
+
align-items: center;
|
|
1545
|
+
width: 100%;
|
|
1546
|
+
min-width: 0;
|
|
1547
|
+
gap: 5px;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
.mach-cell-editor-shell > .mach-editor-input,
|
|
1551
|
+
.mach-cell-editor-shell > .mach-editor-select,
|
|
1552
|
+
.mach-cell-editor-shell > :not(.mach-cell-editor-controls),
|
|
1553
|
+
.mach-row-editor-shell > * {
|
|
1554
|
+
flex: 1 1 auto;
|
|
1555
|
+
min-width: 0;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
.mach-cell-editor-controls {
|
|
1559
|
+
display: inline-flex;
|
|
1560
|
+
flex: 0 0 auto;
|
|
1561
|
+
align-items: center;
|
|
1562
|
+
padding: 2px;
|
|
1563
|
+
border: 1px solid var(--mach-border-color);
|
|
1564
|
+
border-radius: var(--mach-radius);
|
|
1565
|
+
background: var(--mach-body-bg);
|
|
1566
|
+
box-shadow: var(--mach-shadow-sm);
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
.mach-edit-control {
|
|
1570
|
+
display: inline-flex;
|
|
1571
|
+
align-items: center;
|
|
1572
|
+
justify-content: center;
|
|
1573
|
+
width: 23px;
|
|
1574
|
+
height: 23px;
|
|
1575
|
+
padding: 0;
|
|
1576
|
+
border: 0;
|
|
1577
|
+
border-radius: var(--mach-radius-sm);
|
|
1578
|
+
background: transparent;
|
|
1579
|
+
color: var(--mach-header-fg);
|
|
1580
|
+
cursor: pointer;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
.mach-edit-control svg {
|
|
1584
|
+
width: 14px;
|
|
1585
|
+
height: 14px;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
.mach-edit-control--confirm {
|
|
1589
|
+
color: var(--mach-primary);
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
.mach-edit-control:hover {
|
|
1593
|
+
background: var(--mach-row-hover-bg);
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
.mach-edit-control:disabled {
|
|
1597
|
+
opacity: 0.35;
|
|
1598
|
+
cursor: wait;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
.mach-row--editing,
|
|
1602
|
+
.mach-row--editing .mach-cell {
|
|
1603
|
+
background: color-mix(in srgb, var(--mach-primary) 3%, var(--mach-body-bg));
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
.mach-cell--row-editing .mach-editor-input,
|
|
1607
|
+
.mach-cell--row-editing .mach-editor-select {
|
|
1608
|
+
border-color: color-mix(in srgb, var(--mach-primary) 45%, var(--mach-border-color));
|
|
1609
|
+
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
.mach-cell--row-editing .mach-editor-input:focus,
|
|
1613
|
+
.mach-cell--row-editing .mach-editor-select:focus {
|
|
1614
|
+
border-color: var(--mach-primary);
|
|
1615
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--mach-primary) 12%, transparent);
|
|
1616
|
+
}
|
|
1214
1617
|
|
|
1215
1618
|
.mach-tooltip {
|
|
1216
1619
|
position: fixed;
|
|
@@ -1381,4 +1784,8 @@ input.mach-select-all {
|
|
|
1381
1784
|
animation-iteration-count: 1 !important;
|
|
1382
1785
|
transition-duration: 0.01ms !important;
|
|
1383
1786
|
}
|
|
1787
|
+
|
|
1788
|
+
.mach-action-drawer {
|
|
1789
|
+
animation: none !important;
|
|
1790
|
+
}
|
|
1384
1791
|
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Ref, ShallowRef, ComputedRef } from 'vue';
|
|
2
|
+
import { GridApi, GridChange, SaveChangesHandler, SortModel, FilterModel, OverlayContent, OverlayTemplate, GridOptions } from '@agile-team/mach-table';
|
|
3
|
+
|
|
4
|
+
interface UseMachTableReturn<TData = any> {
|
|
5
|
+
ref: Ref<any>;
|
|
6
|
+
api: ShallowRef<GridApi<TData> | null>;
|
|
7
|
+
ready: ShallowRef<boolean>;
|
|
8
|
+
}
|
|
9
|
+
declare function useMachTable<TData = any>(): UseMachTableReturn<TData>;
|
|
10
|
+
|
|
11
|
+
interface UseMachTableEditingOptions<TData = any> {
|
|
12
|
+
/** Warn before closing/reloading a browser tab with unsaved changes. */
|
|
13
|
+
guardBeforeUnload?: boolean;
|
|
14
|
+
beforeUnloadMessage?: string;
|
|
15
|
+
onSaveSuccess?(saved: readonly GridChange<TData>[]): void;
|
|
16
|
+
onSaveError?(error: unknown): void;
|
|
17
|
+
}
|
|
18
|
+
interface UseMachTableEditingReturn<TData = any> {
|
|
19
|
+
changes: ShallowRef<GridChange<TData>[]>;
|
|
20
|
+
dirtyRowIds: Ref<string[]>;
|
|
21
|
+
dirty: ComputedRef<boolean>;
|
|
22
|
+
saving: Ref<boolean>;
|
|
23
|
+
saveError: ShallowRef<unknown | null>;
|
|
24
|
+
save(handler: SaveChangesHandler<TData>, rowIds?: readonly string[]): Promise<GridChange<TData>[]>;
|
|
25
|
+
rollback(rowIds?: readonly string[]): boolean;
|
|
26
|
+
markSaved(rowIds?: readonly string[]): void;
|
|
27
|
+
/** Scrolls to a loaded changed row and optionally opens the failed cell editor. */
|
|
28
|
+
reveal(rowId: string, colId?: string, edit?: boolean): boolean;
|
|
29
|
+
refresh(): void;
|
|
30
|
+
}
|
|
31
|
+
/** Reactive dirty/save workflow layered over useMachTable(). */
|
|
32
|
+
declare function useMachTableEditing<TData = any>(table: UseMachTableReturn<TData>, options?: UseMachTableEditingOptions<TData>): UseMachTableEditingReturn<TData>;
|
|
33
|
+
|
|
34
|
+
type MachTableQuerySource<TQuery> = TQuery | Readonly<Ref<TQuery>> | (() => TQuery);
|
|
35
|
+
interface MachTablePageRequest<TQuery> {
|
|
36
|
+
page: number;
|
|
37
|
+
pageSize: number;
|
|
38
|
+
query: TQuery;
|
|
39
|
+
sortModel: SortModel;
|
|
40
|
+
filterModel: FilterModel;
|
|
41
|
+
quickFilterText: string | null;
|
|
42
|
+
signal: AbortSignal;
|
|
43
|
+
}
|
|
44
|
+
interface MachTablePageResult<TData> {
|
|
45
|
+
rows: readonly TData[];
|
|
46
|
+
total: number;
|
|
47
|
+
}
|
|
48
|
+
type MachTableRemoteSelectionState = {
|
|
49
|
+
mode: "explicit";
|
|
50
|
+
selectedKeys: string[];
|
|
51
|
+
} | {
|
|
52
|
+
mode: "allMatching";
|
|
53
|
+
excludedKeys: string[];
|
|
54
|
+
};
|
|
55
|
+
interface UseMachTableQueryOptions<TData, TQuery = Record<string, unknown>> {
|
|
56
|
+
request(params: MachTablePageRequest<TQuery>): Promise<MachTablePageResult<TData>>;
|
|
57
|
+
query: MachTableQuerySource<TQuery>;
|
|
58
|
+
/** Stable row key used for updates and cross-page selection. */
|
|
59
|
+
rowKey: string | ((row: TData) => string | number);
|
|
60
|
+
initialPage?: number;
|
|
61
|
+
pageSize?: number;
|
|
62
|
+
pageSizeOptions?: readonly number[];
|
|
63
|
+
immediate?: boolean;
|
|
64
|
+
debounceMs?: number;
|
|
65
|
+
keepPreviousData?: boolean;
|
|
66
|
+
/** `query` additionally enables compact select-all-matching rules. */
|
|
67
|
+
selectionScope?: "page" | "preserve" | "query";
|
|
68
|
+
/** Defaults true: a different business/filter query cannot inherit stale selections. */
|
|
69
|
+
clearSelectionOnQueryChange?: boolean;
|
|
70
|
+
quickFilterText?: Ref<string | null>;
|
|
71
|
+
/** Replaces the no-rows layer while the latest request is in an error state. */
|
|
72
|
+
errorOverlay?(context: {
|
|
73
|
+
error: unknown;
|
|
74
|
+
retry(): Promise<void>;
|
|
75
|
+
}): OverlayContent;
|
|
76
|
+
emptyOverlay?: OverlayTemplate;
|
|
77
|
+
onSuccess?(result: MachTablePageResult<TData>): void;
|
|
78
|
+
onError?(error: unknown): void;
|
|
79
|
+
}
|
|
80
|
+
interface UseMachTableQueryReturn<TData> {
|
|
81
|
+
rows: ShallowRef<TData[]>;
|
|
82
|
+
loading: Ref<boolean>;
|
|
83
|
+
error: ShallowRef<unknown | null>;
|
|
84
|
+
page: Ref<number>;
|
|
85
|
+
pageSize: Ref<number>;
|
|
86
|
+
total: Ref<number>;
|
|
87
|
+
sortModel: ShallowRef<SortModel>;
|
|
88
|
+
filterModel: ShallowRef<FilterModel>;
|
|
89
|
+
selectedKeys: Ref<string[]>;
|
|
90
|
+
selectedRows: ShallowRef<TData[]>;
|
|
91
|
+
selectionState: ComputedRef<MachTableRemoteSelectionState>;
|
|
92
|
+
gridProps: ComputedRef<GridOptions<TData>>;
|
|
93
|
+
bindings: ComputedRef<GridOptions<TData>>;
|
|
94
|
+
reload(options?: {
|
|
95
|
+
resetPage?: boolean;
|
|
96
|
+
}): Promise<void>;
|
|
97
|
+
retry(): Promise<void>;
|
|
98
|
+
reset(): Promise<void>;
|
|
99
|
+
abort(): void;
|
|
100
|
+
clearSelection(): void;
|
|
101
|
+
/** Selects the complete server query without downloading every row ID. */
|
|
102
|
+
selectAllMatching(): void;
|
|
103
|
+
applySelectionState(state: MachTableRemoteSelectionState): void;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* B-side remote-list controller: paging, sorting, filtering, cancellation,
|
|
107
|
+
* stale-response protection and cross-page selection in one typed binding.
|
|
108
|
+
*/
|
|
109
|
+
declare function useMachTableQuery<TData, TQuery = Record<string, unknown>>(options: UseMachTableQueryOptions<TData, TQuery>): UseMachTableQueryReturn<TData>;
|
|
110
|
+
|
|
111
|
+
export { type MachTablePageRequest as M, type UseMachTableEditingOptions as U, type MachTablePageResult as a, type MachTableQuerySource as b, type MachTableRemoteSelectionState as c, type UseMachTableEditingReturn as d, type UseMachTableQueryOptions as e, type UseMachTableQueryReturn as f, type UseMachTableReturn as g, useMachTableEditing as h, useMachTableQuery as i, useMachTable as u };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Ref, ShallowRef, ComputedRef } from 'vue';
|
|
2
|
+
import { GridApi, GridChange, SaveChangesHandler, SortModel, FilterModel, OverlayContent, OverlayTemplate, GridOptions } from '@agile-team/mach-table';
|
|
3
|
+
|
|
4
|
+
interface UseMachTableReturn<TData = any> {
|
|
5
|
+
ref: Ref<any>;
|
|
6
|
+
api: ShallowRef<GridApi<TData> | null>;
|
|
7
|
+
ready: ShallowRef<boolean>;
|
|
8
|
+
}
|
|
9
|
+
declare function useMachTable<TData = any>(): UseMachTableReturn<TData>;
|
|
10
|
+
|
|
11
|
+
interface UseMachTableEditingOptions<TData = any> {
|
|
12
|
+
/** Warn before closing/reloading a browser tab with unsaved changes. */
|
|
13
|
+
guardBeforeUnload?: boolean;
|
|
14
|
+
beforeUnloadMessage?: string;
|
|
15
|
+
onSaveSuccess?(saved: readonly GridChange<TData>[]): void;
|
|
16
|
+
onSaveError?(error: unknown): void;
|
|
17
|
+
}
|
|
18
|
+
interface UseMachTableEditingReturn<TData = any> {
|
|
19
|
+
changes: ShallowRef<GridChange<TData>[]>;
|
|
20
|
+
dirtyRowIds: Ref<string[]>;
|
|
21
|
+
dirty: ComputedRef<boolean>;
|
|
22
|
+
saving: Ref<boolean>;
|
|
23
|
+
saveError: ShallowRef<unknown | null>;
|
|
24
|
+
save(handler: SaveChangesHandler<TData>, rowIds?: readonly string[]): Promise<GridChange<TData>[]>;
|
|
25
|
+
rollback(rowIds?: readonly string[]): boolean;
|
|
26
|
+
markSaved(rowIds?: readonly string[]): void;
|
|
27
|
+
/** Scrolls to a loaded changed row and optionally opens the failed cell editor. */
|
|
28
|
+
reveal(rowId: string, colId?: string, edit?: boolean): boolean;
|
|
29
|
+
refresh(): void;
|
|
30
|
+
}
|
|
31
|
+
/** Reactive dirty/save workflow layered over useMachTable(). */
|
|
32
|
+
declare function useMachTableEditing<TData = any>(table: UseMachTableReturn<TData>, options?: UseMachTableEditingOptions<TData>): UseMachTableEditingReturn<TData>;
|
|
33
|
+
|
|
34
|
+
type MachTableQuerySource<TQuery> = TQuery | Readonly<Ref<TQuery>> | (() => TQuery);
|
|
35
|
+
interface MachTablePageRequest<TQuery> {
|
|
36
|
+
page: number;
|
|
37
|
+
pageSize: number;
|
|
38
|
+
query: TQuery;
|
|
39
|
+
sortModel: SortModel;
|
|
40
|
+
filterModel: FilterModel;
|
|
41
|
+
quickFilterText: string | null;
|
|
42
|
+
signal: AbortSignal;
|
|
43
|
+
}
|
|
44
|
+
interface MachTablePageResult<TData> {
|
|
45
|
+
rows: readonly TData[];
|
|
46
|
+
total: number;
|
|
47
|
+
}
|
|
48
|
+
type MachTableRemoteSelectionState = {
|
|
49
|
+
mode: "explicit";
|
|
50
|
+
selectedKeys: string[];
|
|
51
|
+
} | {
|
|
52
|
+
mode: "allMatching";
|
|
53
|
+
excludedKeys: string[];
|
|
54
|
+
};
|
|
55
|
+
interface UseMachTableQueryOptions<TData, TQuery = Record<string, unknown>> {
|
|
56
|
+
request(params: MachTablePageRequest<TQuery>): Promise<MachTablePageResult<TData>>;
|
|
57
|
+
query: MachTableQuerySource<TQuery>;
|
|
58
|
+
/** Stable row key used for updates and cross-page selection. */
|
|
59
|
+
rowKey: string | ((row: TData) => string | number);
|
|
60
|
+
initialPage?: number;
|
|
61
|
+
pageSize?: number;
|
|
62
|
+
pageSizeOptions?: readonly number[];
|
|
63
|
+
immediate?: boolean;
|
|
64
|
+
debounceMs?: number;
|
|
65
|
+
keepPreviousData?: boolean;
|
|
66
|
+
/** `query` additionally enables compact select-all-matching rules. */
|
|
67
|
+
selectionScope?: "page" | "preserve" | "query";
|
|
68
|
+
/** Defaults true: a different business/filter query cannot inherit stale selections. */
|
|
69
|
+
clearSelectionOnQueryChange?: boolean;
|
|
70
|
+
quickFilterText?: Ref<string | null>;
|
|
71
|
+
/** Replaces the no-rows layer while the latest request is in an error state. */
|
|
72
|
+
errorOverlay?(context: {
|
|
73
|
+
error: unknown;
|
|
74
|
+
retry(): Promise<void>;
|
|
75
|
+
}): OverlayContent;
|
|
76
|
+
emptyOverlay?: OverlayTemplate;
|
|
77
|
+
onSuccess?(result: MachTablePageResult<TData>): void;
|
|
78
|
+
onError?(error: unknown): void;
|
|
79
|
+
}
|
|
80
|
+
interface UseMachTableQueryReturn<TData> {
|
|
81
|
+
rows: ShallowRef<TData[]>;
|
|
82
|
+
loading: Ref<boolean>;
|
|
83
|
+
error: ShallowRef<unknown | null>;
|
|
84
|
+
page: Ref<number>;
|
|
85
|
+
pageSize: Ref<number>;
|
|
86
|
+
total: Ref<number>;
|
|
87
|
+
sortModel: ShallowRef<SortModel>;
|
|
88
|
+
filterModel: ShallowRef<FilterModel>;
|
|
89
|
+
selectedKeys: Ref<string[]>;
|
|
90
|
+
selectedRows: ShallowRef<TData[]>;
|
|
91
|
+
selectionState: ComputedRef<MachTableRemoteSelectionState>;
|
|
92
|
+
gridProps: ComputedRef<GridOptions<TData>>;
|
|
93
|
+
bindings: ComputedRef<GridOptions<TData>>;
|
|
94
|
+
reload(options?: {
|
|
95
|
+
resetPage?: boolean;
|
|
96
|
+
}): Promise<void>;
|
|
97
|
+
retry(): Promise<void>;
|
|
98
|
+
reset(): Promise<void>;
|
|
99
|
+
abort(): void;
|
|
100
|
+
clearSelection(): void;
|
|
101
|
+
/** Selects the complete server query without downloading every row ID. */
|
|
102
|
+
selectAllMatching(): void;
|
|
103
|
+
applySelectionState(state: MachTableRemoteSelectionState): void;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* B-side remote-list controller: paging, sorting, filtering, cancellation,
|
|
107
|
+
* stale-response protection and cross-page selection in one typed binding.
|
|
108
|
+
*/
|
|
109
|
+
declare function useMachTableQuery<TData, TQuery = Record<string, unknown>>(options: UseMachTableQueryOptions<TData, TQuery>): UseMachTableQueryReturn<TData>;
|
|
110
|
+
|
|
111
|
+
export { type MachTablePageRequest as M, type UseMachTableEditingOptions as U, type MachTablePageResult as a, type MachTableQuerySource as b, type MachTableRemoteSelectionState as c, type UseMachTableEditingReturn as d, type UseMachTableQueryOptions as e, type UseMachTableQueryReturn as f, type UseMachTableReturn as g, useMachTableEditing as h, useMachTableQuery as i, useMachTable as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["d:\\office-project\\wl\\MachTable\\packages\\vue\\dist\\workflows.cjs"],"names":[],"mappings":"AAAA,iIAA+C,mGAAwD","file":"D:\\office-project\\wl\\MachTable\\packages\\vue\\dist\\workflows.cjs"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { M as MachTablePageRequest, a as MachTablePageResult, b as MachTableQuerySource, c as MachTableRemoteSelectionState, U as UseMachTableEditingOptions, d as UseMachTableEditingReturn, e as UseMachTableQueryOptions, f as UseMachTableQueryReturn, h as useMachTableEditing, i as useMachTableQuery } from './workflows-Dg6KsN85.cjs';
|
|
2
|
+
import 'vue';
|
|
3
|
+
import '@agile-team/mach-table';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { M as MachTablePageRequest, a as MachTablePageResult, b as MachTableQuerySource, c as MachTableRemoteSelectionState, U as UseMachTableEditingOptions, d as UseMachTableEditingReturn, e as UseMachTableQueryOptions, f as UseMachTableQueryReturn, h as useMachTableEditing, i as useMachTableQuery } from './workflows-Dg6KsN85.js';
|
|
2
|
+
import 'vue';
|
|
3
|
+
import '@agile-team/mach-table';
|