@hi-ui/table 4.0.0-beta.35 → 4.0.0-beta.38
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/lib/cjs/hooks/use-check.js +32 -11
- package/lib/cjs/styles/index.scss.js +1 -1
- package/lib/esm/hooks/use-check.js +32 -11
- package/lib/esm/styles/index.scss.js +2 -3
- package/package.json +31 -31
|
@@ -60,14 +60,22 @@ var useTableCheck = function useTableCheck(_ref) {
|
|
|
60
60
|
return [false, false];
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var idsCanBeChecked = flattedData.filter(function (item) {
|
|
64
64
|
return !checkRowIsDisabledCheckbox(item.raw);
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
}).map(function (item) {
|
|
66
|
+
return item.id;
|
|
67
|
+
}); // TODO: 数组项完全匹配工具函数
|
|
68
|
+
// TODO: 数组项完全匹配工具函数
|
|
69
|
+
|
|
70
|
+
var _checkedAll = idsCanBeChecked.every(function (id) {
|
|
71
|
+
return isCheckedRowKey(id);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
var _semiChecked = _checkedAll ? false : checkedRowKeys.length > 0 && idsCanBeChecked.some(function (id) {
|
|
75
|
+
return isCheckedRowKey(id);
|
|
68
76
|
});
|
|
69
77
|
|
|
70
|
-
return [_checkedAll,
|
|
78
|
+
return [_checkedAll, _semiChecked];
|
|
71
79
|
}
|
|
72
80
|
|
|
73
81
|
return [false, false];
|
|
@@ -76,18 +84,31 @@ var useTableCheck = function useTableCheck(_ref) {
|
|
|
76
84
|
semiChecked = _React$useMemo[1];
|
|
77
85
|
|
|
78
86
|
var tryCheckAllRow = React__default["default"].useCallback(function () {
|
|
79
|
-
if (checkedAll) {
|
|
80
|
-
trySetCheckedRowKeys([], [], false);
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
87
|
var targetItems = flattedData.filter(function (item) {
|
|
85
88
|
return !checkRowIsDisabledCheckbox(item.raw);
|
|
86
89
|
});
|
|
87
90
|
var checkedRowKeys = targetItems.map(function (item) {
|
|
88
91
|
return item.id;
|
|
89
92
|
});
|
|
90
|
-
|
|
93
|
+
var checkedRowKeysSet = new Set(checkedRowKeys);
|
|
94
|
+
|
|
95
|
+
if (checkedAll) {
|
|
96
|
+
// 移除当前页所有行 ids
|
|
97
|
+
trySetCheckedRowKeys(function (prev) {
|
|
98
|
+
return prev.filter(function (id) {
|
|
99
|
+
return !checkedRowKeysSet.has(id);
|
|
100
|
+
});
|
|
101
|
+
}, targetItems, false);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
trySetCheckedRowKeys( // 添加当前页所有行 ids
|
|
106
|
+
function (prev) {
|
|
107
|
+
prev.forEach(function (id) {
|
|
108
|
+
return checkedRowKeysSet.add(id);
|
|
109
|
+
});
|
|
110
|
+
return Array.from(checkedRowKeysSet);
|
|
111
|
+
}, targetItems, true);
|
|
91
112
|
}, [trySetCheckedRowKeys, flattedData, checkRowIsDisabledCheckbox, checkedAll]);
|
|
92
113
|
return {
|
|
93
114
|
tryCheckAllRow: tryCheckAllRow,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Object.defineProperty(exports, '__esModule', {
|
|
13
13
|
value: true
|
|
14
14
|
});
|
|
15
|
-
var css_248z = "@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-table {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-size: 14px;\n position: relative; }\n.hi-v4-table table {\n width: 100%;\n text-align: left;\n background-color: var(--hi-v4-color-static-white, #fff);\n border-radius: 2px 2px 0 0;\n border-spacing: 0;\n border-collapse: separate;\n display: table;\n table-layout: fixed; }\n.hi-v4-table__wrapper {\n position: relative;\n z-index: 0; }\n.hi-v4-table__switcher.hi-v4-icon-button {\n color: var(--hi-v4-color-gray-500, #929aa6); }\n.hi-v4-table__switcher--expanded.hi-v4-icon-button {\n color: var(--hi-v4-color-primary-400, var(--hi-v4-color-brandblue-400, #4a9eff)); }\n.hi-v4-table--size-md table tbody > tr > td {\n padding: var(--hi-v4-spacing-7, 14px); }\n.hi-v4-table--size-md table thead > tr > th {\n padding: var(--hi-v4-spacing-7, 14px); }\n.hi-v4-table--size-sm table tbody > tr > td {\n padding: var(--hi-v4-spacing-5, 10px); }\n.hi-v4-table--size-sm table thead > tr > th {\n padding: var(--hi-v4-spacing-5, 10px); }\n.hi-v4-table--size-lg table tbody > tr > td {\n padding: var(--hi-v4-spacing-9, 18px); }\n.hi-v4-table--size-lg table thead > tr > th {\n padding: var(--hi-v4-spacing-9, 18px); }\n.hi-v4-table--bordered table thead > tr > th {\n border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-table--bordered table td {\n border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-table--bordered .hi-v4-table-header {\n border-top: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);\n border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-table--bordered .hi-v4-table-body {\n border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-table--sticky {\n position: -webkit-sticky;\n position: sticky;\n top: 0; }\n.hi-v4-table-header {\n position: relative;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden; }\n.hi-v4-table-header__resizable {\n position: relative;\n background-clip: padding-box; }\n.hi-v4-table-header__resizable-handle {\n position: absolute;\n width: 2px;\n height: 100%;\n bottom: 0;\n right: 0;\n cursor: col-resize;\n z-index: 1; }\n.hi-v4-table-header__resizable-handle:hover {\n background-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-table-header-cell {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active[data-sticky] {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-table-row--hover:hover > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-row--striped > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-row--expanded > .hi-v4-table-cell {\n color: var(--hi-v4-color-gray-800, #1f2937); }\n.hi-v4-table-row--error > .hi-v4-table-cell {\n color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-table-row--highlight > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-row--dragging > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-row--drag-top > .hi-v4-table-cell {\n border-top: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-table-row--drag-bottom > .hi-v4-table-cell {\n border-bottom: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-table-row--avg > .hi-v4-table-cell, .hi-v4-table-row--total > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-row--avg:hover > .hi-v4-table-cell, .hi-v4-table-row--total:hover > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-header .hi-v4-table-header-col, .hi-v4-table-header .hi-v4-table-col {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-body .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-body .hi-v4-table-col[data-hover-highlight] {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-header .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-header .hi-v4-table-col[data-hover-highlight] {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-table-body {\n position: relative;\n overflow: auto; }\n.hi-v4-table-header-cell {\n color: var(--hi-v4-color-gray-700, #1f2733);\n font-size: var(--hi-v4-text-size-md, 0.875rem);\n font-weight: var(--hi-v4-text-weight-medium, 500);\n line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);\n padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);\n border-bottom: 1px solid #f0f0f0; }\n.hi-v4-table-header-cell.hi-v4-table__embed-col, .hi-v4-table-header-cell.hi-v4-table__selection-col {\n padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px); }\n.hi-v4-table-cell {\n word-break: break-word;\n border-bottom: 1px solid #f0f0f0;\n font-size: var(--hi-v4-text-size-md, 0.875rem);\n font-weight: var(--hi-v4-text-weight-normal, 400);\n color: var(--hi-v4-color-gray-700, #1f2733);\n line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);\n padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-table-cell__indent {\n display: inline-block;\n width: 14px;\n height: 100%;\n margin-right: var(--hi-v4-spacing-1, 2px); }\n.hi-v4-table-cell__switcher.hi-v4-icon-button {\n margin-right: var(--hi-v4-spacing-1, 2px);\n color: var(--hi-v4-color-gray-500, #929aa6); }\n.hi-v4-table-cell.hi-v4-table__embed-col, .hi-v4-table-cell.hi-v4-table__selection-col {\n padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px); }\n.hi-v4-table-cell.hi-v4-table-cell__col--highlight {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-cell.hi-v4-table-cell__col--hovered-highlight {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-freeze-shadow {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 20;\n pointer-events: none;\n overflow: hidden;\n height: 100%;\n width: 200px; }\n.hi-v4-table-freeze-shadow--left {\n margin-right: 10px;\n left: 0;\n -webkit-box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);\n box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15); }\n.hi-v4-table-freeze-shadow--right {\n margin-left: 10px;\n right: 0;\n -webkit-box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);\n box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15); }\n.hi-v4-table-header-filter-dropdown__trigger.hi-v4-icon-button {\n margin-left: 4px; }\n.hi-v4-table-header-filter-dropdown__content {\n width: 124px;\n padding: var(--hi-v4-spacing-6, 12px) var(--hi-v4-spacing-4, 8px);\n font-weight: var(--hi-v4-text-weight-normal, 400); }\n.hi-v4-table-header-filter-dropdown__item {\n margin-top: var(--hi-v4-spacing-4, 8px);\n padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);\n border-radius: var(--hi-v4-border-radius-md, 4px);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n cursor: pointer;\n color: var(--hi-v4-color-gray-700, #1f2733);\n font-size: var(--hi-v4-text-size-md, 0.875rem); }\n.hi-v4-table-header-filter-dropdown__item:first-child {\n margin-top: 0; }\n.hi-v4-table-header-filter-dropdown__item:hover {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-header-filter-dropdown__item--active {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-header-filter-dropdown__item--active:hover {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-header-filter-sorter {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n height: 20px;\n margin-top: 2px;\n margin-left: 6px; }\n.hi-v4-table-header-filter-sorter__icon {\n display: inline-block;\n height: 8px;\n cursor: pointer;\n overflow: hidden;\n font-weight: var(--hi-v4-text-weight-normal, 400);\n color: var(--hi-v4-color-gray-500, #929aa6); }\n.hi-v4-table-header-filter-sorter__icon svg {\n position: relative;\n top: -5px; }\n.hi-v4-table-header-filter-sorter__icon--active {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-table-header-filter-custom__trigger {\n margin-left: 6px;\n color: var(--hi-v4-color-gray-500, #929aa6);\n cursor: pointer; }\n.hi-v4-table-header-filter-custom__content {\n padding: 12px 8px; }\n.hi-v4-table-embed-row {\n position: relative;\n z-index: 0; }\n.hi-v4-table-embed-row > td {\n background-color: var(--hi-v4-color-gray-200, #ebedf0);\n padding: var(--hi-v4-spacing-10, 20px); }\n.hi-v4-table-setting {\n position: absolute;\n height: 100%;\n z-index: 11;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n right: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);\n border-bottom: none;\n border-top: none;\n color: var(--hi-v4-color-gray-500, #929aa6);\n cursor: pointer;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n width: 18px;\n background: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-setting__btn-group {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end; }\n.hi-v4-table-setting-item {\n position: relative;\n padding-top: var(--hi-v4-spacing-1, 2px);\n padding-bottom: var(--hi-v4-spacing-1, 2px);\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n.hi-v4-table-setting-item__wrap {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: move;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);\n line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);\n border-radius: var(--hi-v4-border-radius-md, 4px); }\n.hi-v4-table-setting-item__wrap:hover {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-setting-item--dragging .hi-v4-table-setting-item__wrap {\n opacity: 0.6; }\n.hi-v4-table-setting-item::before {\n position: absolute;\n left: 0;\n z-index: 9999;\n display: none;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 8px;\n height: 8px;\n content: '';\n background-color: var(--hi-v4-color-static-white, #fff);\n border: 1px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n border-radius: 100%; }\n.hi-v4-table-setting-item::after {\n position: absolute;\n content: '';\n z-index: 9998;\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-bottom-width: 0;\n border-bottom-style: solid;\n border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n left: 0;\n width: 100%; }\n.hi-v4-table-setting-item::before, .hi-v4-table-setting-item::after {\n margin-left: -10px;\n margin-right: -10px; }\n.hi-v4-table-setting-item--direction-before::before {\n display: block;\n top: -0.5px;\n -webkit-transform: translateY(-4px);\n transform: translateY(-4px); }\n.hi-v4-table-setting-item--direction-before::after {\n top: -0.5px;\n border-bottom-width: 1px; }\n.hi-v4-table-setting-item--direction-after::before {\n display: block;\n bottom: 0.5px;\n -webkit-transform: translateY(4px);\n transform: translateY(4px); }\n.hi-v4-table-setting-item--direction-after::after {\n bottom: 0.5px;\n border-bottom-width: 1px; }\n.hi-v4-table-pagination {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n row-gap: 8px;\n padding: var(--hi-v4-spacing-6, 12px) 0;\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-table-pagination--placement-left {\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n.hi-v4-table-pagination--placement-right {\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end; }\n.hi-v4-table-pagination--placement-middle {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n.hi-v4-table-empty-content td {\n text-align: center;\n padding: var(--hi-v4-spacing-12, 24px) 0; }\n";
|
|
15
|
+
var css_248z = ".hi-v4-table {-webkit-box-sizing: border-box;box-sizing: border-box;font-size: 14px;position: relative; }.hi-v4-table table {width: 100%;text-align: left;background-color: var(--hi-v4-color-static-white, #fff);border-radius: 2px 2px 0 0;border-spacing: 0;border-collapse: separate;display: table;table-layout: fixed; }.hi-v4-table__wrapper {position: relative;z-index: 0; }.hi-v4-table__switcher.hi-v4-icon-button {color: var(--hi-v4-color-gray-500, #929aa6); }.hi-v4-table__switcher--expanded.hi-v4-icon-button {color: var(--hi-v4-color-primary-400, var(--hi-v4-color-brandblue-400, #4a9eff)); }.hi-v4-table--size-md table tbody > tr > td {padding: var(--hi-v4-spacing-7, 14px); }.hi-v4-table--size-md table thead > tr > th {padding: var(--hi-v4-spacing-7, 14px); }.hi-v4-table--size-sm table tbody > tr > td {padding: var(--hi-v4-spacing-5, 10px); }.hi-v4-table--size-sm table thead > tr > th {padding: var(--hi-v4-spacing-5, 10px); }.hi-v4-table--size-lg table tbody > tr > td {padding: var(--hi-v4-spacing-9, 18px); }.hi-v4-table--size-lg table thead > tr > th {padding: var(--hi-v4-spacing-9, 18px); }.hi-v4-table--bordered table thead > tr > th {border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }.hi-v4-table--bordered table td {border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }.hi-v4-table--bordered .hi-v4-table-header {border-top: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }.hi-v4-table--bordered .hi-v4-table-body {border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }.hi-v4-table--sticky {position: -webkit-sticky;position: sticky;top: 0; }.hi-v4-table-header {position: relative;-webkit-box-sizing: border-box;box-sizing: border-box;overflow: hidden; }.hi-v4-table-header__resizable {position: relative;background-clip: padding-box; }.hi-v4-table-header__resizable-handle {position: absolute;width: 2px;height: 100%;bottom: 0;right: 0;cursor: col-resize;z-index: 1; }.hi-v4-table-header__resizable-handle:hover {background-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-table-header-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active[data-sticky] {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-table-row--hover:hover > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-row--striped > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-row--expanded > .hi-v4-table-cell {color: var(--hi-v4-color-gray-800, #1f2937); }.hi-v4-table-row--error > .hi-v4-table-cell {color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }.hi-v4-table-row--highlight > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-row--dragging > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-row--drag-top > .hi-v4-table-cell {border-top: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-table-row--drag-bottom > .hi-v4-table-cell {border-bottom: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-table-row--avg > .hi-v4-table-cell, .hi-v4-table-row--total > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-row--avg:hover > .hi-v4-table-cell, .hi-v4-table-row--total:hover > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-header .hi-v4-table-header-col, .hi-v4-table-header .hi-v4-table-col {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-body .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-body .hi-v4-table-col[data-hover-highlight] {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-header .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-header .hi-v4-table-col[data-hover-highlight] {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-table-body {position: relative;overflow: auto; }.hi-v4-table-header-cell {color: var(--hi-v4-color-gray-700, #1f2733);font-size: var(--hi-v4-text-size-md, 0.875rem);font-weight: var(--hi-v4-text-weight-medium, 500);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8); }.hi-v4-table-header-cell.hi-v4-table__embed-col, .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px); }.hi-v4-table-cell {word-break: break-word;border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);font-size: var(--hi-v4-text-size-md, 0.875rem);font-weight: var(--hi-v4-text-weight-normal, 400);color: var(--hi-v4-color-gray-700, #1f2733);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);background-color: var(--hi-v4-color-static-white, #fff); }.hi-v4-table-cell__indent {display: inline-block;width: 14px;height: 100%;margin-right: var(--hi-v4-spacing-1, 2px); }.hi-v4-table-cell__switcher.hi-v4-icon-button {margin-right: var(--hi-v4-spacing-1, 2px);color: var(--hi-v4-color-gray-500, #929aa6); }.hi-v4-table-cell.hi-v4-table__embed-col, .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px); }.hi-v4-table-cell.hi-v4-table-cell__col--highlight {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-cell.hi-v4-table-cell__col--hovered-highlight {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-freeze-shadow {position: absolute;top: 0;bottom: 0;z-index: 20;pointer-events: none;overflow: hidden;height: 100%;width: 200px; }.hi-v4-table-freeze-shadow--left {margin-right: 10px;left: 0;-webkit-box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15); }.hi-v4-table-freeze-shadow--right {margin-left: 10px;right: 0;-webkit-box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15); }.hi-v4-table-header-filter-dropdown__trigger.hi-v4-icon-button {margin-left: 4px; }.hi-v4-table-header-filter-dropdown__content {width: 124px;padding: var(--hi-v4-spacing-6, 12px) var(--hi-v4-spacing-4, 8px);font-weight: var(--hi-v4-text-weight-normal, 400); }.hi-v4-table-header-filter-dropdown__item {margin-top: var(--hi-v4-spacing-4, 8px);padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);border-radius: var(--hi-v4-border-radius-md, 4px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;cursor: pointer;color: var(--hi-v4-color-gray-700, #1f2733);font-size: var(--hi-v4-text-size-md, 0.875rem); }.hi-v4-table-header-filter-dropdown__item:first-child {margin-top: 0; }.hi-v4-table-header-filter-dropdown__item:hover {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-header-filter-dropdown__item--active {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-header-filter-dropdown__item--active:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-header-filter-sorter {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;height: 20px;margin-top: 2px;margin-left: 6px; }.hi-v4-table-header-filter-sorter__icon {display: inline-block;height: 8px;cursor: pointer;overflow: hidden;font-weight: var(--hi-v4-text-weight-normal, 400);color: var(--hi-v4-color-gray-500, #929aa6); }.hi-v4-table-header-filter-sorter__icon svg {position: relative;top: -5px; }.hi-v4-table-header-filter-sorter__icon--active {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-table-header-filter-custom__trigger {margin-left: 6px;color: var(--hi-v4-color-gray-500, #929aa6);cursor: pointer; }.hi-v4-table-header-filter-custom__content {padding: 12px 8px; }.hi-v4-table-embed-row {position: relative;z-index: 0; }.hi-v4-table-embed-row > td {background-color: var(--hi-v4-color-gray-200, #ebedf0);padding: var(--hi-v4-spacing-10, 20px); }.hi-v4-table-setting {position: absolute;height: 100%;z-index: 11;-webkit-box-sizing: border-box;box-sizing: border-box;right: 0;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);border-bottom: none;border-top: none;color: var(--hi-v4-color-gray-500, #929aa6);cursor: pointer;font-size: var(--hi-v4-text-size-sm, 0.75rem);width: 18px;background: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-setting__btn-group {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end; }.hi-v4-table-setting-item {position: relative;padding-top: var(--hi-v4-spacing-1, 2px);padding-bottom: var(--hi-v4-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box; }.hi-v4-table-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;cursor: move;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v4-border-radius-md, 4px); }.hi-v4-table-setting-item__wrap:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-setting-item--dragging .hi-v4-table-setting-item__wrap {opacity: 0.6; }.hi-v4-table-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: '';background-color: var(--hi-v4-color-static-white, #fff);border: 1px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));border-radius: 100%; }.hi-v4-table-setting-item::after {position: absolute;content: '';z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));left: 0;width: 100%; }.hi-v4-table-setting-item::before, .hi-v4-table-setting-item::after {margin-left: -10px;margin-right: -10px; }.hi-v4-table-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px); }.hi-v4-table-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px; }.hi-v4-table-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px); }.hi-v4-table-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px; }.hi-v4-table-pagination {display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;row-gap: 8px;padding: var(--hi-v4-spacing-6, 12px) 0;background-color: var(--hi-v4-color-static-white, #fff); }.hi-v4-table-pagination--placement-left {-webkit-box-pack: start;-ms-flex-pack: start;justify-content: flex-start; }.hi-v4-table-pagination--placement-right {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end; }.hi-v4-table-pagination--placement-middle {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center; }.hi-v4-table-empty-content td {text-align: center;padding: var(--hi-v4-spacing-12, 24px) 0; }.hi-v4-table--bordered .hi-v4-table-empty-content td {border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8); }";
|
|
16
16
|
|
|
17
17
|
var __styleInject__ = require('style-inject/dist/style-inject.es.js')["default"];
|
|
18
18
|
|
|
@@ -41,14 +41,22 @@ var useTableCheck = function useTableCheck(_ref) {
|
|
|
41
41
|
return [false, false];
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var idsCanBeChecked = flattedData.filter(function (item) {
|
|
45
45
|
return !checkRowIsDisabledCheckbox(item.raw);
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
}).map(function (item) {
|
|
47
|
+
return item.id;
|
|
48
|
+
}); // TODO: 数组项完全匹配工具函数
|
|
49
|
+
// TODO: 数组项完全匹配工具函数
|
|
50
|
+
|
|
51
|
+
var _checkedAll = idsCanBeChecked.every(function (id) {
|
|
52
|
+
return isCheckedRowKey(id);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
var _semiChecked = _checkedAll ? false : checkedRowKeys.length > 0 && idsCanBeChecked.some(function (id) {
|
|
56
|
+
return isCheckedRowKey(id);
|
|
49
57
|
});
|
|
50
58
|
|
|
51
|
-
return [_checkedAll,
|
|
59
|
+
return [_checkedAll, _semiChecked];
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
return [false, false];
|
|
@@ -57,18 +65,31 @@ var useTableCheck = function useTableCheck(_ref) {
|
|
|
57
65
|
semiChecked = _React$useMemo[1];
|
|
58
66
|
|
|
59
67
|
var tryCheckAllRow = React.useCallback(function () {
|
|
60
|
-
if (checkedAll) {
|
|
61
|
-
trySetCheckedRowKeys([], [], false);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
68
|
var targetItems = flattedData.filter(function (item) {
|
|
66
69
|
return !checkRowIsDisabledCheckbox(item.raw);
|
|
67
70
|
});
|
|
68
71
|
var checkedRowKeys = targetItems.map(function (item) {
|
|
69
72
|
return item.id;
|
|
70
73
|
});
|
|
71
|
-
|
|
74
|
+
var checkedRowKeysSet = new Set(checkedRowKeys);
|
|
75
|
+
|
|
76
|
+
if (checkedAll) {
|
|
77
|
+
// 移除当前页所有行 ids
|
|
78
|
+
trySetCheckedRowKeys(function (prev) {
|
|
79
|
+
return prev.filter(function (id) {
|
|
80
|
+
return !checkedRowKeysSet.has(id);
|
|
81
|
+
});
|
|
82
|
+
}, targetItems, false);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
trySetCheckedRowKeys( // 添加当前页所有行 ids
|
|
87
|
+
function (prev) {
|
|
88
|
+
prev.forEach(function (id) {
|
|
89
|
+
return checkedRowKeysSet.add(id);
|
|
90
|
+
});
|
|
91
|
+
return Array.from(checkedRowKeysSet);
|
|
92
|
+
}, targetItems, true);
|
|
72
93
|
}, [trySetCheckedRowKeys, flattedData, checkRowIsDisabledCheckbox, checkedAll]);
|
|
73
94
|
return {
|
|
74
95
|
tryCheckAllRow: tryCheckAllRow,
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
var css_248z = "@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-table {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-size: 14px;\n position: relative; }\n.hi-v4-table table {\n width: 100%;\n text-align: left;\n background-color: var(--hi-v4-color-static-white, #fff);\n border-radius: 2px 2px 0 0;\n border-spacing: 0;\n border-collapse: separate;\n display: table;\n table-layout: fixed; }\n.hi-v4-table__wrapper {\n position: relative;\n z-index: 0; }\n.hi-v4-table__switcher.hi-v4-icon-button {\n color: var(--hi-v4-color-gray-500, #929aa6); }\n.hi-v4-table__switcher--expanded.hi-v4-icon-button {\n color: var(--hi-v4-color-primary-400, var(--hi-v4-color-brandblue-400, #4a9eff)); }\n.hi-v4-table--size-md table tbody > tr > td {\n padding: var(--hi-v4-spacing-7, 14px); }\n.hi-v4-table--size-md table thead > tr > th {\n padding: var(--hi-v4-spacing-7, 14px); }\n.hi-v4-table--size-sm table tbody > tr > td {\n padding: var(--hi-v4-spacing-5, 10px); }\n.hi-v4-table--size-sm table thead > tr > th {\n padding: var(--hi-v4-spacing-5, 10px); }\n.hi-v4-table--size-lg table tbody > tr > td {\n padding: var(--hi-v4-spacing-9, 18px); }\n.hi-v4-table--size-lg table thead > tr > th {\n padding: var(--hi-v4-spacing-9, 18px); }\n.hi-v4-table--bordered table thead > tr > th {\n border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-table--bordered table td {\n border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-table--bordered .hi-v4-table-header {\n border-top: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);\n border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-table--bordered .hi-v4-table-body {\n border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-table--sticky {\n position: -webkit-sticky;\n position: sticky;\n top: 0; }\n.hi-v4-table-header {\n position: relative;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden; }\n.hi-v4-table-header__resizable {\n position: relative;\n background-clip: padding-box; }\n.hi-v4-table-header__resizable-handle {\n position: absolute;\n width: 2px;\n height: 100%;\n bottom: 0;\n right: 0;\n cursor: col-resize;\n z-index: 1; }\n.hi-v4-table-header__resizable-handle:hover {\n background-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-table-header-cell {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active[data-sticky] {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-table-row--hover:hover > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-row--striped > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-row--expanded > .hi-v4-table-cell {\n color: var(--hi-v4-color-gray-800, #1f2937); }\n.hi-v4-table-row--error > .hi-v4-table-cell {\n color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-table-row--highlight > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-row--dragging > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-row--drag-top > .hi-v4-table-cell {\n border-top: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-table-row--drag-bottom > .hi-v4-table-cell {\n border-bottom: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-table-row--avg > .hi-v4-table-cell, .hi-v4-table-row--total > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-row--avg:hover > .hi-v4-table-cell, .hi-v4-table-row--total:hover > .hi-v4-table-cell {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-header .hi-v4-table-header-col, .hi-v4-table-header .hi-v4-table-col {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-body .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-body .hi-v4-table-col[data-hover-highlight] {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-header .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-header .hi-v4-table-col[data-hover-highlight] {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-table-body {\n position: relative;\n overflow: auto; }\n.hi-v4-table-header-cell {\n color: var(--hi-v4-color-gray-700, #1f2733);\n font-size: var(--hi-v4-text-size-md, 0.875rem);\n font-weight: var(--hi-v4-text-weight-medium, 500);\n line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);\n padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);\n border-bottom: 1px solid #f0f0f0; }\n.hi-v4-table-header-cell.hi-v4-table__embed-col, .hi-v4-table-header-cell.hi-v4-table__selection-col {\n padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px); }\n.hi-v4-table-cell {\n word-break: break-word;\n border-bottom: 1px solid #f0f0f0;\n font-size: var(--hi-v4-text-size-md, 0.875rem);\n font-weight: var(--hi-v4-text-weight-normal, 400);\n color: var(--hi-v4-color-gray-700, #1f2733);\n line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);\n padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-table-cell__indent {\n display: inline-block;\n width: 14px;\n height: 100%;\n margin-right: var(--hi-v4-spacing-1, 2px); }\n.hi-v4-table-cell__switcher.hi-v4-icon-button {\n margin-right: var(--hi-v4-spacing-1, 2px);\n color: var(--hi-v4-color-gray-500, #929aa6); }\n.hi-v4-table-cell.hi-v4-table__embed-col, .hi-v4-table-cell.hi-v4-table__selection-col {\n padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px); }\n.hi-v4-table-cell.hi-v4-table-cell__col--highlight {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-cell.hi-v4-table-cell__col--hovered-highlight {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-freeze-shadow {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 20;\n pointer-events: none;\n overflow: hidden;\n height: 100%;\n width: 200px; }\n.hi-v4-table-freeze-shadow--left {\n margin-right: 10px;\n left: 0;\n -webkit-box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);\n box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15); }\n.hi-v4-table-freeze-shadow--right {\n margin-left: 10px;\n right: 0;\n -webkit-box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);\n box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15); }\n.hi-v4-table-header-filter-dropdown__trigger.hi-v4-icon-button {\n margin-left: 4px; }\n.hi-v4-table-header-filter-dropdown__content {\n width: 124px;\n padding: var(--hi-v4-spacing-6, 12px) var(--hi-v4-spacing-4, 8px);\n font-weight: var(--hi-v4-text-weight-normal, 400); }\n.hi-v4-table-header-filter-dropdown__item {\n margin-top: var(--hi-v4-spacing-4, 8px);\n padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);\n border-radius: var(--hi-v4-border-radius-md, 4px);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n cursor: pointer;\n color: var(--hi-v4-color-gray-700, #1f2733);\n font-size: var(--hi-v4-text-size-md, 0.875rem); }\n.hi-v4-table-header-filter-dropdown__item:first-child {\n margin-top: 0; }\n.hi-v4-table-header-filter-dropdown__item:hover {\n background-color: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-header-filter-dropdown__item--active {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-header-filter-dropdown__item--active:hover {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-header-filter-sorter {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n height: 20px;\n margin-top: 2px;\n margin-left: 6px; }\n.hi-v4-table-header-filter-sorter__icon {\n display: inline-block;\n height: 8px;\n cursor: pointer;\n overflow: hidden;\n font-weight: var(--hi-v4-text-weight-normal, 400);\n color: var(--hi-v4-color-gray-500, #929aa6); }\n.hi-v4-table-header-filter-sorter__icon svg {\n position: relative;\n top: -5px; }\n.hi-v4-table-header-filter-sorter__icon--active {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-table-header-filter-custom__trigger {\n margin-left: 6px;\n color: var(--hi-v4-color-gray-500, #929aa6);\n cursor: pointer; }\n.hi-v4-table-header-filter-custom__content {\n padding: 12px 8px; }\n.hi-v4-table-embed-row {\n position: relative;\n z-index: 0; }\n.hi-v4-table-embed-row > td {\n background-color: var(--hi-v4-color-gray-200, #ebedf0);\n padding: var(--hi-v4-spacing-10, 20px); }\n.hi-v4-table-setting {\n position: absolute;\n height: 100%;\n z-index: 11;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n right: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);\n border-bottom: none;\n border-top: none;\n color: var(--hi-v4-color-gray-500, #929aa6);\n cursor: pointer;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n width: 18px;\n background: var(--hi-v4-color-gray-50, #f5f7fa); }\n.hi-v4-table-setting__btn-group {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end; }\n.hi-v4-table-setting-item {\n position: relative;\n padding-top: var(--hi-v4-spacing-1, 2px);\n padding-bottom: var(--hi-v4-spacing-1, 2px);\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n.hi-v4-table-setting-item__wrap {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: move;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);\n line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);\n border-radius: var(--hi-v4-border-radius-md, 4px); }\n.hi-v4-table-setting-item__wrap:hover {\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-table-setting-item--dragging .hi-v4-table-setting-item__wrap {\n opacity: 0.6; }\n.hi-v4-table-setting-item::before {\n position: absolute;\n left: 0;\n z-index: 9999;\n display: none;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 8px;\n height: 8px;\n content: '';\n background-color: var(--hi-v4-color-static-white, #fff);\n border: 1px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n border-radius: 100%; }\n.hi-v4-table-setting-item::after {\n position: absolute;\n content: '';\n z-index: 9998;\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-bottom-width: 0;\n border-bottom-style: solid;\n border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n left: 0;\n width: 100%; }\n.hi-v4-table-setting-item::before, .hi-v4-table-setting-item::after {\n margin-left: -10px;\n margin-right: -10px; }\n.hi-v4-table-setting-item--direction-before::before {\n display: block;\n top: -0.5px;\n -webkit-transform: translateY(-4px);\n transform: translateY(-4px); }\n.hi-v4-table-setting-item--direction-before::after {\n top: -0.5px;\n border-bottom-width: 1px; }\n.hi-v4-table-setting-item--direction-after::before {\n display: block;\n bottom: 0.5px;\n -webkit-transform: translateY(4px);\n transform: translateY(4px); }\n.hi-v4-table-setting-item--direction-after::after {\n bottom: 0.5px;\n border-bottom-width: 1px; }\n.hi-v4-table-pagination {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n row-gap: 8px;\n padding: var(--hi-v4-spacing-6, 12px) 0;\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-table-pagination--placement-left {\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n.hi-v4-table-pagination--placement-right {\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end; }\n.hi-v4-table-pagination--placement-middle {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n.hi-v4-table-empty-content td {\n text-align: center;\n padding: var(--hi-v4-spacing-12, 24px) 0; }\n";
|
|
11
|
-
|
|
12
|
-
var __styleInject__ = require('style-inject/dist/style-inject.es.js')["default"];
|
|
10
|
+
import __styleInject__ from 'style-inject/dist/style-inject.es.js';
|
|
11
|
+
var css_248z = ".hi-v4-table {-webkit-box-sizing: border-box;box-sizing: border-box;font-size: 14px;position: relative; }.hi-v4-table table {width: 100%;text-align: left;background-color: var(--hi-v4-color-static-white, #fff);border-radius: 2px 2px 0 0;border-spacing: 0;border-collapse: separate;display: table;table-layout: fixed; }.hi-v4-table__wrapper {position: relative;z-index: 0; }.hi-v4-table__switcher.hi-v4-icon-button {color: var(--hi-v4-color-gray-500, #929aa6); }.hi-v4-table__switcher--expanded.hi-v4-icon-button {color: var(--hi-v4-color-primary-400, var(--hi-v4-color-brandblue-400, #4a9eff)); }.hi-v4-table--size-md table tbody > tr > td {padding: var(--hi-v4-spacing-7, 14px); }.hi-v4-table--size-md table thead > tr > th {padding: var(--hi-v4-spacing-7, 14px); }.hi-v4-table--size-sm table tbody > tr > td {padding: var(--hi-v4-spacing-5, 10px); }.hi-v4-table--size-sm table thead > tr > th {padding: var(--hi-v4-spacing-5, 10px); }.hi-v4-table--size-lg table tbody > tr > td {padding: var(--hi-v4-spacing-9, 18px); }.hi-v4-table--size-lg table thead > tr > th {padding: var(--hi-v4-spacing-9, 18px); }.hi-v4-table--bordered table thead > tr > th {border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }.hi-v4-table--bordered table td {border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }.hi-v4-table--bordered .hi-v4-table-header {border-top: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }.hi-v4-table--bordered .hi-v4-table-body {border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0); }.hi-v4-table--sticky {position: -webkit-sticky;position: sticky;top: 0; }.hi-v4-table-header {position: relative;-webkit-box-sizing: border-box;box-sizing: border-box;overflow: hidden; }.hi-v4-table-header__resizable {position: relative;background-clip: padding-box; }.hi-v4-table-header__resizable-handle {position: absolute;width: 2px;height: 100%;bottom: 0;right: 0;cursor: col-resize;z-index: 1; }.hi-v4-table-header__resizable-handle:hover {background-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-table-header-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active[data-sticky] {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-table-row--hover:hover > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-row--striped > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-row--expanded > .hi-v4-table-cell {color: var(--hi-v4-color-gray-800, #1f2937); }.hi-v4-table-row--error > .hi-v4-table-cell {color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }.hi-v4-table-row--highlight > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-row--dragging > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-row--drag-top > .hi-v4-table-cell {border-top: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-table-row--drag-bottom > .hi-v4-table-cell {border-bottom: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-table-row--avg > .hi-v4-table-cell, .hi-v4-table-row--total > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-row--avg:hover > .hi-v4-table-cell, .hi-v4-table-row--total:hover > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-header .hi-v4-table-header-col, .hi-v4-table-header .hi-v4-table-col {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-body .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-body .hi-v4-table-col[data-hover-highlight] {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-header .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-header .hi-v4-table-col[data-hover-highlight] {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-table-body {position: relative;overflow: auto; }.hi-v4-table-header-cell {color: var(--hi-v4-color-gray-700, #1f2733);font-size: var(--hi-v4-text-size-md, 0.875rem);font-weight: var(--hi-v4-text-weight-medium, 500);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8); }.hi-v4-table-header-cell.hi-v4-table__embed-col, .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px); }.hi-v4-table-cell {word-break: break-word;border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);font-size: var(--hi-v4-text-size-md, 0.875rem);font-weight: var(--hi-v4-text-weight-normal, 400);color: var(--hi-v4-color-gray-700, #1f2733);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);background-color: var(--hi-v4-color-static-white, #fff); }.hi-v4-table-cell__indent {display: inline-block;width: 14px;height: 100%;margin-right: var(--hi-v4-spacing-1, 2px); }.hi-v4-table-cell__switcher.hi-v4-icon-button {margin-right: var(--hi-v4-spacing-1, 2px);color: var(--hi-v4-color-gray-500, #929aa6); }.hi-v4-table-cell.hi-v4-table__embed-col, .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px); }.hi-v4-table-cell.hi-v4-table-cell__col--highlight {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-cell.hi-v4-table-cell__col--hovered-highlight {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-freeze-shadow {position: absolute;top: 0;bottom: 0;z-index: 20;pointer-events: none;overflow: hidden;height: 100%;width: 200px; }.hi-v4-table-freeze-shadow--left {margin-right: 10px;left: 0;-webkit-box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15); }.hi-v4-table-freeze-shadow--right {margin-left: 10px;right: 0;-webkit-box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15); }.hi-v4-table-header-filter-dropdown__trigger.hi-v4-icon-button {margin-left: 4px; }.hi-v4-table-header-filter-dropdown__content {width: 124px;padding: var(--hi-v4-spacing-6, 12px) var(--hi-v4-spacing-4, 8px);font-weight: var(--hi-v4-text-weight-normal, 400); }.hi-v4-table-header-filter-dropdown__item {margin-top: var(--hi-v4-spacing-4, 8px);padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);border-radius: var(--hi-v4-border-radius-md, 4px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;cursor: pointer;color: var(--hi-v4-color-gray-700, #1f2733);font-size: var(--hi-v4-text-size-md, 0.875rem); }.hi-v4-table-header-filter-dropdown__item:first-child {margin-top: 0; }.hi-v4-table-header-filter-dropdown__item:hover {background-color: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-header-filter-dropdown__item--active {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-header-filter-dropdown__item--active:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-header-filter-sorter {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;height: 20px;margin-top: 2px;margin-left: 6px; }.hi-v4-table-header-filter-sorter__icon {display: inline-block;height: 8px;cursor: pointer;overflow: hidden;font-weight: var(--hi-v4-text-weight-normal, 400);color: var(--hi-v4-color-gray-500, #929aa6); }.hi-v4-table-header-filter-sorter__icon svg {position: relative;top: -5px; }.hi-v4-table-header-filter-sorter__icon--active {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-table-header-filter-custom__trigger {margin-left: 6px;color: var(--hi-v4-color-gray-500, #929aa6);cursor: pointer; }.hi-v4-table-header-filter-custom__content {padding: 12px 8px; }.hi-v4-table-embed-row {position: relative;z-index: 0; }.hi-v4-table-embed-row > td {background-color: var(--hi-v4-color-gray-200, #ebedf0);padding: var(--hi-v4-spacing-10, 20px); }.hi-v4-table-setting {position: absolute;height: 100%;z-index: 11;-webkit-box-sizing: border-box;box-sizing: border-box;right: 0;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);border-bottom: none;border-top: none;color: var(--hi-v4-color-gray-500, #929aa6);cursor: pointer;font-size: var(--hi-v4-text-size-sm, 0.75rem);width: 18px;background: var(--hi-v4-color-gray-50, #f5f7fa); }.hi-v4-table-setting__btn-group {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end; }.hi-v4-table-setting-item {position: relative;padding-top: var(--hi-v4-spacing-1, 2px);padding-bottom: var(--hi-v4-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box; }.hi-v4-table-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;cursor: move;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v4-border-radius-md, 4px); }.hi-v4-table-setting-item__wrap:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-table-setting-item--dragging .hi-v4-table-setting-item__wrap {opacity: 0.6; }.hi-v4-table-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: '';background-color: var(--hi-v4-color-static-white, #fff);border: 1px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));border-radius: 100%; }.hi-v4-table-setting-item::after {position: absolute;content: '';z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));left: 0;width: 100%; }.hi-v4-table-setting-item::before, .hi-v4-table-setting-item::after {margin-left: -10px;margin-right: -10px; }.hi-v4-table-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px); }.hi-v4-table-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px; }.hi-v4-table-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px); }.hi-v4-table-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px; }.hi-v4-table-pagination {display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;row-gap: 8px;padding: var(--hi-v4-spacing-6, 12px) 0;background-color: var(--hi-v4-color-static-white, #fff); }.hi-v4-table-pagination--placement-left {-webkit-box-pack: start;-ms-flex-pack: start;justify-content: flex-start; }.hi-v4-table-pagination--placement-right {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end; }.hi-v4-table-pagination--placement-middle {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center; }.hi-v4-table-empty-content td {text-align: center;padding: var(--hi-v4-spacing-12, 24px) 0; }.hi-v4-table--bordered .hi-v4-table-empty-content td {border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8); }";
|
|
13
12
|
|
|
14
13
|
__styleInject__(css_248z);
|
|
15
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/table",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.38",
|
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "HIUI <mi-hiui@xiaomi.com>",
|
|
@@ -43,36 +43,36 @@
|
|
|
43
43
|
"url": "https://github.com/XiaoMi/hiui/issues"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@hi-ui/button": "^4.0.0-beta.
|
|
47
|
-
"@hi-ui/checkbox": "^4.0.0-beta.
|
|
46
|
+
"@hi-ui/button": "^4.0.0-beta.11",
|
|
47
|
+
"@hi-ui/checkbox": "^4.0.0-beta.9",
|
|
48
48
|
"@hi-ui/classname": "^4.0.0-beta.0",
|
|
49
|
-
"@hi-ui/core-css": "^4.0.0-beta.
|
|
50
|
-
"@hi-ui/dom-utils": "^4.0.0-beta.
|
|
51
|
-
"@hi-ui/drawer": "^4.0.0-beta.
|
|
52
|
-
"@hi-ui/empty-state": "^4.0.0-beta.
|
|
49
|
+
"@hi-ui/core-css": "^4.0.0-beta.5",
|
|
50
|
+
"@hi-ui/dom-utils": "^4.0.0-beta.5",
|
|
51
|
+
"@hi-ui/drawer": "^4.0.0-beta.22",
|
|
52
|
+
"@hi-ui/empty-state": "^4.0.0-beta.16",
|
|
53
53
|
"@hi-ui/env": "^4.0.0-beta.0",
|
|
54
|
-
"@hi-ui/func-utils": "^4.0.0-beta.
|
|
55
|
-
"@hi-ui/icon-button": "^4.0.0-beta.
|
|
56
|
-
"@hi-ui/icons": "^4.0.0-beta.
|
|
57
|
-
"@hi-ui/loading": "^4.0.0-beta.
|
|
58
|
-
"@hi-ui/locale-context": "^4.0.0-beta.
|
|
59
|
-
"@hi-ui/object-utils": "^4.0.0-beta.
|
|
60
|
-
"@hi-ui/pagination": "^4.0.0-beta.
|
|
61
|
-
"@hi-ui/popper": "^4.0.0-beta.
|
|
62
|
-
"@hi-ui/react-utils": "^4.0.0-beta.
|
|
63
|
-
"@hi-ui/select": "^4.0.0-beta.
|
|
64
|
-
"@hi-ui/spinner": "^4.0.0-beta.
|
|
65
|
-
"@hi-ui/times": "^4.0.0-beta.
|
|
66
|
-
"@hi-ui/tree-utils": "^4.0.0-beta.
|
|
67
|
-
"@hi-ui/type-assertion": "^4.0.0-beta.
|
|
68
|
-
"@hi-ui/use-cache": "^4.0.0-beta.
|
|
69
|
-
"@hi-ui/use-check": "^4.0.0-beta.
|
|
70
|
-
"@hi-ui/use-check-state": "^4.0.0-beta.
|
|
71
|
-
"@hi-ui/use-drag-sorter": "^4.0.0-beta.
|
|
72
|
-
"@hi-ui/use-latest": "^4.0.0-beta.
|
|
73
|
-
"@hi-ui/use-toggle": "^4.0.0-beta.
|
|
74
|
-
"@hi-ui/use-uncontrolled-state": "^4.0.0-beta.
|
|
75
|
-
"@hi-ui/use-update-effect": "^4.0.0-beta.
|
|
54
|
+
"@hi-ui/func-utils": "^4.0.0-beta.10",
|
|
55
|
+
"@hi-ui/icon-button": "^4.0.0-beta.8",
|
|
56
|
+
"@hi-ui/icons": "^4.0.0-beta.10",
|
|
57
|
+
"@hi-ui/loading": "^4.0.0-beta.15",
|
|
58
|
+
"@hi-ui/locale-context": "^4.0.0-beta.16",
|
|
59
|
+
"@hi-ui/object-utils": "^4.0.0-beta.9",
|
|
60
|
+
"@hi-ui/pagination": "^4.0.0-beta.24",
|
|
61
|
+
"@hi-ui/popper": "^4.0.0-beta.12",
|
|
62
|
+
"@hi-ui/react-utils": "^4.0.0-beta.5",
|
|
63
|
+
"@hi-ui/select": "^4.0.0-beta.22",
|
|
64
|
+
"@hi-ui/spinner": "^4.0.0-beta.8",
|
|
65
|
+
"@hi-ui/times": "^4.0.0-beta.5",
|
|
66
|
+
"@hi-ui/tree-utils": "^4.0.0-beta.4",
|
|
67
|
+
"@hi-ui/type-assertion": "^4.0.0-beta.4",
|
|
68
|
+
"@hi-ui/use-cache": "^4.0.0-beta.4",
|
|
69
|
+
"@hi-ui/use-check": "^4.0.0-beta.4",
|
|
70
|
+
"@hi-ui/use-check-state": "^4.0.0-beta.4",
|
|
71
|
+
"@hi-ui/use-drag-sorter": "^4.0.0-beta.8",
|
|
72
|
+
"@hi-ui/use-latest": "^4.0.0-beta.4",
|
|
73
|
+
"@hi-ui/use-toggle": "^4.0.0-beta.4",
|
|
74
|
+
"@hi-ui/use-uncontrolled-state": "^4.0.0-beta.4",
|
|
75
|
+
"@hi-ui/use-update-effect": "^4.0.0-beta.4",
|
|
76
76
|
"axios": "^0.24.0",
|
|
77
77
|
"react-resizable": "^3.0.4"
|
|
78
78
|
},
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"react-dom": ">=16.8.6"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@hi-ui/hi-build": "^4.0.0-beta.
|
|
84
|
+
"@hi-ui/hi-build": "^4.0.0-beta.4",
|
|
85
85
|
"@types/react-resizable": "^1.7.4",
|
|
86
86
|
"react": "^17.0.1",
|
|
87
87
|
"react-dom": "^17.0.1"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "53ae46d5c39ae7c8ed67049ca2ecbc156c891aef"
|
|
90
90
|
}
|