@apia/table 4.0.15 → 4.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -1
- package/dist/index.js +38 -26
- package/dist/index.js.map +1 -1
- package/package.json +10 -8
package/dist/index.d.ts
CHANGED
|
@@ -552,6 +552,7 @@ interface IPagination {
|
|
|
552
552
|
currentPage: number | string;
|
|
553
553
|
disabled?: boolean;
|
|
554
554
|
disableReduced?: boolean;
|
|
555
|
+
hideInfo?: boolean;
|
|
555
556
|
hideMaximizeButton?: boolean;
|
|
556
557
|
hideRefreshButton?: boolean;
|
|
557
558
|
isLoading?: boolean;
|
|
@@ -582,7 +583,7 @@ interface IPagination {
|
|
|
582
583
|
showMaximizeOnSmallBreakpoints?: boolean;
|
|
583
584
|
variant?: 'primary' | 'secondary' | 'datagrid';
|
|
584
585
|
}
|
|
585
|
-
declare const Pagination: React__default.MemoExoticComponent<({ appliedFilters, areAllFiltersApplied, className, currentPage, disabled, disableReduced, hasMore, hideMaximizeButton, hideRefreshButton, isLoading, isPerforming, listId: outerListId, onDeleteFilters, onPageChange, onRefresh, pageCount, recordsCount: outerRecordsCount, reachedMax, showMaximizeOnSmallBreakpoints, variant, }: IPagination) => React__default.JSX.Element>;
|
|
586
|
+
declare const Pagination: React__default.MemoExoticComponent<({ appliedFilters, areAllFiltersApplied, className, currentPage, disabled, disableReduced, hasMore, hideInfo, hideMaximizeButton, hideRefreshButton, isLoading, isPerforming, listId: outerListId, onDeleteFilters, onPageChange, onRefresh, pageCount, recordsCount: outerRecordsCount, reachedMax, showMaximizeOnSmallBreakpoints, variant, }: IPagination) => React__default.JSX.Element>;
|
|
586
587
|
|
|
587
588
|
declare function getResponsiveTableContext(tableName: string): TResponsiveTableContext;
|
|
588
589
|
declare function useResponsiveTableContext(tableName?: string): TResponsiveTableContext;
|
package/dist/index.js
CHANGED
|
@@ -2694,6 +2694,7 @@ const NoMemoPagination = ({
|
|
|
2694
2694
|
disabled,
|
|
2695
2695
|
disableReduced,
|
|
2696
2696
|
hasMore,
|
|
2697
|
+
hideInfo,
|
|
2697
2698
|
hideMaximizeButton,
|
|
2698
2699
|
hideRefreshButton,
|
|
2699
2700
|
isLoading,
|
|
@@ -2777,28 +2778,30 @@ const NoMemoPagination = ({
|
|
|
2777
2778
|
iconSize: "Md"
|
|
2778
2779
|
}
|
|
2779
2780
|
),
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2781
|
+
!hideInfo && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2782
|
+
((reachedMax || hasMore) && breakPoint > 3 || breakPoint <= 3) && className !== "grid__pagination" ? /* @__PURE__ */ jsx(
|
|
2783
|
+
IconButton,
|
|
2784
|
+
{
|
|
2785
|
+
variant: "icon-primary",
|
|
2786
|
+
icon: "Info",
|
|
2787
|
+
className: `pagination__information ${reachedMax || hasMore ? "pagination__alertInfo" : ""}`,
|
|
2788
|
+
onClick: () => ApiaUtil.instance.tooltips.open(tooltipProps),
|
|
2789
|
+
ref: setInfoButtonRef,
|
|
2790
|
+
iconSize: "Md",
|
|
2791
|
+
"aria-label": window.BTN_FILE_INFO_TOOLTIP,
|
|
2792
|
+
title: window.BTN_FILE_INFO_TOOLTIP
|
|
2793
|
+
}
|
|
2794
|
+
) : "",
|
|
2795
|
+
breakPoint > 3 && /* @__PURE__ */ jsx(
|
|
2796
|
+
Box,
|
|
2797
|
+
{
|
|
2798
|
+
as: "span",
|
|
2799
|
+
className: "recordsCounter pagination__deleteLabels",
|
|
2800
|
+
title: recordsCountLabel,
|
|
2801
|
+
children: recordsCount !== -1 && `${window.GNR_TOT_RECORDS}: ${recordsCount} `
|
|
2802
|
+
}
|
|
2803
|
+
)
|
|
2804
|
+
] })
|
|
2802
2805
|
] }),
|
|
2803
2806
|
/* @__PURE__ */ jsx(Box, { className: "pagination__controls", children: (numberPageCount > 0 || disableReduced) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2804
2807
|
breakPoint > 2 && /* @__PURE__ */ jsx(
|
|
@@ -2973,7 +2976,7 @@ const NoMemoPagination = ({
|
|
|
2973
2976
|
};
|
|
2974
2977
|
const Pagination = React.memo(NoMemoPagination);
|
|
2975
2978
|
|
|
2976
|
-
function applyFocusAttributes(table, _previousState, state, focus = state.isFocused) {
|
|
2979
|
+
function applyFocusAttributes(table, _previousState, state, focus = state.isFocused, target) {
|
|
2977
2980
|
table.querySelectorAll(getFocusSelector()).forEach((e) => {
|
|
2978
2981
|
e.tabIndex = -1;
|
|
2979
2982
|
});
|
|
@@ -2993,6 +2996,9 @@ function applyFocusAttributes(table, _previousState, state, focus = state.isFocu
|
|
|
2993
2996
|
const focusedCell = table.querySelector(
|
|
2994
2997
|
`tr[data-rowindex="${state.focusedRow}"] td[aria-colindex="${state.focusedColumn}"], tr[data-rowindex="${state.focusedRow}"] th[aria-colindex="${state.focusedColumn}"]`
|
|
2995
2998
|
);
|
|
2999
|
+
if (target) {
|
|
3000
|
+
target.focus();
|
|
3001
|
+
}
|
|
2996
3002
|
if (focusedCell instanceof HTMLElement) {
|
|
2997
3003
|
const widgets = [];
|
|
2998
3004
|
if (state.isEditionMode) {
|
|
@@ -3010,7 +3016,7 @@ function applyFocusAttributes(table, _previousState, state, focus = state.isFocu
|
|
|
3010
3016
|
widget.tabIndex = 0;
|
|
3011
3017
|
if (i === 0)
|
|
3012
3018
|
window.requestAnimationFrame(() => {
|
|
3013
|
-
if (focus) {
|
|
3019
|
+
if (!target && focus) {
|
|
3014
3020
|
widget.focus();
|
|
3015
3021
|
}
|
|
3016
3022
|
});
|
|
@@ -3018,7 +3024,7 @@ function applyFocusAttributes(table, _previousState, state, focus = state.isFocu
|
|
|
3018
3024
|
} else {
|
|
3019
3025
|
focusedCell.tabIndex = 0;
|
|
3020
3026
|
window.requestAnimationFrame(() => {
|
|
3021
|
-
if (focus) {
|
|
3027
|
+
if (!target && focus) {
|
|
3022
3028
|
focusedCell.focus();
|
|
3023
3029
|
}
|
|
3024
3030
|
});
|
|
@@ -3113,7 +3119,13 @@ function handleMouseDownEvent(ev) {
|
|
|
3113
3119
|
state.focusedRow = rowIndex;
|
|
3114
3120
|
state.isFocused = true;
|
|
3115
3121
|
applySelectionAttributes(table, this.getState(), state);
|
|
3116
|
-
applyFocusAttributes(
|
|
3122
|
+
applyFocusAttributes(
|
|
3123
|
+
table,
|
|
3124
|
+
this.getState(),
|
|
3125
|
+
state,
|
|
3126
|
+
state.isFocused,
|
|
3127
|
+
target
|
|
3128
|
+
);
|
|
3117
3129
|
this.setState(state);
|
|
3118
3130
|
this.events.onRowClick?.(
|
|
3119
3131
|
{ row: state.rows[state.focusedRow], index: state.focusedRow },
|