qbs-react-grid 2.2.17 → 2.2.18
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/css/qbs-react-grid.css +1 -1
- package/dist/css/qbs-react-grid.min.css +1 -1
- package/dist/css/qbs-react-grid.min.css.map +1 -1
- package/es/Cell.js +2 -1
- package/es/Pagination.d.ts +3 -0
- package/es/Pagination.js +8 -3
- package/es/Table.d.ts +3 -0
- package/es/Table.js +18 -12
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/less/pagination.less +9 -9
- package/es/qbsTable/QbsTable.js +110 -73
- package/es/qbsTable/TableCardList.js +2 -0
- package/es/qbsTable/Toolbar.js +6 -3
- package/es/qbsTable/commontypes.d.ts +21 -12
- package/es/qbsTable/labels.d.ts +6 -2
- package/es/qbsTable/labels.js +10 -1
- package/es/qbsTable/utilities/CardComponent.d.ts +2 -0
- package/es/qbsTable/utilities/CardComponent.js +7 -3
- package/es/qbsTable/utilities/CardMenuDropdown.d.ts +2 -0
- package/es/qbsTable/utilities/CardMenuDropdown.js +7 -7
- package/es/qbsTable/utilities/SearchInput.d.ts +1 -0
- package/es/qbsTable/utilities/SearchInput.js +3 -1
- package/es/qbsTable/utilities/empty.js +1 -1
- package/es/qbsTable/utilities/tablecalc.d.ts +1 -1
- package/es/qbsTable/utilities/tablecalc.js +7 -2
- package/es/utils/useCellDescriptor.js +0 -1
- package/es/utils/useScrollListener.d.ts +1 -0
- package/es/utils/useScrollListener.js +5 -3
- package/lib/Cell.js +2 -1
- package/lib/Pagination.d.ts +3 -0
- package/lib/Pagination.js +8 -3
- package/lib/Table.d.ts +3 -0
- package/lib/Table.js +18 -12
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -1
- package/lib/less/pagination.less +9 -9
- package/lib/qbsTable/QbsTable.js +110 -73
- package/lib/qbsTable/TableCardList.js +2 -0
- package/lib/qbsTable/Toolbar.js +6 -3
- package/lib/qbsTable/commontypes.d.ts +21 -12
- package/lib/qbsTable/labels.d.ts +6 -2
- package/lib/qbsTable/labels.js +13 -2
- package/lib/qbsTable/utilities/CardComponent.d.ts +2 -0
- package/lib/qbsTable/utilities/CardComponent.js +7 -3
- package/lib/qbsTable/utilities/CardMenuDropdown.d.ts +2 -0
- package/lib/qbsTable/utilities/CardMenuDropdown.js +6 -5
- package/lib/qbsTable/utilities/SearchInput.d.ts +1 -0
- package/lib/qbsTable/utilities/SearchInput.js +3 -1
- package/lib/qbsTable/utilities/empty.js +1 -1
- package/lib/qbsTable/utilities/tablecalc.d.ts +1 -1
- package/lib/qbsTable/utilities/tablecalc.js +7 -2
- package/lib/utils/useCellDescriptor.js +0 -1
- package/lib/utils/useScrollListener.d.ts +1 -0
- package/lib/utils/useScrollListener.js +5 -3
- package/package.json +2 -2
- package/src/Cell.tsx +3 -1
- package/src/HeaderCell.tsx +0 -1
- package/src/Pagination.tsx +10 -3
- package/src/Table.tsx +23 -10
- package/src/customSelect.tsx +88 -88
- package/src/index.ts +2 -0
- package/src/less/pagination.less +9 -9
- package/src/qbsTable/QbsTable.tsx +84 -39
- package/src/qbsTable/TableCardList.tsx +2 -0
- package/src/qbsTable/Toolbar.tsx +4 -2
- package/src/qbsTable/commontypes.ts +21 -12
- package/src/qbsTable/labels.ts +9 -2
- package/src/qbsTable/utilities/CardComponent.tsx +7 -2
- package/src/qbsTable/utilities/CardMenuDropdown.tsx +11 -6
- package/src/qbsTable/utilities/SearchInput.tsx +3 -1
- package/src/qbsTable/utilities/empty.tsx +2 -2
- package/src/qbsTable/utilities/tablecalc.ts +8 -2
- package/src/utils/useCellDescriptor.ts +0 -1
- package/src/utils/useScrollListener.ts +13 -3
- package/src/utils/useTableRows.ts +1 -1
|
@@ -40,7 +40,7 @@ export interface PaginationProps {
|
|
|
40
40
|
export interface ActionProps {
|
|
41
41
|
title?: string;
|
|
42
42
|
action?: (row: any) => void;
|
|
43
|
-
icon
|
|
43
|
+
icon?: React.ReactNode;
|
|
44
44
|
toolTip?: string;
|
|
45
45
|
hidden?: boolean;
|
|
46
46
|
hide?: (data: any, index?: number) => boolean;
|
|
@@ -70,6 +70,7 @@ export interface QbsTableProps {
|
|
|
70
70
|
searchValue?: string;
|
|
71
71
|
handleSearchValue?: (value?: string) => void;
|
|
72
72
|
theme?: string;
|
|
73
|
+
rtl?: boolean;
|
|
73
74
|
onRowClick?: (data: any) => void;
|
|
74
75
|
cellBordered?: boolean;
|
|
75
76
|
bordered?: boolean;
|
|
@@ -83,9 +84,8 @@ export interface QbsTableProps {
|
|
|
83
84
|
expandedRowKeys?: readonly number[];
|
|
84
85
|
setExpandedRowKeys?: (value: readonly number[]) => void;
|
|
85
86
|
handleMenuActions?: (actions: ActionProps, rowData: any) => void;
|
|
86
|
-
dropType?: 'vertical' | string;
|
|
87
|
+
dropType?: 'horizondal' | 'vertical' | string;
|
|
87
88
|
labels?: QbsTableLabels;
|
|
88
|
-
rtl?: boolean;
|
|
89
89
|
handleRowExpanded?: (rowData: any) => React.ReactNode;
|
|
90
90
|
shouldUpdateScroll?: boolean;
|
|
91
91
|
rowExpand?: boolean;
|
|
@@ -99,6 +99,8 @@ export interface QbsTableProps {
|
|
|
99
99
|
disabled?: boolean;
|
|
100
100
|
hidden?: boolean;
|
|
101
101
|
customHide?: string;
|
|
102
|
+
buttonClassName?: string;
|
|
103
|
+
icon?: ReactElement | ReactNode;
|
|
102
104
|
}[];
|
|
103
105
|
selectedRows?: (number | string)[];
|
|
104
106
|
classes?: {
|
|
@@ -131,13 +133,18 @@ export interface QbsTableProps {
|
|
|
131
133
|
handleTableCardView?: (data: any) => React.ReactNode;
|
|
132
134
|
isCustomTableCardView?: boolean;
|
|
133
135
|
handleCustomCardLoader?: () => React.ReactNode;
|
|
136
|
+
hasMoreData?: boolean;
|
|
137
|
+
loadMoreData?: () => void;
|
|
138
|
+
infiniteScroll?: boolean;
|
|
139
|
+
infiniteLoading?: boolean;
|
|
140
|
+
viewMode?: string;
|
|
134
141
|
rowViewToggle?: boolean;
|
|
135
142
|
defaultRowView?: boolean;
|
|
136
143
|
fullWidthView?: boolean;
|
|
137
144
|
setTableFullView?: (value: boolean) => void;
|
|
138
145
|
setRowViewToggle?: (value: boolean) => void;
|
|
139
|
-
isFullScreen?: boolean;
|
|
140
146
|
rowHeight?: number;
|
|
147
|
+
isFullScreen?: boolean;
|
|
141
148
|
showHeader?: boolean;
|
|
142
149
|
}
|
|
143
150
|
export interface QbsTableToolbarProps {
|
|
@@ -163,24 +170,26 @@ export interface QbsTableToolbarProps {
|
|
|
163
170
|
dataLength: number;
|
|
164
171
|
headerHeight?: number;
|
|
165
172
|
searchPlaceholder?: string;
|
|
173
|
+
labels?: QbsTableLabels;
|
|
174
|
+
rtl?: boolean;
|
|
166
175
|
tableView?: boolean;
|
|
167
176
|
enableTableToggle?: boolean;
|
|
168
177
|
tableViewToggle?: boolean;
|
|
169
178
|
setTableViewToggle?: (value: boolean) => void;
|
|
170
|
-
rowViewToggle?: boolean;
|
|
171
|
-
defaultRowView?: boolean;
|
|
172
|
-
fullWidthView?: boolean;
|
|
173
|
-
setTableFullView?: (value: boolean) => void;
|
|
174
|
-
setRowViewToggle?: (value: boolean) => void;
|
|
175
|
-
isFullScreen?: boolean;
|
|
176
|
-
labels?: QbsTableLabels;
|
|
177
|
-
rtl?: boolean;
|
|
178
179
|
selectedRowActions?: {
|
|
179
180
|
actionTitle?: string;
|
|
180
181
|
action: (checked: (number | string)[]) => void;
|
|
181
182
|
disabled?: boolean;
|
|
182
183
|
hidden?: boolean;
|
|
183
184
|
customHide?: string;
|
|
185
|
+
buttonClassName?: string;
|
|
186
|
+
icon?: ReactElement | ReactNode;
|
|
184
187
|
}[];
|
|
188
|
+
rowViewToggle?: boolean;
|
|
189
|
+
defaultRowView?: boolean;
|
|
190
|
+
fullWidthView?: boolean;
|
|
191
|
+
setTableFullView?: (value: boolean) => void;
|
|
192
|
+
setRowViewToggle?: (value: boolean) => void;
|
|
193
|
+
isFullScreen?: boolean;
|
|
185
194
|
}
|
|
186
195
|
export {};
|
package/es/qbsTable/labels.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface QbsTableLabels {
|
|
2
2
|
search?: string;
|
|
3
3
|
searchAriaLabel?: string;
|
|
4
4
|
clear?: string;
|
|
@@ -19,7 +19,11 @@ export type QbsTableLabels = {
|
|
|
19
19
|
viewMore?: string;
|
|
20
20
|
viewLess?: string;
|
|
21
21
|
actions?: string;
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
23
|
export declare const defaultQbsTableLabels: QbsTableLabels;
|
|
24
|
+
/** @deprecated Use defaultQbsTableLabels */
|
|
25
|
+
export declare const DEFAULT_QBS_TABLE_LABELS: QbsTableLabels;
|
|
24
26
|
export declare const mergeQbsTableLabels: (overrides?: QbsTableLabels) => QbsTableLabels;
|
|
27
|
+
/** @deprecated Use mergeQbsTableLabels */
|
|
28
|
+
export declare const mergeLabels: (overrides?: QbsTableLabels) => QbsTableLabels;
|
|
25
29
|
export declare const formatSelectedItems: (count: number, labels?: QbsTableLabels) => string;
|
package/es/qbsTable/labels.js
CHANGED
|
@@ -23,9 +23,18 @@ export var defaultQbsTableLabels = {
|
|
|
23
23
|
viewLess: 'View Less',
|
|
24
24
|
actions: 'Actions'
|
|
25
25
|
};
|
|
26
|
+
|
|
27
|
+
/** @deprecated Use defaultQbsTableLabels */
|
|
28
|
+
export var DEFAULT_QBS_TABLE_LABELS = defaultQbsTableLabels;
|
|
26
29
|
export var mergeQbsTableLabels = function mergeQbsTableLabels(overrides) {
|
|
27
|
-
|
|
30
|
+
var _overrides$showingRan;
|
|
31
|
+
return _extends({}, defaultQbsTableLabels, overrides, {
|
|
32
|
+
showingRange: (_overrides$showingRan = overrides === null || overrides === void 0 ? void 0 : overrides.showingRange) != null ? _overrides$showingRan : defaultQbsTableLabels.showingRange
|
|
33
|
+
});
|
|
28
34
|
};
|
|
35
|
+
|
|
36
|
+
/** @deprecated Use mergeQbsTableLabels */
|
|
37
|
+
export var mergeLabels = mergeQbsTableLabels;
|
|
29
38
|
export var formatSelectedItems = function formatSelectedItems(count, labels) {
|
|
30
39
|
var merged = mergeQbsTableLabels(labels);
|
|
31
40
|
return merged.selectedItems + " (" + count + ")";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { QbsColumnProps } from '../commontypes';
|
|
3
|
+
import { type QbsTableLabels } from '../labels';
|
|
3
4
|
type Props = {
|
|
4
5
|
columns: QbsColumnProps[];
|
|
5
6
|
data: any;
|
|
@@ -9,6 +10,7 @@ type Props = {
|
|
|
9
10
|
handleMenuActions?: () => void;
|
|
10
11
|
cardColumLimit?: number;
|
|
11
12
|
childDetailHeading?: string;
|
|
13
|
+
labels?: QbsTableLabels;
|
|
12
14
|
};
|
|
13
15
|
declare const CardComponent: React.FC<Props>;
|
|
14
16
|
export default CardComponent;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
|
+
import { mergeLabels } from '../labels';
|
|
2
3
|
import CardMenuDropdown from './CardMenuDropdown';
|
|
3
4
|
import { handleCellFormat } from './handleFormatCell';
|
|
4
5
|
import { ArrowUpIcon } from './icons';
|
|
@@ -15,7 +16,9 @@ var CardComponent = function CardComponent(_ref) {
|
|
|
15
16
|
cardColumLimit = _ref$cardColumLimit === void 0 ? 5 : _ref$cardColumLimit,
|
|
16
17
|
handleMenuActions = _ref.handleMenuActions,
|
|
17
18
|
_ref$childDetailHeadi = _ref.childDetailHeading,
|
|
18
|
-
childDetailHeading = _ref$childDetailHeadi === void 0 ? '' : _ref$childDetailHeadi
|
|
19
|
+
childDetailHeading = _ref$childDetailHeadi === void 0 ? '' : _ref$childDetailHeadi,
|
|
20
|
+
labelsProp = _ref.labels;
|
|
21
|
+
var labels = mergeLabels(labelsProp);
|
|
19
22
|
var _useState = useState(false),
|
|
20
23
|
viewMore = _useState[0],
|
|
21
24
|
setViewMore = _useState[1];
|
|
@@ -64,10 +67,11 @@ var CardComponent = function CardComponent(_ref) {
|
|
|
64
67
|
rowData: data,
|
|
65
68
|
iconName: "more",
|
|
66
69
|
rowIndex: index,
|
|
67
|
-
handleMenuActions: handleMenuActions
|
|
70
|
+
handleMenuActions: handleMenuActions,
|
|
71
|
+
labels: labels
|
|
68
72
|
})), columns.length > initialDisplayCount && /*#__PURE__*/React.createElement(TooltipComponent, {
|
|
69
73
|
tableBodyRef: useCardRef,
|
|
70
|
-
title: viewMore ?
|
|
74
|
+
title: viewMore ? labels.viewLess : labels.viewMore,
|
|
71
75
|
enabled: false
|
|
72
76
|
}, /*#__PURE__*/React.createElement("button", {
|
|
73
77
|
onClick: toggleViewMore,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionProps } from '../commontypes';
|
|
3
|
+
import { type QbsTableLabels } from '../labels';
|
|
3
4
|
type Props = {
|
|
4
5
|
iconName: string;
|
|
5
6
|
actionDropDown: ActionProps[];
|
|
@@ -8,6 +9,7 @@ type Props = {
|
|
|
8
9
|
dataTheme?: string;
|
|
9
10
|
tableBodyRef: React.RefObject<HTMLDivElement>;
|
|
10
11
|
rowIndex?: number;
|
|
12
|
+
labels?: QbsTableLabels;
|
|
11
13
|
};
|
|
12
14
|
declare const CardMenuDropdown: React.FC<Props>;
|
|
13
15
|
export default CardMenuDropdown;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { mergeLabels } from '../labels';
|
|
3
3
|
import { ThreeDotIcon } from './icons';
|
|
4
4
|
import TooltipComponent from './ToolTip';
|
|
5
5
|
var CardMenuDropdown = function CardMenuDropdown(_ref) {
|
|
6
6
|
var actionDropDown = _ref.actionDropDown,
|
|
7
7
|
handleMenuActions = _ref.handleMenuActions,
|
|
8
|
-
rowData = _ref.rowData
|
|
8
|
+
rowData = _ref.rowData,
|
|
9
|
+
labelsProp = _ref.labels;
|
|
10
|
+
var labels = mergeLabels(labelsProp);
|
|
9
11
|
var _useState = useState(false),
|
|
10
12
|
openMenu = _useState[0],
|
|
11
13
|
setOpenMenu = _useState[1];
|
|
@@ -32,7 +34,6 @@ var CardMenuDropdown = function CardMenuDropdown(_ref) {
|
|
|
32
34
|
var dropdownHeight = 200; // Adjust this if your dropdown height varies
|
|
33
35
|
var spaceBelow = window.innerHeight - buttonRect.bottom;
|
|
34
36
|
var spaceAbove = buttonRect.top;
|
|
35
|
-
console.log(spaceAbove, spaceBelow, dropdownHeight);
|
|
36
37
|
if (spaceBelow < dropdownHeight && spaceAbove > spaceBelow) {
|
|
37
38
|
setMenuPositionStyles({
|
|
38
39
|
bottom: '30px',
|
|
@@ -65,9 +66,8 @@ var CardMenuDropdown = function CardMenuDropdown(_ref) {
|
|
|
65
66
|
onClick: toggleMenu,
|
|
66
67
|
ref: menuButtonRef
|
|
67
68
|
}, /*#__PURE__*/React.createElement(TooltipComponent, {
|
|
68
|
-
title:
|
|
69
|
-
enabled: false
|
|
70
|
-
ref: menuButtonRef
|
|
69
|
+
title: labels.actions,
|
|
70
|
+
enabled: false
|
|
71
71
|
}, /*#__PURE__*/React.createElement(ThreeDotIcon, null))), openMenu && /*#__PURE__*/React.createElement("div", {
|
|
72
72
|
className: " qbs-card-dropdown rounded absolute right-0 mt-2 w-auto min-w-11 z-10 shadow-modalShadow bg-white dark:bg-[#424242] dark:text-white",
|
|
73
73
|
style: menuPositionStyles
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { memo, useCallback } from 'react';
|
|
2
2
|
var SearchInput = function SearchInput(_ref) {
|
|
3
3
|
var placeholder = _ref.placeholder,
|
|
4
|
+
_ref$searchAriaLabel = _ref.searchAriaLabel,
|
|
5
|
+
searchAriaLabel = _ref$searchAriaLabel === void 0 ? 'Search' : _ref$searchAriaLabel,
|
|
4
6
|
handleChange = _ref.handleChange,
|
|
5
7
|
searchValue = _ref.searchValue,
|
|
6
8
|
handleSearch = _ref.handleSearch;
|
|
@@ -24,7 +26,7 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
24
26
|
placeholder: placeholder,
|
|
25
27
|
value: searchValue != null ? searchValue : '',
|
|
26
28
|
onChange: handleInputChange,
|
|
27
|
-
"aria-label":
|
|
29
|
+
"aria-label": searchAriaLabel
|
|
28
30
|
}), /*#__PURE__*/React.createElement("button", {
|
|
29
31
|
className: "search-button absolute left-1 bottom-1.5 bg-white text-grey-dark",
|
|
30
32
|
onClick: function onClick() {
|
|
@@ -70,7 +70,7 @@ var NoData = function NoData(_ref) {
|
|
|
70
70
|
}), /*#__PURE__*/React.createElement("path", {
|
|
71
71
|
fill: "#797979",
|
|
72
72
|
d: "M47.365 57.417a.926.926 0 00.926-.927v-1.777a.926.926 0 10-1.852 0v1.777c0 .512.415.927.926.927zM104.183 57.417a.926.926 0 00.926-.927v-1.777a.926.926 0 00-1.852 0v1.777c0 .512.414.927.926.927zM47.365 52.974a.926.926 0 00.926-.927V50.27a.926.926 0 00-1.852 0v1.777c0 .512.415.927.926.927zM104.183 52.974a.926.926 0 00.926-.927V50.27a.926.926 0 00-1.852 0v1.777c0 .512.414.927.926.927zM47.365 44.088a.926.926 0 00.926-.927v-1.777a.926.926 0 10-1.852 0v1.777c0 .512.415.927.926.927zM104.183 44.088a.926.926 0 00.926-.927v-1.777a.926.926 0 00-1.852 0v1.777c0 .512.414.927.926.927zM47.365 39.645a.926.926 0 00.926-.927v-1.777a.926.926 0 10-1.852 0v1.777c0 .512.415.927.926.927zM104.183 39.645a.926.926 0 00.926-.927v-1.777a.926.926 0 00-1.852 0v1.777c0 .512.414.927.926.927zM47.365 35.202a.926.926 0 00.926-.927v-1.777a.926.926 0 10-1.852 0v1.777c0 .512.415.927.926.927zM104.183 35.202a.926.926 0 00.926-.927v-1.777a.926.926 0 00-1.852 0v1.777c0 .512.414.927.926.927zM47.365 30.758a.926.926 0 00.926-.926v-.888c0-.248.02-.49.057-.726a.926.926 0 00-1.83-.288c-.052.33-.08.67-.08 1.014v.888c0 .512.416.926.927.926zM104.183 30.758a.926.926 0 00.926-.926v-.888c0-.345-.027-.683-.079-1.014a.926.926 0 10-1.83.288c.037.236.057.478.057.726v.888c0 .512.414.926.926.926zM47.881 26.426a.926.926 0 001.294-.204c.286-.394.633-.74 1.026-1.026a.926.926 0 00-1.09-1.498c-.55.4-1.034.884-1.434 1.434a.926.926 0 00.204 1.294zM103.667 26.426a.926.926 0 00.204-1.294 6.509 6.509 0 00-1.434-1.434.926.926 0 00-1.09 1.498c.393.286.74.632 1.026 1.026a.926.926 0 001.294.204zM51.138 23.597c.08.506.554.851 1.059.772a4.67 4.67 0 01.726-.057h.914a.926.926 0 000-1.852h-.914c-.344 0-.683.026-1.014.078a.926.926 0 00-.77 1.06zM100.41 23.597a.927.927 0 00-.771-1.059 6.522 6.522 0 00-1.014-.078h-.914a.926.926 0 100 1.852h.914c.248 0 .49.02.726.057a.926.926 0 001.059-.772zM55.653 23.386c0 .511.415.926.926.926h1.828a.926.926 0 000-1.852H56.58a.926.926 0 00-.926.926zM60.223 23.386c0 .511.415.926.926.926h1.828a.926.926 0 000-1.852H61.15a.926.926 0 00-.926.926zM64.793 23.386c0 .511.415.926.926.926h1.829a.926.926 0 000-1.852h-1.829a.926.926 0 00-.926.926zM69.364 23.386c0 .511.414.926.926.926h1.828a.926.926 0 000-1.852H70.29a.926.926 0 00-.927.926zM73.934 23.386c0 .511.414.926.926.926h1.828a.926.926 0 000-1.852H74.86a.926.926 0 00-.926.926zM78.504 23.386c0 .511.415.926.926.926h1.828a.926.926 0 000-1.852H79.43a.926.926 0 00-.926.926zM83.074 23.386c0 .511.415.926.927.926h1.828a.926.926 0 000-1.852H84a.926.926 0 00-.927.926zM87.644 23.386c0 .511.415.926.927.926h1.828a.926.926 0 000-1.852H88.57a.926.926 0 00-.927.926zM92.215 23.386c0 .511.414.926.926.926h1.828a.926.926 0 000-1.852h-1.828a.926.926 0 00-.926.926zM72.178 36.453a1.39 1.39 0 10-1.965 1.965l3.797 3.797-3.797 3.798a1.39 1.39 0 001.965 1.965l3.797-3.798 3.798 3.798a1.39 1.39 0 001.965-1.965l-3.798-3.798 3.798-3.797a1.39 1.39 0 10-1.965-1.965l-3.798 3.797-3.797-3.797z"
|
|
73
|
-
})),
|
|
73
|
+
})), ' '), /*#__PURE__*/React.createElement("p", {
|
|
74
74
|
className: "text-center text-common font-bold text-blackAlt nodata-title"
|
|
75
75
|
}, title), /*#__PURE__*/React.createElement("span", {
|
|
76
76
|
className: "text-xxs font-medium text-grey-medium nodata-sub-title"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getRowDisplayRange(totalRows: number, rowsPerPage: number, pageNumber: number): string;
|
|
1
|
+
export declare function getRowDisplayRange(totalRows: number, rowsPerPage: number, pageNumber: number, formatRange?: (start: number, end: number, total: number) => string): string;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
export function getRowDisplayRange(totalRows, rowsPerPage, pageNumber) {
|
|
1
|
+
export function getRowDisplayRange(totalRows, rowsPerPage, pageNumber, formatRange) {
|
|
2
|
+
if (formatRange === void 0) {
|
|
3
|
+
formatRange = function formatRange(start, end, total) {
|
|
4
|
+
return "Showing " + start + " to " + end + " of " + total;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
2
7
|
var start = (pageNumber - 1) * rowsPerPage + 1;
|
|
3
8
|
var end = Math.min(pageNumber * rowsPerPage, totalRows);
|
|
4
|
-
return
|
|
9
|
+
return formatRange(start != null ? start : 0, end != null ? end : 0, totalRows != null ? totalRows : 0);
|
|
5
10
|
}
|
|
@@ -151,7 +151,6 @@ var useCellDescriptor = function useCellDescriptor(props) {
|
|
|
151
151
|
if (treeCol) {
|
|
152
152
|
hasCustomTreeCol = true;
|
|
153
153
|
}
|
|
154
|
-
console.log(columns);
|
|
155
154
|
if ((columnChildren === null || columnChildren === void 0 ? void 0 : columnChildren.length) !== 2) {
|
|
156
155
|
throw new Error("Component <HeaderCell> and <Cell> is required, column index: " + index + " ");
|
|
157
156
|
}
|
|
@@ -31,6 +31,7 @@ interface ScrollListenerProps {
|
|
|
31
31
|
onTouchStart?: (event: React.TouchEvent) => void;
|
|
32
32
|
onTouchMove?: (event: React.TouchEvent) => void;
|
|
33
33
|
onTouchEnd?: (event: React.TouchEvent) => void;
|
|
34
|
+
handleInfiniteScroll?: (value: number) => void;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
37
|
* Add scroll, touch, and wheel monitoring events to the table,
|
|
@@ -68,7 +68,8 @@ var useScrollListener = function useScrollListener(props) {
|
|
|
68
68
|
contentHeight = props.contentHeight,
|
|
69
69
|
headerHeight = props.headerHeight,
|
|
70
70
|
rtl = props.rtl,
|
|
71
|
-
tableKey = props.tableKey
|
|
71
|
+
tableKey = props.tableKey,
|
|
72
|
+
handleInfiniteScroll = props.handleInfiniteScroll;
|
|
72
73
|
var wheelListener = useRef(null);
|
|
73
74
|
var touchStartListener = useRef(null);
|
|
74
75
|
var touchMoveListener = useRef(null);
|
|
@@ -130,6 +131,9 @@ var useScrollListener = function useScrollListener(props) {
|
|
|
130
131
|
var x = Math.min(0, nextScrollX < minScrollX.current ? minScrollX.current : nextScrollX);
|
|
131
132
|
setScrollX(x);
|
|
132
133
|
setScrollY(y);
|
|
134
|
+
if (typeof handleInfiniteScroll === 'function' && deltaY !== 0 && !loading && Math.abs(y) + getTableHeight() >= contentHeight.current - 12) {
|
|
135
|
+
handleInfiniteScroll(scrollY.current);
|
|
136
|
+
}
|
|
133
137
|
onScroll === null || onScroll === void 0 ? void 0 : onScroll(Math.abs(x), Math.abs(y));
|
|
134
138
|
if (virtualized) {
|
|
135
139
|
// Add a state to the table during virtualized scrolling.
|
|
@@ -207,7 +211,6 @@ var useScrollListener = function useScrollListener(props) {
|
|
|
207
211
|
if (!isTouching.current) {
|
|
208
212
|
return;
|
|
209
213
|
}
|
|
210
|
-
console.log('handleTouchMove');
|
|
211
214
|
var _event$touches$2 = event.touches[0],
|
|
212
215
|
pageX = _event$touches$2.pageX,
|
|
213
216
|
pageY = _event$touches$2.pageY;
|
|
@@ -241,7 +244,6 @@ var useScrollListener = function useScrollListener(props) {
|
|
|
241
244
|
if (!isTouching.current) {
|
|
242
245
|
return;
|
|
243
246
|
}
|
|
244
|
-
console.log('handleTouchEnd');
|
|
245
247
|
isTouching.current = false;
|
|
246
248
|
var touchDuration = new Date().getTime() - momentumStartTime.current;
|
|
247
249
|
var absDeltaY = Math.abs(scrollY.current - momentumStartY.current);
|
package/lib/Cell.js
CHANGED
|
@@ -86,10 +86,11 @@ var Cell = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
86
86
|
var nextHeight = isHeaderCell ? headerHeight : cellHeight;
|
|
87
87
|
var styles = (0, _extends4["default"])({}, predefinedStyle, (_extends2 = {}, _extends2[fullText ? 'minWidth' : 'width'] = width, _extends2.height = nextHeight, _extends2.zIndex = depth, _extends2[rtl ? 'right' : 'left'] = left, _extends2));
|
|
88
88
|
var paddingKey = rtl ? 'paddingRight' : 'paddingLeft';
|
|
89
|
+
var resolvedAlign = rtl && align === 'left' ? 'right' : rtl && align === 'right' ? 'left' : align;
|
|
89
90
|
var contentStyles = (0, _extends4["default"])({}, style, (_extends3 = {
|
|
90
91
|
width: fullText ? width - 1 : width,
|
|
91
92
|
height: nextHeight,
|
|
92
|
-
textAlign:
|
|
93
|
+
textAlign: resolvedAlign
|
|
93
94
|
}, _extends3[paddingKey] = isTreeCol ? depth * _constants.LAYER_WIDTH + 10 : (style === null || style === void 0 ? void 0 : style[paddingKey]) || (style === null || style === void 0 ? void 0 : style.padding), _extends3));
|
|
94
95
|
if (verticalAlign) {
|
|
95
96
|
contentStyles.display = 'table-cell';
|
package/lib/Pagination.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { type QbsTableLabels } from './qbsTable/labels';
|
|
2
3
|
type PageProps = {
|
|
3
4
|
paginationProps: {
|
|
4
5
|
total?: number;
|
|
@@ -9,6 +10,8 @@ type PageProps = {
|
|
|
9
10
|
onRowsPerPage?: (row: number, page: number) => void;
|
|
10
11
|
onPagination?: (row: number, page: number) => void;
|
|
11
12
|
};
|
|
13
|
+
labels?: QbsTableLabels;
|
|
14
|
+
dataTheme?: string;
|
|
12
15
|
};
|
|
13
16
|
declare const Pagination: FC<PageProps>;
|
|
14
17
|
export default Pagination;
|
package/lib/Pagination.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.__esModule = true;
|
|
|
5
5
|
exports["default"] = void 0;
|
|
6
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
7
|
var _customSelect = _interopRequireDefault(require("./customSelect"));
|
|
8
|
+
var _labels = require("./qbsTable/labels");
|
|
8
9
|
var _tablecalc = require("./qbsTable/utilities/tablecalc");
|
|
9
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -41,7 +42,10 @@ var PageIndex = function PageIndex(_ref) {
|
|
|
41
42
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, renderPageNumbers());
|
|
42
43
|
};
|
|
43
44
|
var Pagination = function Pagination(_ref2) {
|
|
44
|
-
var paginationProps = _ref2.paginationProps
|
|
45
|
+
var paginationProps = _ref2.paginationProps,
|
|
46
|
+
labelsProp = _ref2.labels,
|
|
47
|
+
dataTheme = _ref2.dataTheme;
|
|
48
|
+
var labels = (0, _labels.mergeLabels)(labelsProp);
|
|
45
49
|
var _paginationProps$drop = paginationProps.dropOptions,
|
|
46
50
|
dropOptions = _paginationProps$drop === void 0 ? [10, 20, 50, 100, 200] : _paginationProps$drop,
|
|
47
51
|
_paginationProps$curr = paginationProps.currentPage,
|
|
@@ -82,13 +86,14 @@ var Pagination = function Pagination(_ref2) {
|
|
|
82
86
|
};
|
|
83
87
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
88
|
className: "qbs-table-custom-pagination",
|
|
89
|
+
"data-theme": dataTheme,
|
|
85
90
|
style: {
|
|
86
91
|
display: 'flex',
|
|
87
92
|
justifyContent: 'space-between'
|
|
88
93
|
}
|
|
89
94
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
90
95
|
className: "rows-count"
|
|
91
|
-
}, (0, _tablecalc.getRowDisplayRange)(total, rowsPerPageState, currentPage)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
|
+
}, (0, _tablecalc.getRowDisplayRange)(total, rowsPerPageState, currentPage, labels.showingRange)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
97
|
className: "qbs-table-pagination-right-block"
|
|
93
98
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
94
99
|
className: "qbs-table-icon-container",
|
|
@@ -167,7 +172,7 @@ var Pagination = function Pagination(_ref2) {
|
|
|
167
172
|
className: "qbs-table-pagination-flexBox"
|
|
168
173
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
169
174
|
className: "qbs-table-pagination-text"
|
|
170
|
-
},
|
|
175
|
+
}, labels.itemsPerPage), /*#__PURE__*/_react["default"].createElement(_customSelect["default"], {
|
|
171
176
|
options: dropData,
|
|
172
177
|
selectedValue: rowsPerPageState,
|
|
173
178
|
onChange: handleRowsPerPage
|
package/lib/Table.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export interface TableProps<Row, Key> extends Omit<StandardProps, 'onScroll'> {
|
|
|
99
99
|
/** Tree table, the callback function in the expanded node */
|
|
100
100
|
renderTreeToggle?: (expandButton: React.ReactNode, rowData?: Row, expanded?: boolean) => React.ReactNode;
|
|
101
101
|
tableKey?: string;
|
|
102
|
+
infiniteLoading?: boolean;
|
|
102
103
|
/** Customize what you can do to expand a zone */
|
|
103
104
|
renderRowExpanded?: (rowData?: Row) => React.ReactNode;
|
|
104
105
|
/** Custom row element */
|
|
@@ -123,6 +124,7 @@ export interface TableProps<Row, Key> extends Omit<StandardProps, 'onScroll'> {
|
|
|
123
124
|
onTouchMove?: (event: React.TouchEvent) => void;
|
|
124
125
|
/** Callback for the `touchend` event. */
|
|
125
126
|
onTouchEnd?: (event: React.TouchEvent) => void;
|
|
127
|
+
handleInfiniteScroll?: (value: number) => void;
|
|
126
128
|
/**
|
|
127
129
|
* Callback after table data update.
|
|
128
130
|
* @deprecated use `shouldUpdateScroll` instead
|
|
@@ -132,6 +134,7 @@ export interface TableProps<Row, Key> extends Omit<StandardProps, 'onScroll'> {
|
|
|
132
134
|
y: number;
|
|
133
135
|
}) => void) => void;
|
|
134
136
|
tableBodyRef: React.RefObject<HTMLDivElement>;
|
|
137
|
+
wheelWrapperRef: React.RefObject<HTMLDivElement | null>;
|
|
135
138
|
bodyRef?: (ref: HTMLElement) => void;
|
|
136
139
|
}
|
|
137
140
|
export interface TableInstance<Row, Key> extends React.FunctionComponent<TableProps<Row, Key>> {
|
package/lib/Table.js
CHANGED
|
@@ -20,7 +20,7 @@ var _Row = _interopRequireDefault(require("./Row"));
|
|
|
20
20
|
var _Scrollbar = _interopRequireDefault(require("./Scrollbar"));
|
|
21
21
|
var _TableContext = _interopRequireDefault(require("./TableContext"));
|
|
22
22
|
var _utils = require("./utils");
|
|
23
|
-
var _excluded = ["affixHeader", "children", "classPrefix", "className", "data", "defaultSortType", "width", "expandedRowKeys", "defaultExpandAllRows", "defaultExpandedRowKeys", "style", "id", "isTree", "hover", "bordered", "cellBordered", "wordWrap", "loading", "locale", "showHeader", "
|
|
23
|
+
var _excluded = ["affixHeader", "children", "classPrefix", "className", "data", "defaultSortType", "width", "expandedRowKeys", "defaultExpandAllRows", "defaultExpandedRowKeys", "style", "id", "isTree", "hover", "bordered", "cellBordered", "wordWrap", "loading", "locale", "showHeader", "sortColumn", "rowHeight", "sortType", "headerHeight", "minHeight", "height", "autoHeight", "fillHeight", "rtl", "translate3d", "rowKey", "virtualized", "rowClassName", "rowExpandedHeight", "disabledScroll", "affixHorizontalScrollbar", "loadAnimation", "shouldUpdateScroll", "renderRow", "renderRowExpanded", "renderLoading", "renderEmpty", "onSortColumn", "onScroll", "renderTreeToggle", "onRowClick", "onRowContextMenu", "onExpandChange", "onTouchStart", "onTouchMove", "onTouchEnd", "tableBodyHeight", "columns", "tableBodyRef", "tableKey", "handleInfiniteScroll", "infiniteLoading", "wheelWrapperRef"],
|
|
24
24
|
_excluded2 = ["depth", "rowIndex"],
|
|
25
25
|
_excluded3 = ["cellHeight"];
|
|
26
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -77,10 +77,6 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
77
77
|
} : _props$locale,
|
|
78
78
|
_props$showHeader = props.showHeader,
|
|
79
79
|
showHeader = _props$showHeader === void 0 ? true : _props$showHeader,
|
|
80
|
-
_props$pagination = props.pagination,
|
|
81
|
-
pagination = _props$pagination === void 0 ? true : _props$pagination,
|
|
82
|
-
_props$paginationProp = props.paginationProps,
|
|
83
|
-
paginationProps = _props$paginationProp === void 0 ? {} : _props$paginationProp,
|
|
84
80
|
sortColumn = props.sortColumn,
|
|
85
81
|
_props$rowHeight = props.rowHeight,
|
|
86
82
|
rowHeight = _props$rowHeight === void 0 ? _constants.ROW_HEIGHT : _props$rowHeight,
|
|
@@ -118,18 +114,19 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
118
114
|
onTouchStart = props.onTouchStart,
|
|
119
115
|
onTouchMove = props.onTouchMove,
|
|
120
116
|
onTouchEnd = props.onTouchEnd,
|
|
121
|
-
dataTheme = props.dataTheme,
|
|
122
117
|
tableBodyHeight = props.tableBodyHeight,
|
|
123
118
|
columns = props.columns,
|
|
124
119
|
tableBodyRef = props.tableBodyRef,
|
|
125
120
|
tableKey = props.tableKey,
|
|
121
|
+
handleInfiniteScroll = props.handleInfiniteScroll,
|
|
122
|
+
infiniteLoading = props.infiniteLoading,
|
|
123
|
+
wheelWrapperRef = props.wheelWrapperRef,
|
|
126
124
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
|
|
127
125
|
var _useClassNames = (0, _utils.useClassNames)(classPrefix, typeof classPrefix !== 'undefined'),
|
|
128
126
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
129
127
|
mergeCls = _useClassNames.merge,
|
|
130
128
|
prefix = _useClassNames.prefix;
|
|
131
129
|
var childTableRef = (0, _react.useRef)(null);
|
|
132
|
-
|
|
133
130
|
// Use `forceUpdate` to force the component to re-render after manipulating the DOM.
|
|
134
131
|
var _useReducer = (0, _react.useReducer)(function (x) {
|
|
135
132
|
return x + 1;
|
|
@@ -188,7 +185,6 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
188
185
|
var affixHeaderWrapperRef = (0, _react.useRef)(null);
|
|
189
186
|
var headerWrapperRef = (0, _react.useRef)(null);
|
|
190
187
|
// const tableBodyRef = useRef<HTMLDivElement>(null);
|
|
191
|
-
var wheelWrapperRef = (0, _react.useRef)(null);
|
|
192
188
|
var scrollbarXRef = (0, _react.useRef)(null);
|
|
193
189
|
var scrollbarYRef = (0, _react.useRef)(null);
|
|
194
190
|
var handleTableResizeChange = function handleTableResizeChange(_prevSize, event) {
|
|
@@ -300,7 +296,8 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
300
296
|
onScroll: onScroll,
|
|
301
297
|
onTouchStart: onTouchStart,
|
|
302
298
|
onTouchMove: onTouchMove,
|
|
303
|
-
onTouchEnd: onTouchEnd
|
|
299
|
+
onTouchEnd: onTouchEnd,
|
|
300
|
+
handleInfiniteScroll: handleInfiniteScroll
|
|
304
301
|
}),
|
|
305
302
|
isScrolling = _useScrollListener.isScrolling,
|
|
306
303
|
isChildFocused = _useScrollListener.isChildFocused,
|
|
@@ -624,7 +621,9 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
624
621
|
width: tableWidth.current
|
|
625
622
|
},
|
|
626
623
|
length: tableWidth.current,
|
|
627
|
-
onScroll:
|
|
624
|
+
onScroll: function onScroll(delta) {
|
|
625
|
+
onScrollHorizontal(delta);
|
|
626
|
+
},
|
|
628
627
|
scrollLength: contentWidth.current,
|
|
629
628
|
ref: scrollbarXRef
|
|
630
629
|
}));
|
|
@@ -788,7 +787,9 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
788
787
|
role: "rowgroup",
|
|
789
788
|
className: prefix('body-row-wrapper'),
|
|
790
789
|
style: bodyStyles,
|
|
791
|
-
onScroll:
|
|
790
|
+
onScroll: function onScroll(e) {
|
|
791
|
+
onScrollBody === null || onScrollBody === void 0 ? void 0 : onScrollBody(e); // existing handler
|
|
792
|
+
}
|
|
792
793
|
}, !loading && /*#__PURE__*/_react["default"].createElement("div", {
|
|
793
794
|
style: wheelStyles,
|
|
794
795
|
className: prefix('body-wheel-area'),
|
|
@@ -799,7 +800,12 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
|
799
800
|
}) : null, visibleRows.current, bottomHideHeight ? /*#__PURE__*/_react["default"].createElement(_Row["default"], {
|
|
800
801
|
style: bottomRowStyles,
|
|
801
802
|
className: "virtualized"
|
|
802
|
-
}) : null
|
|
803
|
+
}) : null, infiniteLoading && /*#__PURE__*/_react["default"].createElement("div", {
|
|
804
|
+
style: {
|
|
805
|
+
padding: 12,
|
|
806
|
+
textAlign: 'center'
|
|
807
|
+
}
|
|
808
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, "Loading more rows\u2026"))), /*#__PURE__*/_react["default"].createElement(_EmptyMessage["default"], {
|
|
803
809
|
locale: locale,
|
|
804
810
|
renderEmpty: renderEmpty,
|
|
805
811
|
addPrefix: prefix,
|
package/lib/index.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export type { HeaderCellProps } from './HeaderCell';
|
|
|
13
13
|
export type { ColumnGroupProps } from './ColumnGroup';
|
|
14
14
|
export type { QbsTableProps } from './qbsTable/commontypes';
|
|
15
15
|
export type { QbsTableLabels } from './qbsTable/labels';
|
|
16
|
-
export { mergeQbsTableLabels, defaultQbsTableLabels, formatSelectedItems, } from './qbsTable/labels';
|
|
16
|
+
export { mergeQbsTableLabels, mergeLabels, defaultQbsTableLabels, DEFAULT_QBS_TABLE_LABELS, formatSelectedItems, } from './qbsTable/labels';
|
|
17
17
|
export type { StandardProps, SortType, RowDataType, RowKeyType, TableSizeChangeEventName } from './@types/common';
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.mergeQbsTableLabels = exports.formatSelectedItems = exports.defaultQbsTableLabels = exports.Table = exports.QbsTable = exports.Pagination = exports.HeaderCell = exports.ColumnGroup = exports.Column = exports.Cell = void 0;
|
|
5
|
+
exports.mergeQbsTableLabels = exports.mergeLabels = exports.formatSelectedItems = exports.defaultQbsTableLabels = exports.Table = exports.QbsTable = exports.Pagination = exports.HeaderCell = exports.DEFAULT_QBS_TABLE_LABELS = exports.ColumnGroup = exports.Column = exports.Cell = void 0;
|
|
6
6
|
var _Table = _interopRequireDefault(require("./Table"));
|
|
7
7
|
exports.Table = _Table["default"];
|
|
8
8
|
var _Column = _interopRequireDefault(require("./Column"));
|
|
@@ -19,5 +19,7 @@ var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
|
19
19
|
exports.Pagination = _Pagination["default"];
|
|
20
20
|
var _labels = require("./qbsTable/labels");
|
|
21
21
|
exports.mergeQbsTableLabels = _labels.mergeQbsTableLabels;
|
|
22
|
+
exports.mergeLabels = _labels.mergeLabels;
|
|
22
23
|
exports.defaultQbsTableLabels = _labels.defaultQbsTableLabels;
|
|
24
|
+
exports.DEFAULT_QBS_TABLE_LABELS = _labels.DEFAULT_QBS_TABLE_LABELS;
|
|
23
25
|
exports.formatSelectedItems = _labels.formatSelectedItems;
|
package/lib/less/pagination.less
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
min-height: 40px;
|
|
6
6
|
align-items: center;
|
|
7
7
|
border-radius: 0 0 4px 4px;
|
|
8
|
-
border-top: 1px solid #d6d8dc;
|
|
9
|
-
background: #fff;
|
|
8
|
+
border-top: 1px solid var(--base-gray-border, #d6d8dc);
|
|
9
|
+
background: var(--table-bg, #fff);
|
|
10
10
|
&-header {
|
|
11
11
|
border-bottom: 1px solid #eee;
|
|
12
12
|
position: absolute;
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
font-weight: 500;
|
|
28
28
|
line-height: 20px;
|
|
29
29
|
border-radius: 6px;
|
|
30
|
-
border: 1px solid #d6d8dc;
|
|
31
|
-
background: #fff;
|
|
30
|
+
border: 1px solid var(--base-gray-border, #d6d8dc);
|
|
31
|
+
background: var(--gray-light-1, #fff);
|
|
32
32
|
}
|
|
33
33
|
.qbs-table-icon-container {
|
|
34
34
|
padding: 0;
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
font-style: normal;
|
|
110
110
|
font-weight: 500;
|
|
111
111
|
line-height: 20px;
|
|
112
|
-
color: #313131;
|
|
112
|
+
color: var(--gray-dark-3, #313131);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
.custom-select-trigger {
|
|
126
126
|
padding: 2px 8px;
|
|
127
127
|
cursor: pointer;
|
|
128
|
-
border: 1px solid #d6d8dc;
|
|
128
|
+
border: 1px solid var(--base-gray-border, #d6d8dc);
|
|
129
129
|
border-radius: 4px;
|
|
130
130
|
min-width: 65px;
|
|
131
131
|
position: relative;
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
list-style: none;
|
|
141
141
|
margin: 2px 0 0;
|
|
142
142
|
padding: 0;
|
|
143
|
-
background: #fff;
|
|
143
|
+
background: var(--gray-light-1, #fff);
|
|
144
144
|
border-radius: 8px;
|
|
145
145
|
box-shadow: 0 8px 20px 0 #00000026;
|
|
146
146
|
}
|
|
@@ -158,7 +158,7 @@ ul.custom-select-options.top {
|
|
|
158
158
|
|
|
159
159
|
.custom-select-option:hover,
|
|
160
160
|
.custom-select-option.selected {
|
|
161
|
-
background-color: #f0f0f0;
|
|
161
|
+
background-color: var(--table-row-hover-bg, #f0f0f0);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
.custom-select-trigger:before {
|
|
@@ -167,7 +167,7 @@ ul.custom-select-options.top {
|
|
|
167
167
|
right: 10px;
|
|
168
168
|
top: 6px;
|
|
169
169
|
font-weight: bold;
|
|
170
|
-
border: solid black;
|
|
170
|
+
border: solid var(--gray-dark-3, black);
|
|
171
171
|
border-width: 0 1px 1px 0;
|
|
172
172
|
display: inline-block;
|
|
173
173
|
padding: 3px;
|