@economic/taco 1.30.0 → 1.30.2
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/components/BadgeIcon/BadgeIcon.d.ts +4 -0
- package/dist/components/Icon/components/QuestionMark.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/Select2/components/Option.d.ts +1 -1
- package/dist/components/Select2/components/Search.d.ts +1 -1
- package/dist/components/Table2/hooks/listeners/useFilterStateListener.d.ts +3 -0
- package/dist/components/Table2/hooks/useTable.d.ts +1 -0
- package/dist/components/Table2/types.d.ts +1 -0
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/esm/packages/taco/src/components/Alert/Alert.js +1 -1
- package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
- package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -3
- package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Banner/util.js +29 -25
- package/dist/esm/packages/taco/src/components/Banner/util.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/Info.js +8 -3
- package/dist/esm/packages/taco/src/components/Icon/components/Info.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/QuestionMark.js +17 -0
- package/dist/esm/packages/taco/src/components/Icon/components/QuestionMark.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Warning.js +2 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Warning.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/index.js +2 -0
- package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +7 -1
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table2/Table2.js +15 -9
- package/dist/esm/packages/taco/src/components/Table2/Table2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table2/hooks/listeners/useFilterStateListener.js +12 -0
- package/dist/esm/packages/taco/src/components/Table2/hooks/listeners/useFilterStateListener.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table2/hooks/useTable.js +13 -1
- package/dist/esm/packages/taco/src/components/Table2/hooks/useTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table2/types.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table2/utilities/columns.js +4 -1
- package/dist/esm/packages/taco/src/components/Table2/utilities/columns.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/util.js +34 -32
- package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
- package/dist/taco.cjs.development.js +146 -75
- 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 -2
- package/types.json +15 -3
|
@@ -1613,13 +1613,18 @@ var Inbox = /*#__PURE__*/React.forwardRef(IconInbox);
|
|
|
1613
1613
|
|
|
1614
1614
|
function IconInfo(props, svgRef) {
|
|
1615
1615
|
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
1616
|
+
fill: "none",
|
|
1616
1617
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1617
1618
|
viewBox: "0 0 24 24",
|
|
1618
1619
|
ref: svgRef
|
|
1619
1620
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1621
|
+
fillRule: "evenodd",
|
|
1622
|
+
clipRule: "evenodd",
|
|
1623
|
+
d: "M14.75 18.249A.75.75 0 0114 19h-4a.75.75 0 010-1.503h1.233V11H10a.75.75 0 010-1.503h1.983a.75.75 0 01.75.752v7.248H14a.75.75 0 01.75.752z",
|
|
1624
|
+
fill: "currentColor"
|
|
1625
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1626
|
+
d: "M12.733 6.002a1 1 0 11-2.001.001 1 1 0 012.001-.001z",
|
|
1627
|
+
fill: "currentColor"
|
|
1623
1628
|
}));
|
|
1624
1629
|
}
|
|
1625
1630
|
var Info = /*#__PURE__*/React.forwardRef(IconInfo);
|
|
@@ -2330,6 +2335,19 @@ function IconProjects(props, svgRef) {
|
|
|
2330
2335
|
}
|
|
2331
2336
|
var Projects = /*#__PURE__*/React.forwardRef(IconProjects);
|
|
2332
2337
|
|
|
2338
|
+
function IconQuestionMark(props, svgRef) {
|
|
2339
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
2340
|
+
fill: "none",
|
|
2341
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2342
|
+
viewBox: "0 0 24 24",
|
|
2343
|
+
ref: svgRef
|
|
2344
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
2345
|
+
d: "M12 14.489c.5 0 .838-.302.832-.764v-1.998c.052-.665.604-.8 1.548-1.413C15.415 9.649 16 8.885 16 7.78 16 6.011 14.077 5 12.139 5c-.822 0-1.831.145-2.639.466a3.39 3.39 0 00-.803.438 1.94 1.94 0 00-.317.3c-.076.09-.14.188-.189.29a1.904 1.904 0 00-.132.356c-.04.153-.059.304-.059.448a.65.65 0 00.022.173c.076.335.34.55.748.55a.806.806 0 00.792-.55c.278-.902 1.709-1.078 2.502-1.078.96 0 2.183.555 2.183 1.405 0 .764-.44 1.163-1.268 1.706-.856.573-1.848 1.137-1.848 2.074v2.147c0 .492.369.764.869.764zM12 19c.579 0 1.047-.457 1.047-1.018 0-.566-.468-1.012-1.047-1.012-.573 0-1.042.446-1.042 1.012 0 .561.47 1.018 1.042 1.018z",
|
|
2346
|
+
fill: "currentColor"
|
|
2347
|
+
}));
|
|
2348
|
+
}
|
|
2349
|
+
var QuestionMark = /*#__PURE__*/React.forwardRef(IconQuestionMark);
|
|
2350
|
+
|
|
2333
2351
|
function IconQuicklinks(props, svgRef) {
|
|
2334
2352
|
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
2335
2353
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2943,11 +2961,12 @@ var Unreconciled = /*#__PURE__*/React.forwardRef(IconUnreconciled);
|
|
|
2943
2961
|
|
|
2944
2962
|
function IconWarning(props, svgRef) {
|
|
2945
2963
|
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
2964
|
+
fill: "none",
|
|
2946
2965
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2947
2966
|
viewBox: "0 0 24 24",
|
|
2948
2967
|
ref: svgRef
|
|
2949
2968
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
2950
|
-
d: "
|
|
2969
|
+
d: "M13 18a1 1 0 11-2 0 1 1 0 012 0zM11.055 5.99A.97.97 0 0112.03 5a.97.97 0 01.971 1l-.23 7.76a.768.768 0 01-.77.74.768.768 0 01-.77-.748l-.175-7.763z",
|
|
2951
2970
|
fill: "currentColor"
|
|
2952
2971
|
}));
|
|
2953
2972
|
}
|
|
@@ -3186,6 +3205,7 @@ const icons = {
|
|
|
3186
3205
|
profile: Profile,
|
|
3187
3206
|
'project-cards': ProjectCards,
|
|
3188
3207
|
projects: Projects,
|
|
3208
|
+
'question-mark': QuestionMark,
|
|
3189
3209
|
quicklinks: Quicklinks,
|
|
3190
3210
|
'rating-bankruptcy': RatingBankruptcy,
|
|
3191
3211
|
'rating-payment-problems': RatingPaymentProblems,
|
|
@@ -3266,12 +3286,21 @@ const BadgeIcon = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
|
3266
3286
|
color,
|
|
3267
3287
|
icon,
|
|
3268
3288
|
subtle,
|
|
3289
|
+
small,
|
|
3269
3290
|
...otherProps
|
|
3270
3291
|
} = props;
|
|
3271
|
-
const className = cn(`rounded-full border overflow-hidden whitespace-nowrap inline-flex items-center justify-center
|
|
3292
|
+
const className = cn(`rounded-full border overflow-hidden whitespace-nowrap inline-flex items-center justify-center border-transparent [&>*]:max-h-full`, {
|
|
3293
|
+
'w-5 h-5': !small
|
|
3294
|
+
}, {
|
|
3295
|
+
'w-4 h-4 text-xs': small
|
|
3296
|
+
}, {
|
|
3272
3297
|
[getSubtleColorShadeClasses(color)]: subtle,
|
|
3273
3298
|
[getColorShadeClasses(color)]: !subtle
|
|
3274
3299
|
}, props.className);
|
|
3300
|
+
const iconProps = {
|
|
3301
|
+
strokeWidth: 1,
|
|
3302
|
+
stroke: 'currentColor'
|
|
3303
|
+
};
|
|
3275
3304
|
return /*#__PURE__*/React.createElement("span", Object.assign({}, otherProps, {
|
|
3276
3305
|
"aria-label": "icon",
|
|
3277
3306
|
className: className,
|
|
@@ -3279,9 +3308,9 @@ const BadgeIcon = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
|
3279
3308
|
ref: ref,
|
|
3280
3309
|
role: "status",
|
|
3281
3310
|
title: props['aria-label']
|
|
3282
|
-
}), /*#__PURE__*/React.createElement(Icon, {
|
|
3311
|
+
}), /*#__PURE__*/React.createElement(Icon, Object.assign({
|
|
3283
3312
|
name: icon
|
|
3284
|
-
}));
|
|
3313
|
+
}, iconProps)));
|
|
3285
3314
|
});
|
|
3286
3315
|
|
|
3287
3316
|
const getIconName = state => {
|
|
@@ -3295,7 +3324,7 @@ const getIconName = state => {
|
|
|
3295
3324
|
case 'success':
|
|
3296
3325
|
return 'tick';
|
|
3297
3326
|
default:
|
|
3298
|
-
return '
|
|
3327
|
+
return 'question-mark';
|
|
3299
3328
|
}
|
|
3300
3329
|
};
|
|
3301
3330
|
const Alert = /*#__PURE__*/React__default.forwardRef(function Alert(props, ref) {
|
|
@@ -3583,30 +3612,34 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
|
3583
3612
|
});
|
|
3584
3613
|
|
|
3585
3614
|
const getBannerIcon = type => {
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3615
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3616
|
+
className: "mt-[5px] self-start"
|
|
3617
|
+
}, (() => {
|
|
3618
|
+
switch (type) {
|
|
3619
|
+
case 'success':
|
|
3620
|
+
return /*#__PURE__*/React__default.createElement(BadgeIcon, {
|
|
3621
|
+
icon: "tick",
|
|
3622
|
+
color: "green"
|
|
3623
|
+
});
|
|
3624
|
+
case 'error':
|
|
3625
|
+
return /*#__PURE__*/React__default.createElement(BadgeIcon, {
|
|
3626
|
+
icon: "close",
|
|
3627
|
+
color: "red"
|
|
3628
|
+
});
|
|
3629
|
+
case 'warning':
|
|
3630
|
+
return /*#__PURE__*/React__default.createElement(BadgeIcon, {
|
|
3631
|
+
icon: "warning",
|
|
3632
|
+
color: "yellow"
|
|
3633
|
+
});
|
|
3634
|
+
case 'information':
|
|
3635
|
+
return /*#__PURE__*/React__default.createElement(BadgeIcon, {
|
|
3636
|
+
icon: "info",
|
|
3637
|
+
color: "blue"
|
|
3638
|
+
});
|
|
3639
|
+
default:
|
|
3640
|
+
return null;
|
|
3641
|
+
}
|
|
3642
|
+
})());
|
|
3610
3643
|
};
|
|
3611
3644
|
|
|
3612
3645
|
const Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
|
|
@@ -4008,10 +4041,11 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
|
|
|
4008
4041
|
|
|
4009
4042
|
const Base$1 = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
4010
4043
|
const {
|
|
4044
|
+
appearance,
|
|
4011
4045
|
fluid,
|
|
4012
4046
|
...otherProps
|
|
4013
4047
|
} = props;
|
|
4014
|
-
const className = cn(getButtonClasses(), getAppearanceClasses(
|
|
4048
|
+
const className = cn(getButtonClasses(), getAppearanceClasses(appearance), 'rounded px-3', {
|
|
4015
4049
|
'cursor-not-allowed opacity-50': props.disabled,
|
|
4016
4050
|
'focus:yt-focus active:focus:yt-focus': !props.disabled,
|
|
4017
4051
|
'w-full': fluid
|
|
@@ -8066,36 +8100,39 @@ const Progress = ({
|
|
|
8066
8100
|
};
|
|
8067
8101
|
|
|
8068
8102
|
const getBadgeIcon = type => {
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8103
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8104
|
+
className: "mr-2 mt-[5px] flex-shrink-0 self-start"
|
|
8105
|
+
}, (() => {
|
|
8106
|
+
switch (type) {
|
|
8107
|
+
case 'success':
|
|
8108
|
+
return /*#__PURE__*/React__default.createElement(BadgeIcon, {
|
|
8109
|
+
icon: "tick",
|
|
8110
|
+
color: "green"
|
|
8111
|
+
});
|
|
8112
|
+
case 'error':
|
|
8113
|
+
return /*#__PURE__*/React__default.createElement(BadgeIcon, {
|
|
8114
|
+
icon: "close",
|
|
8115
|
+
color: "red"
|
|
8116
|
+
});
|
|
8117
|
+
case 'warning':
|
|
8118
|
+
return /*#__PURE__*/React__default.createElement(BadgeIcon, {
|
|
8119
|
+
icon: "warning",
|
|
8120
|
+
color: "yellow"
|
|
8121
|
+
});
|
|
8122
|
+
case 'information':
|
|
8123
|
+
return /*#__PURE__*/React__default.createElement(BadgeIcon, {
|
|
8124
|
+
icon: "info",
|
|
8125
|
+
color: "blue"
|
|
8126
|
+
});
|
|
8127
|
+
case 'loading':
|
|
8128
|
+
return /*#__PURE__*/React__default.createElement(Spinner, {
|
|
8129
|
+
delay: 0,
|
|
8130
|
+
className: "h-5 w-5"
|
|
8131
|
+
});
|
|
8132
|
+
default:
|
|
8133
|
+
return null;
|
|
8134
|
+
}
|
|
8135
|
+
})());
|
|
8099
8136
|
};
|
|
8100
8137
|
const getToastEmptyContentWarning = content => `Toast requires 'content' property, which can't be empty string, null or undefined. Current content value is set to ${content === '' ? 'empty string' : content}.`;
|
|
8101
8138
|
|
|
@@ -9791,6 +9828,12 @@ const ControlledHiddenField = props => {
|
|
|
9791
9828
|
};
|
|
9792
9829
|
Select2.displayName = 'Select2';
|
|
9793
9830
|
|
|
9831
|
+
const replaceWithShortform = key => {
|
|
9832
|
+
if (key === 'Delete') {
|
|
9833
|
+
return 'Del';
|
|
9834
|
+
}
|
|
9835
|
+
return key;
|
|
9836
|
+
};
|
|
9794
9837
|
const Shortcut$1 = ({
|
|
9795
9838
|
keys,
|
|
9796
9839
|
...props
|
|
@@ -9801,7 +9844,7 @@ const Shortcut$1 = ({
|
|
|
9801
9844
|
}), keys.map(key => /*#__PURE__*/React__default.createElement("kbd", {
|
|
9802
9845
|
key: key,
|
|
9803
9846
|
className: "wcag-blue-900 inline-flex h-4 items-center rounded px-1 font-mono text-xs font-normal"
|
|
9804
|
-
}, key)));
|
|
9847
|
+
}, replaceWithShortform(key))));
|
|
9805
9848
|
};
|
|
9806
9849
|
|
|
9807
9850
|
const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
|
|
@@ -11656,7 +11699,10 @@ const RowActionsCell = /*#__PURE__*/React__default.memo(({
|
|
|
11656
11699
|
}
|
|
11657
11700
|
},
|
|
11658
11701
|
tabIndex: tabIndex,
|
|
11659
|
-
tooltip: getActionPropertyValue(action.text, row.original)
|
|
11702
|
+
tooltip: action.shortcutKey ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, getActionPropertyValue(action.text, row.original), /*#__PURE__*/React__default.createElement(Shortcut$1, {
|
|
11703
|
+
className: "ml-2",
|
|
11704
|
+
keys: [action.shortcutKey]
|
|
11705
|
+
})) : getActionPropertyValue(action.text, row.original)
|
|
11660
11706
|
})), visibleMoreActions.length ? /*#__PURE__*/React__default.createElement(IconButton, {
|
|
11661
11707
|
className: actionClassName,
|
|
11662
11708
|
"aria-label": texts.table2.columns.actions.tooltip,
|
|
@@ -13152,6 +13198,14 @@ const useActiveRowStateListener = (table, rows, activeRowIndex) => {
|
|
|
13152
13198
|
}, [table.getState().columnFilters, rows.length]);
|
|
13153
13199
|
};
|
|
13154
13200
|
|
|
13201
|
+
const useFilterStateListener = (table, onRowSelect) => {
|
|
13202
|
+
React__default.useEffect(() => {
|
|
13203
|
+
if (onRowSelect) {
|
|
13204
|
+
table.resetRowSelection();
|
|
13205
|
+
}
|
|
13206
|
+
}, [table.getState().columnFilters, table.getState().globalFilter]);
|
|
13207
|
+
};
|
|
13208
|
+
|
|
13155
13209
|
function useTable$1(children, props, ref) {
|
|
13156
13210
|
var _settings$frozenColum, _settings$columnOrder, _settings$columnSizin, _settings$columnVisib, _settings$rowDensity;
|
|
13157
13211
|
const {
|
|
@@ -13203,6 +13257,15 @@ function useTable$1(children, props, ref) {
|
|
|
13203
13257
|
expandedRowRenderer,
|
|
13204
13258
|
onRowDrag
|
|
13205
13259
|
}, ref);
|
|
13260
|
+
const actionShortcuts = actionsForRow === null || actionsForRow === void 0 ? void 0 : actionsForRow.reduce((shortcuts, action) => {
|
|
13261
|
+
if (action.shortcutKey) {
|
|
13262
|
+
return {
|
|
13263
|
+
...shortcuts,
|
|
13264
|
+
[action.shortcutKey]: action.ariaLabel
|
|
13265
|
+
};
|
|
13266
|
+
}
|
|
13267
|
+
return shortcuts;
|
|
13268
|
+
}, {});
|
|
13206
13269
|
const lastSortedOrFilteredRows = React__default.useRef(null);
|
|
13207
13270
|
const totalFrozenColumns = internalFrozenColumnCount + ((_settings$frozenColum = settings === null || settings === void 0 ? void 0 : settings.frozenColumnCount) !== null && _settings$frozenColum !== void 0 ? _settings$frozenColum : 0);
|
|
13208
13271
|
const frozenColumns = columns.slice(0, totalFrozenColumns).map(column => column.id);
|
|
@@ -13342,12 +13405,14 @@ function useTable$1(children, props, ref) {
|
|
|
13342
13405
|
// state listeners
|
|
13343
13406
|
useActiveRowStateListener(table, rows, activeRow);
|
|
13344
13407
|
useColumnOffsetStateListener(table, setColumnOffsets);
|
|
13408
|
+
useFilterStateListener(table, onRowSelect);
|
|
13345
13409
|
useRowSelectionListener(table, onRowSelect);
|
|
13346
13410
|
useSettingsStateListener(table, onChangeSettings);
|
|
13347
13411
|
return {
|
|
13348
13412
|
rows,
|
|
13349
13413
|
table,
|
|
13350
|
-
footers
|
|
13414
|
+
footers,
|
|
13415
|
+
actionShortcuts
|
|
13351
13416
|
};
|
|
13352
13417
|
}
|
|
13353
13418
|
|
|
@@ -14614,7 +14679,8 @@ const Table2 = /*#__PURE__*/React__default.forwardRef(function Table2(props, ref
|
|
|
14614
14679
|
const {
|
|
14615
14680
|
rows,
|
|
14616
14681
|
table,
|
|
14617
|
-
footers
|
|
14682
|
+
footers,
|
|
14683
|
+
actionShortcuts
|
|
14618
14684
|
} = useTable$1(props.children, props, tableRef);
|
|
14619
14685
|
const meta = table.options.meta;
|
|
14620
14686
|
const {
|
|
@@ -14653,6 +14719,14 @@ const Table2 = /*#__PURE__*/React__default.forwardRef(function Table2(props, ref
|
|
|
14653
14719
|
const editButtonRef = React__default.useRef(null);
|
|
14654
14720
|
// support grid like keyboard navigation between cells
|
|
14655
14721
|
const handleKeyDown = event => {
|
|
14722
|
+
if (!meta.editMode.isEditing && actionShortcuts[event.key]) {
|
|
14723
|
+
var _tableRef$current;
|
|
14724
|
+
const rowAction = (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.querySelector(`[role="row"][aria-current="true"] [role="cell"]:last-child [aria-label="${actionShortcuts[event.key]}"]`);
|
|
14725
|
+
if (rowAction) {
|
|
14726
|
+
rowAction.click();
|
|
14727
|
+
}
|
|
14728
|
+
return;
|
|
14729
|
+
}
|
|
14656
14730
|
if (document.activeElement === tableRef.current) {
|
|
14657
14731
|
if (event.key === 'ArrowUp') {
|
|
14658
14732
|
event.preventDefault();
|
|
@@ -14676,8 +14750,8 @@ const Table2 = /*#__PURE__*/React__default.forwardRef(function Table2(props, ref
|
|
|
14676
14750
|
meta.setShouldPauseHoverState(true);
|
|
14677
14751
|
// the virtualiser doesn't always scroll right to the bottom for the last row
|
|
14678
14752
|
if (nextIndex === rows.length - 1) {
|
|
14679
|
-
var _tableRef$
|
|
14680
|
-
(_tableRef$
|
|
14753
|
+
var _tableRef$current2;
|
|
14754
|
+
(_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : _tableRef$current2.scrollTo(0, tableRef.current.scrollHeight);
|
|
14681
14755
|
} else {
|
|
14682
14756
|
virtualiser.scrollToIndex(nextIndex + 2);
|
|
14683
14757
|
}
|
|
@@ -14781,14 +14855,11 @@ const Table2 = /*#__PURE__*/React__default.forwardRef(function Table2(props, ref
|
|
|
14781
14855
|
const _temp3 = function () {
|
|
14782
14856
|
if (typeof loadMore === 'function') {
|
|
14783
14857
|
const scrollY = event.currentTarget.scrollTop;
|
|
14784
|
-
const
|
|
14858
|
+
const isScrollingDown = scrollY > prevScrollY.current;
|
|
14785
14859
|
prevScrollY.current = scrollY;
|
|
14860
|
+
const scrolledPercentage = Math.round(100 / event.currentTarget.scrollHeight * scrollY);
|
|
14786
14861
|
const _temp2 = function () {
|
|
14787
|
-
if (
|
|
14788
|
-
// This condition will also prevent triggering of loadMore function when scrolled upwards
|
|
14789
|
-
event.currentTarget.scrollHeight - event.currentTarget.scrollTop - event.currentTarget.clientHeight < 600 && !loadingRef.current &&
|
|
14790
|
-
// We don't want to trigger loadMore function on horizontal scrolling
|
|
14791
|
-
isVerticalScrolling) {
|
|
14862
|
+
if (isScrollingDown && !loadingRef.current && scrolledPercentage >= 80) {
|
|
14792
14863
|
const _temp = _finallyRethrows(function () {
|
|
14793
14864
|
return _catch(function () {
|
|
14794
14865
|
const isAllRowsSelected = table.getIsAllRowsSelected();
|