@economic/taco 2.46.10-alpha.0 → 2.46.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Icon/components/Autopay.d.ts +3 -0
- package/dist/components/Icon/components/AutopayPaused.d.ts +3 -0
- package/dist/components/Icon/components/Person.d.ts +3 -0
- package/dist/components/Icon/components/PersonSolid.d.ts +3 -0
- package/dist/components/Icon/components/Wallet.d.ts +3 -0
- package/dist/components/Icon/components/index.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Menu/components/Item.d.ts +1 -1
- package/dist/components/Menu/components/Link.d.ts +1 -1
- package/dist/components/Navigation2/components/Link.d.ts +1 -1
- package/dist/components/Report/Report.d.ts +1 -1
- package/dist/components/Select2/components/Option.d.ts +4 -4
- package/dist/components/Select2/components/Search.d.ts +1 -1
- package/dist/components/Table3/components/Row/Editing/CreateNewRow.d.ts +1 -2
- package/dist/components/Table3/components/Row/Editing/TemporaryRow.d.ts +1 -0
- package/dist/components/Table3/util/editing.d.ts +3 -0
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/esm/index.css +13 -4
- package/dist/esm/packages/taco/src/components/Badge/Badge.js +9 -6
- package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Button/Button.js +2 -1
- package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/index.js +10 -0
- package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Option.js +7 -5
- package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +56 -19
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +1 -1
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js +15 -7
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +2 -4
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +3 -3
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js +9 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tag/Tag.js +6 -4
- package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +4 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +7 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +6 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +5 -3
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +0 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +3 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +7 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
- package/dist/index.css +13 -4
- package/dist/primitives/Table/Core/Table.d.ts +1 -0
- package/dist/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.d.ts +3 -0
- package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +0 -1
- package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +0 -3
- package/dist/primitives/Table/types.d.ts +2 -1
- package/dist/primitives/Table/useTableManager/features/useTableRowExpansion.d.ts +2 -1
- package/dist/taco.cjs.development.js +220 -63
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +2 -3
@@ -391,6 +391,36 @@ function IconAttach(props, svgRef) {
|
|
391
391
|
}
|
392
392
|
var Attach = /*#__PURE__*/React.forwardRef(IconAttach);
|
393
393
|
|
394
|
+
function IconAutopayPaused(props, svgRef) {
|
395
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
396
|
+
fill: "none",
|
397
|
+
xmlns: "http://www.w3.org/2000/svg",
|
398
|
+
viewBox: "0 0 24 24",
|
399
|
+
ref: svgRef
|
400
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
401
|
+
fillRule: "evenodd",
|
402
|
+
clipRule: "evenodd",
|
403
|
+
d: "M9.356 2.503a.743.743 0 10.449 1.417 9.323 9.323 0 011.909-.391 8.998 8.998 0 011.883.013.743.743 0 10.168-1.476 10.484 10.484 0 00-2.195-.016 10.81 10.81 0 00-2.214.453zM7.46 5.037a.743.743 0 10-.817-1.241c-.628.413-1.215.893-1.747 1.433-.52.528-.978 1.103-1.366 1.712a.743.743 0 101.253.798 8.928 8.928 0 011.17-1.467A9.28 9.28 0 017.46 5.037zm9.14-2.22a.743.743 0 00-.59 1.363 7.904 7.904 0 011.611.935c.484.363.914.776 1.287 1.229a.743.743 0 001.147-.945 9.004 9.004 0 00-1.54-1.472 9.387 9.387 0 00-1.915-1.11zM3.767 10.008a.743.743 0 10-1.432-.396A9.316 9.316 0 002 11.795a.743.743 0 101.485.048 7.83 7.83 0 01.282-1.835zm17.716-2.152a.743.743 0 10-1.389.529c.21.549.353 1.126.425 1.723a.743.743 0 101.476-.18 8.81 8.81 0 00-.512-2.072zm-9.28-.732c-.26 0-.527.127-.527.505v.406c-1.567.145-2.577 1.085-2.577 2.426 0 1.125.639 1.862 1.907 2.182l1.296.285c.836.18 1.167.435 1.167.87 0 .558-.441.923-1.26.923-.586 0-1.154-.244-1.67-.714-.332-.278-.54-.36-.796-.36-.412 0-.743.256-.743.709 0 .348.186.684.51.98.482.447 1.26.72 2.143.796v.354c0 .371.272.505.533.505.262 0 .529-.134.529-.505v-.366c1.625-.191 2.64-1.143 2.64-2.519 0-1.133-.652-1.845-1.978-2.156l-1.3-.27c-.738-.145-1.075-.424-1.075-.859 0-.488.436-.876 1.12-.876.581 0 .999.185 1.492.655.29.25.528.36.842.36.366 0 .667-.267.667-.65 0-.325-.174-.667-.499-.975-.43-.418-1.12-.685-1.892-.783v-.418c0-.372-.267-.505-.528-.505zm8.802 8.025a.743.743 0 00-.946.457 7.718 7.718 0 01-2.763 3.704 8.23 8.23 0 01-4.48 1.548 8.628 8.628 0 01-4.69-1.152c-.906-.524-1.649-1.03-2.262-1.749l.79.276a.743.743 0 10.49-1.404l-2.732-.952a.743.743 0 00-.946.458l-.997 2.86a.743.743 0 101.403.49l.45-1.294c.84 1.193 1.88 1.918 3.06 2.601a10.114 10.114 0 005.5 1.35 9.715 9.715 0 005.287-1.83 9.204 9.204 0 003.293-4.417.743.743 0 00-.457-.946z",
|
404
|
+
fill: "currentColor"
|
405
|
+
}));
|
406
|
+
}
|
407
|
+
var AutopayPaused = /*#__PURE__*/React.forwardRef(IconAutopayPaused);
|
408
|
+
|
409
|
+
function IconAutopay(props, svgRef) {
|
410
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
411
|
+
fill: "none",
|
412
|
+
xmlns: "http://www.w3.org/2000/svg",
|
413
|
+
viewBox: "0 0 24 24",
|
414
|
+
ref: svgRef
|
415
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
416
|
+
fillRule: "evenodd",
|
417
|
+
clipRule: "evenodd",
|
418
|
+
d: "M1.367 6.142a.734.734 0 011.003.269l.83 1.438a9.885 9.885 0 017.774-5.769 9.993 9.993 0 015.73.975 10.135 10.135 0 014.249 4.002.734.734 0 01-1.272.734 8.667 8.667 0 00-3.633-3.422 8.525 8.525 0 00-4.888-.832 8.417 8.417 0 00-6.355 4.376l.749-.433a.734.734 0 01.734 1.271l-2.56 1.479a.734.734 0 01-1.004-.269L1.098 7.145a.734.734 0 01.27-1.003zm2.895 10.273a.734.734 0 011.003.269 7.627 7.627 0 003.384 3.09 8.195 8.195 0 004.668.668 8.64 8.64 0 004.376-2.005c.792-.684 1.427-1.318 1.895-2.138l-.731.422a.734.734 0 01-.734-1.27l2.495-1.442a.734.734 0 011.003.27l1.501 2.6a.734.734 0 01-1.271.734l-.683-1.183c-.6 1.326-1.485 2.229-2.516 3.118a10.107 10.107 0 01-5.122 2.346 9.664 9.664 0 01-5.504-.79 9.095 9.095 0 01-4.032-3.686.734.734 0 01.268-1.003zm7.382-8.75c0-.372.264-.498.522-.498s.521.132.521.499v.413c.763.097 1.446.361 1.87.774.321.304.493.642.493.963 0 .379-.298.643-.66.643-.309 0-.544-.11-.83-.356-.488-.464-.901-.648-1.475-.648-.676 0-1.107.384-1.107.866 0 .43.333.706 1.062.849l1.285.267c1.31.307 1.955 1.01 1.955 2.13 0 1.36-1.004 2.3-2.61 2.489v.361c0 .367-.264.5-.522.5s-.527-.133-.527-.5v-.35c-.872-.074-1.64-.344-2.116-.785-.322-.293-.505-.625-.505-.97 0-.447.327-.7.734-.7.252 0 .459.081.786.357.51.464 1.072.705 1.651.705.809 0 1.245-.361 1.245-.912 0-.43-.327-.682-1.153-.86l-1.281-.282c-1.253-.316-1.885-1.044-1.885-2.155 0-1.325.998-2.254 2.547-2.398v-.401z",
|
419
|
+
fill: "currentColor"
|
420
|
+
}));
|
421
|
+
}
|
422
|
+
var Autopay = /*#__PURE__*/React.forwardRef(IconAutopay);
|
423
|
+
|
394
424
|
function IconAutotextInsert(props, svgRef) {
|
395
425
|
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
396
426
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -2626,6 +2656,21 @@ function IconPersonPlus(props, svgRef) {
|
|
2626
2656
|
}
|
2627
2657
|
var PersonPlus = /*#__PURE__*/React.forwardRef(IconPersonPlus);
|
2628
2658
|
|
2659
|
+
function IconPersonSolid(props, svgRef) {
|
2660
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
2661
|
+
fill: "none",
|
2662
|
+
xmlns: "http://www.w3.org/2000/svg",
|
2663
|
+
viewBox: "0 0 24 24",
|
2664
|
+
ref: svgRef
|
2665
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
2666
|
+
fillRule: "evenodd",
|
2667
|
+
clipRule: "evenodd",
|
2668
|
+
d: "M12 11.5c4.553 0 7.21 2.43 7.969 7.29.24 1.537-.928 2.962-2.608 3.182-.144.018-.29.028-.435.028H7.074C5.376 22 4 20.74 4 19.187c0-.133.01-.266.03-.398C4.79 13.93 7.448 11.5 12 11.5zM12 2c2.112 0 3.825 1.903 3.825 4.25S14.112 10.5 12 10.5c-2.113 0-3.825-1.903-3.825-4.25S9.887 2 12 2z",
|
2669
|
+
fill: "currentColor"
|
2670
|
+
}));
|
2671
|
+
}
|
2672
|
+
var PersonSolid = /*#__PURE__*/React.forwardRef(IconPersonSolid);
|
2673
|
+
|
2629
2674
|
function IconPersonTick(props, svgRef) {
|
2630
2675
|
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
2631
2676
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -2639,6 +2684,21 @@ function IconPersonTick(props, svgRef) {
|
|
2639
2684
|
}
|
2640
2685
|
var PersonTick = /*#__PURE__*/React.forwardRef(IconPersonTick);
|
2641
2686
|
|
2687
|
+
function IconPerson(props, svgRef) {
|
2688
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
2689
|
+
fill: "none",
|
2690
|
+
xmlns: "http://www.w3.org/2000/svg",
|
2691
|
+
viewBox: "0 0 24 24",
|
2692
|
+
ref: svgRef
|
2693
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
2694
|
+
fillRule: "evenodd",
|
2695
|
+
clipRule: "evenodd",
|
2696
|
+
d: "M12 11.5c4.553 0 7.21 2.43 7.969 7.29.24 1.537-.928 2.962-2.608 3.182-.144.018-.29.028-.435.028H7.074C5.376 22 4 20.74 4 19.187c0-.133.01-.266.03-.398C4.79 13.93 7.448 11.5 12 11.5zm0 1.5c-3.684 0-5.696 1.84-6.346 6.002-.01.061-.015.123-.015.186 0 .68.565 1.238 1.288 1.305l.147.007h9.852c.068 0 .136-.004.203-.013.784-.103 1.329-.768 1.217-1.485C17.696 14.84 15.684 13 12 13zm0-11c2.112 0 3.825 1.903 3.825 4.25S14.112 10.5 12 10.5c-2.113 0-3.825-1.903-3.825-4.25S9.887 2 12 2zm0 1.5c-1.13 0-2.186 1.174-2.186 2.75S10.87 9 12 9s2.186-1.174 2.186-2.75S13.129 3.5 12 3.5z",
|
2697
|
+
fill: "currentColor"
|
2698
|
+
}));
|
2699
|
+
}
|
2700
|
+
var Person = /*#__PURE__*/React.forwardRef(IconPerson);
|
2701
|
+
|
2642
2702
|
function IconPhoneSolid(props, svgRef) {
|
2643
2703
|
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
2644
2704
|
fill: "none",
|
@@ -3408,6 +3468,21 @@ function IconUnreconciled(props, svgRef) {
|
|
3408
3468
|
}
|
3409
3469
|
var Unreconciled = /*#__PURE__*/React.forwardRef(IconUnreconciled);
|
3410
3470
|
|
3471
|
+
function IconWallet(props, svgRef) {
|
3472
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
3473
|
+
fill: "none",
|
3474
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3475
|
+
viewBox: "0 0 24 24",
|
3476
|
+
ref: svgRef
|
3477
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
3478
|
+
fillRule: "evenodd",
|
3479
|
+
clipRule: "evenodd",
|
3480
|
+
d: "M4.75 4.5h14.5a.25.25 0 01.25.25V7H16a5 5 0 000 10h3.5v2.25a.25.25 0 01-.25.25H4.75a.25.25 0 01-.25-.25V4.75a.25.25 0 01.25-.25zM22 7h-1V4.75A1.75 1.75 0 0019.25 3H4.75A1.75 1.75 0 003 4.75v14.5c0 .966.784 1.75 1.75 1.75h14.5A1.75 1.75 0 0021 19.25V17h1a1 1 0 001-1V8a1 1 0 00-1-1zm-.5 1.5H16a3.5 3.5 0 100 7h5.5v-7zm-5.5 5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z",
|
3481
|
+
fill: "currentColor"
|
3482
|
+
}));
|
3483
|
+
}
|
3484
|
+
var Wallet = /*#__PURE__*/React.forwardRef(IconWallet);
|
3485
|
+
|
3411
3486
|
function IconWarning(props, svgRef) {
|
3412
3487
|
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
3413
3488
|
fill: "none",
|
@@ -3505,6 +3580,8 @@ const icons = {
|
|
3505
3580
|
'attach-cancel': AttachCancel,
|
3506
3581
|
'attach-warning': AttachWarning,
|
3507
3582
|
attach: Attach,
|
3583
|
+
'autopay-paused': AutopayPaused,
|
3584
|
+
autopay: Autopay,
|
3508
3585
|
'autotext-insert': AutotextInsert,
|
3509
3586
|
autotext: Autotext,
|
3510
3587
|
'basic-tabs': BasicTabs,
|
@@ -3671,7 +3748,9 @@ const icons = {
|
|
3671
3748
|
'person-change': PersonChange,
|
3672
3749
|
'person-minus': PersonMinus,
|
3673
3750
|
'person-plus': PersonPlus,
|
3751
|
+
'person-solid': PersonSolid,
|
3674
3752
|
'person-tick': PersonTick,
|
3753
|
+
person: Person,
|
3675
3754
|
'phone-solid': PhoneSolid,
|
3676
3755
|
phone: Phone,
|
3677
3756
|
play: Play,
|
@@ -3730,6 +3809,7 @@ const icons = {
|
|
3730
3809
|
undo: Undo,
|
3731
3810
|
undock: Undock,
|
3732
3811
|
unreconciled: Unreconciled,
|
3812
|
+
wallet: Wallet,
|
3733
3813
|
warning: Warning,
|
3734
3814
|
webshop: Webshop,
|
3735
3815
|
website: Website,
|
@@ -4083,10 +4163,10 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
4083
4163
|
...otherProps
|
4084
4164
|
} = props;
|
4085
4165
|
const isTransparent = color === 'transparent';
|
4086
|
-
const className = cn('rounded-full border overflow-hidden whitespace-nowrap inline-flex items-center justify-center', {
|
4166
|
+
const className = cn('rounded-full border box-border overflow-hidden whitespace-nowrap inline-flex items-center justify-center', {
|
4087
4167
|
[`border ${getOutlineColorShadeClasses(color)}`]: outline,
|
4088
|
-
[`border-
|
4089
|
-
[`border-
|
4168
|
+
[`border-none font-normal ${getSubtleColorShadeClasses(color)}`]: subtle,
|
4169
|
+
[`border-none ${getColorShadeClasses(color)}`]: !outline && !subtle,
|
4090
4170
|
'h-4 min-w-0 py-0 px-1 text-xs': small,
|
4091
4171
|
'h-2 w-2 min-w-0': compact,
|
4092
4172
|
'font-bold': outline || !subtle,
|
@@ -4098,12 +4178,15 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
4098
4178
|
if (compact) {
|
4099
4179
|
return /*#__PURE__*/React.createElement(VisuallyHidden, null, children);
|
4100
4180
|
}
|
4181
|
+
const contentToRender = typeof children === 'string' ? /*#__PURE__*/React.createElement("span", {
|
4182
|
+
className: "items-center truncate"
|
4183
|
+
}, children) : children;
|
4101
4184
|
if (status) {
|
4102
4185
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
4103
|
-
className: cn('mr-1 h-2 w-2 rounded-full', getColorShadeClasses(color))
|
4104
|
-
}),
|
4186
|
+
className: cn('mr-1 h-2 w-2 shrink-0 rounded-full', getColorShadeClasses(color))
|
4187
|
+
}), contentToRender);
|
4105
4188
|
}
|
4106
|
-
return
|
4189
|
+
return contentToRender;
|
4107
4190
|
};
|
4108
4191
|
return /*#__PURE__*/React.createElement("span", Object.assign({}, otherProps, {
|
4109
4192
|
"aria-atomic": "true",
|
@@ -4858,7 +4941,8 @@ const Base$1 = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
4858
4941
|
}, props.className);
|
4859
4942
|
return createButtonWithTooltip({
|
4860
4943
|
...otherProps,
|
4861
|
-
'data-taco': 'button'
|
4944
|
+
'data-taco': 'button',
|
4945
|
+
'data-appearance': appearance
|
4862
4946
|
}, className, ref);
|
4863
4947
|
});
|
4864
4948
|
const Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
|
@@ -8282,7 +8366,7 @@ const Shortcut = ({
|
|
8282
8366
|
className: className
|
8283
8367
|
}), texts.map(key => (/*#__PURE__*/React__default.createElement("kbd", {
|
8284
8368
|
key: key,
|
8285
|
-
className: "font-display text-grey-700 [[data-taco=tooltip]_&]:bg-grey-300/[0.25] rounded-sm bg-black/[0.09] px-1 text-center font-bold [[data-taco=tooltip]_&]:text-white"
|
8369
|
+
className: "font-display text-grey-700 [[data-taco=tooltip]_&]:bg-grey-300/[0.25] rounded-sm bg-black/[0.09] px-1 text-center font-bold [[data-appearance=danger]_&]:text-white [[data-appearance=primary]_&]:text-white [[data-taco=tooltip]_&]:text-white"
|
8286
8370
|
}, key))));
|
8287
8371
|
};
|
8288
8372
|
|
@@ -10525,6 +10609,7 @@ const DEFAULT_PRESET = {
|
|
10525
10609
|
enableColumnHiding: false,
|
10526
10610
|
enableColumnResizing: false,
|
10527
10611
|
enableRowExpansion: false,
|
10612
|
+
enableRowExpansionAll: true,
|
10528
10613
|
enableRowSelection: false,
|
10529
10614
|
// custom -- common between all table types
|
10530
10615
|
enableColumnOrdering: false,
|
@@ -10551,6 +10636,7 @@ const presets = {
|
|
10551
10636
|
enableColumnHiding: true,
|
10552
10637
|
enableColumnResizing: true,
|
10553
10638
|
enableRowExpansion: true,
|
10639
|
+
enableRowExpansionAll: true,
|
10554
10640
|
enableRowSelection: true,
|
10555
10641
|
// custom -- common between all table types
|
10556
10642
|
enableColumnOrdering: true,
|
@@ -10576,6 +10662,7 @@ const presets = {
|
|
10576
10662
|
enableColumnHiding: false,
|
10577
10663
|
enableColumnResizing: false,
|
10578
10664
|
enableRowExpansion: true,
|
10665
|
+
enableRowExpansionAll: true,
|
10579
10666
|
enableRowSelection: true,
|
10580
10667
|
// custom -- common between all table types
|
10581
10668
|
enableColumnOrdering: false,
|
@@ -10601,6 +10688,7 @@ const presets = {
|
|
10601
10688
|
enableColumnHiding: false,
|
10602
10689
|
enableColumnResizing: false,
|
10603
10690
|
enableRowExpansion: true,
|
10691
|
+
enableRowExpansionAll: true,
|
10604
10692
|
enableRowSelection: false,
|
10605
10693
|
// custom -- common between all table types
|
10606
10694
|
enableColumnOrdering: false,
|
@@ -10618,7 +10706,7 @@ const presets = {
|
|
10618
10706
|
}
|
10619
10707
|
};
|
10620
10708
|
function getTableFeaturePreset(props) {
|
10621
|
-
var _props$enableRowActio, _props$enableRowClick, _props$enableRowDrag, _props$enableRowDrop, _props$enableRowGoto, _props$enableRowExpan, _props$enableRowSelec, _props$enableFilterin, _props$enableSearch, _props$enableSorting, _props$enableColumnFr, _props$enableColumnHi, _props$enableColumnRe, _props$enableColumnOr, _props$enableFontSize, _props$enableFooter, _props$enablePrinting, _props$enableRowActiv, _props$rowActions, _props$enableRowHeigh, _props$enableSaveSett;
|
10709
|
+
var _props$enableRowActio, _props$enableRowClick, _props$enableRowDrag, _props$enableRowDrop, _props$enableRowGoto, _props$enableRowExpan, _props$enableRowExpan2, _props$enableRowSelec, _props$enableFilterin, _props$enableSearch, _props$enableSorting, _props$enableColumnFr, _props$enableColumnHi, _props$enableColumnRe, _props$enableColumnOr, _props$enableFontSize, _props$enableFooter, _props$enablePrinting, _props$enableRowActiv, _props$rowActions, _props$enableRowHeigh, _props$enableSaveSett;
|
10622
10710
|
const presetOptions = props.preset ? presets[props.preset] : DEFAULT_PRESET;
|
10623
10711
|
const enableRowActions = (_props$enableRowActio = props.enableRowActions) !== null && _props$enableRowActio !== void 0 ? _props$enableRowActio : presetOptions.enableRowActions;
|
10624
10712
|
const enableRowClick = (_props$enableRowClick = props.enableRowClick) !== null && _props$enableRowClick !== void 0 ? _props$enableRowClick : presetOptions.enableRowClick;
|
@@ -10626,6 +10714,7 @@ function getTableFeaturePreset(props) {
|
|
10626
10714
|
const enableRowDrop = (_props$enableRowDrop = props.enableRowDrop) !== null && _props$enableRowDrop !== void 0 ? _props$enableRowDrop : presetOptions.enableRowDrop;
|
10627
10715
|
const enableRowGoto = (_props$enableRowGoto = props.enableRowGoto) !== null && _props$enableRowGoto !== void 0 ? _props$enableRowGoto : presetOptions.enableRowGoto;
|
10628
10716
|
const enableRowExpansion = (_props$enableRowExpan = props.enableRowExpansion) !== null && _props$enableRowExpan !== void 0 ? _props$enableRowExpan : presetOptions.enableRowExpansion;
|
10717
|
+
const enableRowExpansionAll = (_props$enableRowExpan2 = props.enableRowExpansionAll) !== null && _props$enableRowExpan2 !== void 0 ? _props$enableRowExpan2 : presetOptions.enableRowExpansionAll;
|
10629
10718
|
const enableRowSelection = (_props$enableRowSelec = props.enableRowSelection) !== null && _props$enableRowSelec !== void 0 ? _props$enableRowSelec : presetOptions.enableRowSelection;
|
10630
10719
|
return {
|
10631
10720
|
// react-table built-in
|
@@ -10650,6 +10739,7 @@ function getTableFeaturePreset(props) {
|
|
10650
10739
|
enableRowDrag: enableRowDrag && !!props.onRowDrag,
|
10651
10740
|
enableRowDrop: enableRowDrop && !!props.onRowDrop,
|
10652
10741
|
enableRowGoto: enableRowGoto && !!props.onRowGoto,
|
10742
|
+
enableRowExpansionAll: enableRowExpansion && enableRowExpansionAll && !!props.rowExpansionRenderer,
|
10653
10743
|
enableRowHeight: (_props$enableRowHeigh = props.enableRowHeight) !== null && _props$enableRowHeigh !== void 0 ? _props$enableRowHeigh : presetOptions.enableRowHeight,
|
10654
10744
|
enableSaveSettings: (_props$enableSaveSett = props.enableSaveSettings) !== null && _props$enableSaveSett !== void 0 ? _props$enableSaveSett : presetOptions.enableSaveSettings
|
10655
10745
|
};
|
@@ -10894,9 +10984,10 @@ function useTableRowClick(isEnabled = false, onRowClick) {
|
|
10894
10984
|
};
|
10895
10985
|
}
|
10896
10986
|
|
10897
|
-
function useTableRowExpansion(isEnabled = false, rowExpansionRenderer) {
|
10987
|
+
function useTableRowExpansion(isEnabled = false, canExpandAll = true, rowExpansionRenderer) {
|
10898
10988
|
return {
|
10899
10989
|
isEnabled,
|
10990
|
+
canExpandAll,
|
10900
10991
|
rowExpansionRenderer: isEnabled ? rowExpansionRenderer : undefined
|
10901
10992
|
};
|
10902
10993
|
}
|
@@ -11737,7 +11828,7 @@ function useTableManager(props, meta, internalColumns) {
|
|
11737
11828
|
const rowClick = useTableRowClick(options.enableRowClick, props.onRowClick);
|
11738
11829
|
const rowDrag = useTableRowDrag(options.enableRowDrag && !(meta !== null && meta !== void 0 && (_meta$editing = meta.editing) !== null && _meta$editing !== void 0 && _meta$editing.isEditing), props.onRowDrag);
|
11739
11830
|
const rowDrop = useTableRowDrop(options.enableRowDrop, props.onRowDrop);
|
11740
|
-
const rowExpansion = useTableRowExpansion(options.enableRowExpansion, props.rowExpansionRenderer);
|
11831
|
+
const rowExpansion = useTableRowExpansion(options.enableRowExpansion, options.enableRowExpansionAll, props.rowExpansionRenderer);
|
11741
11832
|
const rowGoto = useTableRowGoto(options.enableRowGoto, props.onRowGoto);
|
11742
11833
|
const rowGroups = useTableRowGroups(props.rowActionsForGroup);
|
11743
11834
|
const rowHeight = useTableRowHeight(options.enableRowHeight, settings.rowHeight);
|
@@ -12479,6 +12570,10 @@ function Header$3(context) {
|
|
12479
12570
|
const {
|
12480
12571
|
table
|
12481
12572
|
} = context;
|
12573
|
+
const tableMeta = table.options.meta;
|
12574
|
+
if (!tableMeta.rowExpansion.canExpandAll) {
|
12575
|
+
return null;
|
12576
|
+
}
|
12482
12577
|
const isSomeRowsExpanded = table.getIsSomeRowsExpanded();
|
12483
12578
|
const handleClick = event => {
|
12484
12579
|
event.stopPropagation();
|
@@ -13785,8 +13880,13 @@ function Summary(props) {
|
|
13785
13880
|
}
|
13786
13881
|
|
13787
13882
|
function Foot(props) {
|
13788
|
-
const
|
13789
|
-
|
13883
|
+
const {
|
13884
|
+
children,
|
13885
|
+
table,
|
13886
|
+
...attributes
|
13887
|
+
} = props;
|
13888
|
+
const nonGroupedHeaders = table.getFooterGroups()[0].headers.filter(header => !header.column.getIsGrouped());
|
13889
|
+
return /*#__PURE__*/React__default.createElement("tfoot", Object.assign({}, attributes), children, /*#__PURE__*/React__default.createElement("tr", null, nonGroupedHeaders.map((header, index) => (/*#__PURE__*/React__default.createElement(Footer$3, {
|
13790
13890
|
key: header.id,
|
13791
13891
|
header: header,
|
13792
13892
|
index: index
|
@@ -14816,14 +14916,16 @@ const Tag$1 = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
14816
14916
|
ref: ref,
|
14817
14917
|
"data-taco": "tag"
|
14818
14918
|
}), /*#__PURE__*/React__default.createElement("span", {
|
14819
|
-
className: "truncate px-2",
|
14919
|
+
className: "flex items-center truncate px-2",
|
14820
14920
|
ref: textRef
|
14821
14921
|
}, icon ? typeof icon === 'string' ? (/*#__PURE__*/React__default.createElement(Icon, {
|
14822
14922
|
name: icon,
|
14823
|
-
className: "-ml-1
|
14923
|
+
className: "-ml-1 mr-1 !h-5 !w-5"
|
14824
14924
|
})) : (/*#__PURE__*/React__default.cloneElement(icon, {
|
14825
|
-
className: 'mr-1 -ml-1
|
14826
|
-
})) : null,
|
14925
|
+
className: 'mr-1 -ml-1 !h-5 !w-5'
|
14926
|
+
})) : null, /*#__PURE__*/React__default.createElement("span", {
|
14927
|
+
className: "truncate"
|
14928
|
+
}, children)), onDelete ? (/*#__PURE__*/React__default.createElement(Icon, {
|
14827
14929
|
name: "close",
|
14828
14930
|
onClick: onDelete,
|
14829
14931
|
className: "-ml-1.5 !h-6 !w-5 flex-shrink-0 cursor-pointer rounded-r p-0.5 hover:bg-black/5"
|
@@ -15102,12 +15204,13 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
|
|
15102
15204
|
}), hasValue ? (/*#__PURE__*/React__default.createElement(Icon, {
|
15103
15205
|
name: "tick",
|
15104
15206
|
className: "pointer-events-none invisible -mx-0.5 !h-4 !w-4 group-aria-selected:visible"
|
15105
|
-
})) : null, isTag ? (/*#__PURE__*/React__default.createElement(Tag$1, {
|
15207
|
+
})) : null, typeof children !== 'string' ? (/*#__PURE__*/React__default.createElement("span", null, children)) : isTag ? (/*#__PURE__*/React__default.createElement(Tag$1, {
|
15106
15208
|
className: "pointer-events-none my-1",
|
15107
15209
|
color: color,
|
15108
15210
|
icon: prefix
|
15109
15211
|
}, children)) : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, prefix ? typeof prefix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
|
15110
|
-
name: prefix
|
15212
|
+
name: prefix,
|
15213
|
+
className: "!h-5 !w-5"
|
15111
15214
|
}) : prefix : null, /*#__PURE__*/React__default.createElement("span", {
|
15112
15215
|
className: "flex w-full justify-between"
|
15113
15216
|
}, /*#__PURE__*/React__default.createElement("span", {
|
@@ -15116,9 +15219,10 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
|
|
15116
15219
|
className: "text-grey-700 -mt-1.5 mb-1.5 text-xs"
|
15117
15220
|
}, description) : null), /*#__PURE__*/React__default.createElement("span", {
|
15118
15221
|
className: "flex flex-col self-center"
|
15119
|
-
}, postfix ? typeof postfix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
|
15120
|
-
name: postfix
|
15121
|
-
|
15222
|
+
}, postfix ? typeof postfix === 'string' ? (/*#__PURE__*/React__default.createElement(Icon, {
|
15223
|
+
name: postfix,
|
15224
|
+
className: "!h-5 !w-5"
|
15225
|
+
})) : postfix : null)))), popover ? (/*#__PURE__*/React__default.createElement(IconButton, {
|
15122
15226
|
icon: "ellipsis-vertical",
|
15123
15227
|
appearance: "discrete",
|
15124
15228
|
className: cn('group-aria-current:visible invisible -mr-1 ml-auto !h-5 min-h-[theme(spacing.6)] !w-5 min-w-[theme(spacing.6)] hover:!bg-black/[.08] focus:!shadow-none group-hover:visible', {
|
@@ -15284,7 +15388,7 @@ const Single = /*#__PURE__*/React__default.forwardRef(function Select2TriggerSin
|
|
15284
15388
|
readOnly,
|
15285
15389
|
tags
|
15286
15390
|
} = useSelect2Context();
|
15287
|
-
const contentClassName = cn('truncate items-center gap-1');
|
15391
|
+
const contentClassName = cn('truncate flex items-center gap-1');
|
15288
15392
|
const currentValue = children.find(matchesValue(value));
|
15289
15393
|
let output;
|
15290
15394
|
if (placeholder && currentValue === undefined) {
|
@@ -15294,13 +15398,13 @@ const Single = /*#__PURE__*/React__default.forwardRef(function Select2TriggerSin
|
|
15294
15398
|
}, placeholder);
|
15295
15399
|
} else if (currentValue) {
|
15296
15400
|
if (tags && emptyValue !== value) {
|
15297
|
-
output = /*#__PURE__*/React__default.createElement(Tag$1, {
|
15401
|
+
if (typeof currentValue.props.children === 'string') output = /*#__PURE__*/React__default.createElement(Tag$1, {
|
15298
15402
|
className: "truncate",
|
15299
15403
|
color: currentValue.props.color,
|
15300
15404
|
disabled: disabled,
|
15301
15405
|
icon: currentValue.props.prefix,
|
15302
15406
|
readOnly: readOnly
|
15303
|
-
}, currentValue.props.children);
|
15407
|
+
}, currentValue.props.children);else output = currentValue.props.children;
|
15304
15408
|
} else {
|
15305
15409
|
output = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, currentValue.props.prefix ? typeof currentValue.props.prefix === 'string' ? (/*#__PURE__*/React__default.createElement(Icon, {
|
15306
15410
|
name: currentValue.props.prefix,
|
@@ -15351,7 +15455,7 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
15351
15455
|
}, valuesAsChildren.length === 0 ? (/*#__PURE__*/React__default.createElement(Placeholder, {
|
15352
15456
|
disabled: disabled,
|
15353
15457
|
readOnly: readOnly
|
15354
|
-
}, placeholder)) : valuesAsChildren.map(child => (/*#__PURE__*/React__default.createElement(Tag$1, {
|
15458
|
+
}, placeholder)) : valuesAsChildren.map(child => typeof child.props.children === 'string' ? (/*#__PURE__*/React__default.createElement(Tag$1, {
|
15355
15459
|
key: String(child.props.value),
|
15356
15460
|
className: "truncate",
|
15357
15461
|
color: tags ? child.props.color : undefined,
|
@@ -15365,7 +15469,23 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
15365
15469
|
}
|
15366
15470
|
},
|
15367
15471
|
readOnly: readOnly
|
15368
|
-
}, child.props.children))
|
15472
|
+
}, child.props.children)) : (/*#__PURE__*/React__default.cloneElement(child.props.children, {
|
15473
|
+
key: String(child.props.value),
|
15474
|
+
className: '!pr-0 !pl-1.5',
|
15475
|
+
children: (/*#__PURE__*/React__default.createElement("span", {
|
15476
|
+
className: "flex items-center"
|
15477
|
+
}, child.props.children.props.children, /*#__PURE__*/React__default.createElement(Icon, {
|
15478
|
+
name: "close",
|
15479
|
+
onClick: event => {
|
15480
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
15481
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
15482
|
+
if (!disabled && !readOnly) {
|
15483
|
+
setValue(child.props.value);
|
15484
|
+
}
|
15485
|
+
},
|
15486
|
+
className: "ml-0.5 !h-5 !w-5 shrink-0 cursor-pointer rounded-r p-0.5 hover:bg-black/5"
|
15487
|
+
})))
|
15488
|
+
})))));
|
15369
15489
|
} else {
|
15370
15490
|
content = /*#__PURE__*/React__default.createElement(MultipleValue, {
|
15371
15491
|
onClick: forwardClick,
|
@@ -15396,6 +15516,18 @@ const MultipleValue = ({
|
|
15396
15516
|
} = useSelect2Context();
|
15397
15517
|
const [contentRef, setContentRef] = React__default.useState(null);
|
15398
15518
|
const boundaryIndex = contentRef ? getIndexOfFirstChildOverflowingParent(contentRef, 30) : undefined;
|
15519
|
+
// Retrieves the relevant text content from any JSX.Element passed as a select option, handling nested elements, arrays, and direct text
|
15520
|
+
const getTooltipTitle = child => {
|
15521
|
+
const children = child.props.children;
|
15522
|
+
if (typeof children === 'string') return children;
|
15523
|
+
if (typeof children.props.children === 'string') {
|
15524
|
+
return children.props.children;
|
15525
|
+
}
|
15526
|
+
if (Array.isArray(children.props.children)) {
|
15527
|
+
return children.props.children.filter(item => typeof item === 'string');
|
15528
|
+
}
|
15529
|
+
return '';
|
15530
|
+
};
|
15399
15531
|
return /*#__PURE__*/React__default.createElement("div", {
|
15400
15532
|
className: "relative flex w-full items-center gap-1 overflow-hidden",
|
15401
15533
|
onClick: onClick
|
@@ -15406,26 +15538,35 @@ const MultipleValue = ({
|
|
15406
15538
|
disabled: disabled,
|
15407
15539
|
readOnly: readOnly
|
15408
15540
|
}, placeholder)) : valuesAsChildren.map((child, index) => {
|
15409
|
-
const
|
15410
|
-
|
15541
|
+
const classNames = {
|
15542
|
+
truncate: index === boundaryIndex,
|
15543
|
+
hidden: boundaryIndex !== undefined && boundaryIndex !== null ? index > boundaryIndex : false
|
15544
|
+
};
|
15545
|
+
let output;
|
15546
|
+
if (typeof child.props.children === 'string') {
|
15547
|
+
output = /*#__PURE__*/React__default.createElement(Tag$1, {
|
15548
|
+
key: String(child.props.value),
|
15549
|
+
className: cn('cursor-pointer', classNames),
|
15550
|
+
color: tags ? child.props.color : undefined,
|
15551
|
+
disabled: disabled,
|
15552
|
+
icon: child.props.prefix,
|
15553
|
+
readOnly: readOnly
|
15554
|
+
}, child.props.children);
|
15555
|
+
} else output = /*#__PURE__*/React__default.cloneElement(child.props.children, {
|
15411
15556
|
className: cn('cursor-pointer', {
|
15412
|
-
|
15413
|
-
|
15414
|
-
|
15415
|
-
|
15416
|
-
disabled: disabled,
|
15417
|
-
icon: child.props.prefix,
|
15418
|
-
readOnly: readOnly
|
15419
|
-
}, child.props.children);
|
15557
|
+
'shrink-0': index !== boundaryIndex
|
15558
|
+
}, classNames),
|
15559
|
+
key: String(child.props.value)
|
15560
|
+
});
|
15420
15561
|
if (index === boundaryIndex) {
|
15421
15562
|
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
15422
15563
|
key: String(child.props.value),
|
15423
|
-
title: String(child
|
15424
|
-
},
|
15564
|
+
title: String(getTooltipTitle(child))
|
15565
|
+
}, output);
|
15425
15566
|
}
|
15426
|
-
return
|
15567
|
+
return output;
|
15427
15568
|
})), boundaryIndex !== undefined && boundaryIndex !== null && boundaryIndex < valuesAsChildren.length - 1 ? (/*#__PURE__*/React__default.createElement(Tooltip, {
|
15428
|
-
title: valuesAsChildren.slice(boundaryIndex + 1).map(child => child ? String(child
|
15569
|
+
title: valuesAsChildren.slice(boundaryIndex + 1).map(child => child ? String(getTooltipTitle(child)) : '').join(', ')
|
15429
15570
|
}, /*#__PURE__*/React__default.createElement(Badge, {
|
15430
15571
|
className: "flex-shrink-0"
|
15431
15572
|
}, "+", valuesAsChildren.length - (boundaryIndex + 1)))) : null);
|
@@ -16299,10 +16440,11 @@ function guessComparatorsBasedOnControl(column) {
|
|
16299
16440
|
return getDataTypeProperties(columnMeta.dataType).filterComparators;
|
16300
16441
|
}
|
16301
16442
|
|
16443
|
+
const FilterContext = /*#__PURE__*/React__default.createContext([]);
|
16444
|
+
|
16302
16445
|
const FilterColumn = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
16303
16446
|
const {
|
16304
16447
|
allColumns,
|
16305
|
-
filters,
|
16306
16448
|
onChange: handleChange,
|
16307
16449
|
value = null,
|
16308
16450
|
...attributes
|
@@ -16310,6 +16452,7 @@ const FilterColumn = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
16310
16452
|
const {
|
16311
16453
|
texts
|
16312
16454
|
} = useLocalization();
|
16455
|
+
const filters = React__default.useContext(FilterContext);
|
16313
16456
|
const selectedColumn = allColumns.find(column => column.id === value);
|
16314
16457
|
const warning = selectedColumn && !selectedColumn.getIsVisible();
|
16315
16458
|
return /*#__PURE__*/React__default.createElement("div", {
|
@@ -16475,6 +16618,7 @@ function Control(props) {
|
|
16475
16618
|
} = props;
|
16476
16619
|
const controlRenderer = column === null || column === void 0 ? void 0 : (_column$columnDef$met2 = column.columnDef.meta) === null || _column$columnDef$met2 === void 0 ? void 0 : _column$columnDef$met2.control;
|
16477
16620
|
const dataType = column === null || column === void 0 ? void 0 : (_column$columnDef$met3 = column.columnDef.meta) === null || _column$columnDef$met3 === void 0 ? void 0 : _column$columnDef$met3.dataType;
|
16621
|
+
const filters = React__default.useContext(FilterContext);
|
16478
16622
|
React.useEffect(() => {
|
16479
16623
|
// Set value to false only after first render of the control (when it's undefined) after setting the FilterColumn value, because we don't want to change then the value every time filter is opened
|
16480
16624
|
if ((controlRenderer === 'switch' || controlRenderer === 'checkbox') && value === undefined) {
|
@@ -16486,7 +16630,7 @@ function Control(props) {
|
|
16486
16630
|
...attributes,
|
16487
16631
|
setValue: value => onChange(value),
|
16488
16632
|
value
|
16489
|
-
}), {
|
16633
|
+
}, undefined, filters), {
|
16490
16634
|
['data-query-selector']: querySelector,
|
16491
16635
|
className: 'focus:yt-focus'
|
16492
16636
|
});
|
@@ -16528,7 +16672,6 @@ function Filter$1(props) {
|
|
16528
16672
|
const {
|
16529
16673
|
allColumns,
|
16530
16674
|
filter,
|
16531
|
-
filters,
|
16532
16675
|
onChange: handleChange,
|
16533
16676
|
onRemove,
|
16534
16677
|
position
|
@@ -16603,7 +16746,6 @@ function Filter$1(props) {
|
|
16603
16746
|
className: "flex min-h-[theme(spacing.8)] w-14 flex-shrink-0 items-center justify-end pr-2 text-right"
|
16604
16747
|
}, position > 0 ? texts.table.filters.conditions.and : texts.table.filters.conditions.where), /*#__PURE__*/React__default.createElement(FilterColumn, {
|
16605
16748
|
allColumns: allColumns,
|
16606
|
-
filters: filters,
|
16607
16749
|
onChange: handleChangeColumn,
|
16608
16750
|
value: id,
|
16609
16751
|
ref: ref
|
@@ -16707,7 +16849,9 @@ function ManageFiltersPopover(props) {
|
|
16707
16849
|
};
|
16708
16850
|
return /*#__PURE__*/React__default.createElement(Popover, Object.assign({}, popoverProps, {
|
16709
16851
|
onChange: handleClose
|
16710
|
-
}), /*#__PURE__*/React__default.createElement(Popover.Content, null, /*#__PURE__*/React__default.createElement(
|
16852
|
+
}), /*#__PURE__*/React__default.createElement(Popover.Content, null, /*#__PURE__*/React__default.createElement(FilterContext.Provider, {
|
16853
|
+
value: filters
|
16854
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
16711
16855
|
className: "flex w-[40rem] flex-col gap-4"
|
16712
16856
|
}, /*#__PURE__*/React__default.createElement("div", {
|
16713
16857
|
className: "flex h-8"
|
@@ -16723,7 +16867,6 @@ function ManageFiltersPopover(props) {
|
|
16723
16867
|
key: `filter_${index}`,
|
16724
16868
|
allColumns: allColumns,
|
16725
16869
|
filter: filter,
|
16726
|
-
filters: filters,
|
16727
16870
|
position: index,
|
16728
16871
|
onChange: handleChangeFilter,
|
16729
16872
|
onRemove: filters.length > 0 && filters.some(f => f.id) || filters.length > 1 ? handleRemoveFilter : undefined
|
@@ -16739,7 +16882,7 @@ function ManageFiltersPopover(props) {
|
|
16739
16882
|
}, texts.table.filters.buttons.clear), /*#__PURE__*/React__default.createElement(Button$1, {
|
16740
16883
|
appearance: "primary",
|
16741
16884
|
onClick: handleApply
|
16742
|
-
}, texts.table.filters.buttons.apply)))));
|
16885
|
+
}, texts.table.filters.buttons.apply))))));
|
16743
16886
|
}
|
16744
16887
|
|
16745
16888
|
function Filters(props) {
|
@@ -16859,6 +17002,7 @@ function TableGrid(props) {
|
|
16859
17002
|
var _table$state$grouping;
|
16860
17003
|
const {
|
16861
17004
|
enableHorizontalArrowKeyNavigation,
|
17005
|
+
footerRows,
|
16862
17006
|
table,
|
16863
17007
|
...attributes
|
16864
17008
|
} = props;
|
@@ -16901,7 +17045,7 @@ function TableGrid(props) {
|
|
16901
17045
|
} : table.renderer.style
|
16902
17046
|
}, table.renderer.rows, props.children), table.meta.footer.isEnabled ? /*#__PURE__*/React__default.createElement(Foot, {
|
16903
17047
|
table: table.instance
|
16904
|
-
}) : null)))));
|
17048
|
+
}, footerRows) : null)))));
|
16905
17049
|
}
|
16906
17050
|
|
16907
17051
|
function Column$1(_) {
|
@@ -18493,6 +18637,14 @@ const shortcut = {
|
|
18493
18637
|
meta: true,
|
18494
18638
|
shift: false
|
18495
18639
|
};
|
18640
|
+
function isTableScrolled(ref) {
|
18641
|
+
if (ref.current) {
|
18642
|
+
var _ref$current, _ref$current$querySel, _ref$current2, _ref$current2$querySe;
|
18643
|
+
const height = parseFloat(((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : (_ref$current$querySel = _ref$current.querySelector('tbody')) === null || _ref$current$querySel === void 0 ? void 0 : _ref$current$querySel.style.height) || '0') + parseFloat(((_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : (_ref$current2$querySe = _ref$current2.querySelector('tbody')) === null || _ref$current2$querySe === void 0 ? void 0 : _ref$current2$querySe.style.paddingBottom) || '0');
|
18644
|
+
return height > ref.current.scrollHeight;
|
18645
|
+
}
|
18646
|
+
return false;
|
18647
|
+
}
|
18496
18648
|
|
18497
18649
|
function useTableEditingListener(table, tableRef, scrollToIndex) {
|
18498
18650
|
const tableMeta = table.options.meta;
|
@@ -20037,10 +20189,10 @@ function CreateNewRow(props) {
|
|
20037
20189
|
var _temporaryRows$0$tabl, _temporaryRows$, _table$getState$colum;
|
20038
20190
|
const {
|
20039
20191
|
buttonRef,
|
20192
|
+
isScrolled,
|
20040
20193
|
scrollToIndex,
|
20041
20194
|
table,
|
20042
|
-
tableMeta
|
20043
|
-
tableRef
|
20195
|
+
tableMeta
|
20044
20196
|
} = props;
|
20045
20197
|
const {
|
20046
20198
|
texts
|
@@ -20073,11 +20225,9 @@ function CreateNewRow(props) {
|
|
20073
20225
|
keys: shortcut
|
20074
20226
|
});
|
20075
20227
|
}
|
20076
|
-
const isScrolled = tableRef.current ? tableRef.current.scrollHeight > tableRef.current.clientHeight : false;
|
20077
20228
|
const className = cn('group/row border-grey-300 !sticky z-[21]', {
|
20078
20229
|
'bottom-10': tableMeta.footer.isEnabled,
|
20079
20230
|
'bottom-0': !tableMeta.footer.isEnabled,
|
20080
|
-
'border-t-2': isScrolled,
|
20081
20231
|
'border-b': !isScrolled
|
20082
20232
|
});
|
20083
20233
|
return /*#__PURE__*/React__default.createElement("tr", {
|
@@ -20102,6 +20252,7 @@ function CreateNewRow(props) {
|
|
20102
20252
|
function TemporaryRow(props) {
|
20103
20253
|
const {
|
20104
20254
|
createRowButtonRef,
|
20255
|
+
isScrolled,
|
20105
20256
|
table,
|
20106
20257
|
tableMeta,
|
20107
20258
|
tableRef
|
@@ -20164,10 +20315,9 @@ function TemporaryRow(props) {
|
|
20164
20315
|
}
|
20165
20316
|
}
|
20166
20317
|
};
|
20167
|
-
const isScrolled = tableRef.current ? tableRef.current.scrollHeight > tableRef.current.clientHeight : false;
|
20168
20318
|
const className = cn('group/row border-grey-300 !sticky z-[22]', {
|
20169
|
-
'bottom-[calc(5rem_+
|
20170
|
-
'bottom-[calc(2.5rem_+
|
20319
|
+
'bottom-[calc(5rem_+_2px)] data-[row-editing-move]:bottom-[calc(5rem_+_2px)]': tableMeta.footer.isEnabled,
|
20320
|
+
'bottom-[calc(2.5rem_+_2px)] data-[row-editing-move]:bottom-[calc(2.5rem_+_2px)]': !tableMeta.footer.isEnabled,
|
20171
20321
|
'border-t-2 shadow-[0px_-5px_20px_0px_rgba(0,0,0,0.1)] [&>td]:!border-b-0': isScrolled
|
20172
20322
|
});
|
20173
20323
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, table.getBottomRows().map(row => (/*#__PURE__*/React__default.createElement(Row, {
|
@@ -20203,6 +20353,17 @@ const BaseTable3 = /*#__PURE__*/fixedForwardRef(function BaseTable3(props, ref)
|
|
20203
20353
|
};
|
20204
20354
|
const hasAlertErrors = table3.meta.editing.getErrorsShownInAlert().length;
|
20205
20355
|
const hasCreateWorkflow = table3.meta.editing.isEnabled && props.onEditingCreate;
|
20356
|
+
const isScrolled = isTableScrolled(table3.ref);
|
20357
|
+
let createWorkflow;
|
20358
|
+
if (hasCreateWorkflow) {
|
20359
|
+
createWorkflow = /*#__PURE__*/React__default.createElement(CreateNewRow, {
|
20360
|
+
buttonRef: table3.meta.editing.createRowButtonRef,
|
20361
|
+
isScrolled: isScrolled,
|
20362
|
+
scrollToIndex: table3.renderer.scrollToIndex,
|
20363
|
+
table: table3.instance,
|
20364
|
+
tableMeta: table3.meta
|
20365
|
+
});
|
20366
|
+
}
|
20206
20367
|
return /*#__PURE__*/React__default.createElement(Table, null, /*#__PURE__*/React__default.createElement(Table.Toolbar, {
|
20207
20368
|
table: table3
|
20208
20369
|
}, table3.meta.editing.isEnabled ? (/*#__PURE__*/React__default.createElement(Editing, {
|
@@ -20215,19 +20376,15 @@ const BaseTable3 = /*#__PURE__*/fixedForwardRef(function BaseTable3(props, ref)
|
|
20215
20376
|
tableRef: table3.ref
|
20216
20377
|
})) : null, /*#__PURE__*/React__default.createElement(Table.Grid, Object.assign({}, gridAttributes, {
|
20217
20378
|
"data-taco": "table3",
|
20379
|
+
footerRows: hasCreateWorkflow && isScrolled ? createWorkflow : undefined,
|
20218
20380
|
table: table3
|
20219
20381
|
}), hasCreateWorkflow ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(TemporaryRow, {
|
20220
20382
|
createRowButtonRef: table3.meta.editing.createRowButtonRef,
|
20383
|
+
isScrolled: isScrolled,
|
20221
20384
|
table: table3.instance,
|
20222
20385
|
tableMeta: table3.meta,
|
20223
20386
|
tableRef: table3.ref
|
20224
|
-
}),
|
20225
|
-
buttonRef: table3.meta.editing.createRowButtonRef,
|
20226
|
-
scrollToIndex: table3.renderer.scrollToIndex,
|
20227
|
-
table: table3.instance,
|
20228
|
-
tableMeta: table3.meta,
|
20229
|
-
tableRef: table3.ref
|
20230
|
-
}))) : null));
|
20387
|
+
}), !isScrolled ? createWorkflow : null)) : null));
|
20231
20388
|
});
|
20232
20389
|
const Table3 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
|
20233
20390
|
const stringifiedChildren = String(props.children);
|