@kdcloudjs/table 1.1.5-canary.3 → 1.1.5-canary.4
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/@kdcloudjs/table.css +1 -1
- package/dist/@kdcloudjs/table.js +15 -9
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/@kdcloudjs/table.min.css +1 -1
- package/dist/@kdcloudjs/table.min.js +2 -2
- package/dist/@kdcloudjs/table.min.js.map +1 -1
- package/es/table/pipeline/features/columnFilter.d.ts +3 -1
- package/es/table/pipeline/features/columnFilter.js +4 -2
- package/es/table/pipeline/features/filter/Filter.d.ts +2 -1
- package/es/table/pipeline/features/filter/Filter.js +10 -6
- package/lib/table/pipeline/features/columnFilter.d.ts +3 -1
- package/lib/table/pipeline/features/columnFilter.js +4 -2
- package/lib/table/pipeline/features/filter/Filter.d.ts +2 -1
- package/lib/table/pipeline/features/filter/Filter.js +10 -6
- package/package.json +1 -1
package/dist/@kdcloudjs/table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/table v1.1.5-canary.
|
|
3
|
+
* @kdcloudjs/table v1.1.5-canary.3
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -5843,7 +5843,8 @@ function filter() {
|
|
|
5843
5843
|
filterIcon = opts.filterIcon,
|
|
5844
5844
|
stopClickEventPropagation = opts.stopClickEventPropagation,
|
|
5845
5845
|
stopESCKeyDownEventPropagation = opts.stopESCKeyDownEventPropagation,
|
|
5846
|
-
hideFilterPopupHeader = opts.hideFilterPopupHeader
|
|
5846
|
+
hideFilterPopupHeader = opts.hideFilterPopupHeader,
|
|
5847
|
+
getPopupParent = opts.getPopupParent;
|
|
5847
5848
|
var inputFilters = (_ref = (_ref2 = filters !== null && filters !== void 0 ? filters : pipeline.getStateAtKey(stateKey)) !== null && _ref2 !== void 0 ? _ref2 : defaultFilters) !== null && _ref !== void 0 ? _ref : [];
|
|
5848
5849
|
inputFilters = mode === 'single' ? inputFilters.slice(0, 1) : inputFilters;
|
|
5849
5850
|
var inputFiltersMap = new Map(inputFilters.map(function (filterItem) {
|
|
@@ -5907,7 +5908,8 @@ function filter() {
|
|
|
5907
5908
|
className: classnames__WEBPACK_IMPORTED_MODULE_18___default()((_cx = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_5___default()(_cx, _base_styles__WEBPACK_IMPORTED_MODULE_22__["Classes"].tableFilterTrigger, true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_5___default()(_cx, "active", filterActive), _cx)),
|
|
5908
5909
|
stopClickEventPropagation: stopClickEventPropagation,
|
|
5909
5910
|
stopESCKeyDownEventPropagation: stopESCKeyDownEventPropagation,
|
|
5910
|
-
hideFilterPopupHeader: hideFilterPopupHeader
|
|
5911
|
+
hideFilterPopupHeader: hideFilterPopupHeader,
|
|
5912
|
+
getPopupParent: getPopupParent
|
|
5911
5913
|
})]); // result.headerCellProps = mergeCellProps(col.headerCellProps, {
|
|
5912
5914
|
// style: {
|
|
5913
5915
|
// paddingRight: '18px'
|
|
@@ -7140,10 +7142,11 @@ function Panel(_ref) {
|
|
|
7140
7142
|
filterIcon = _ref.filterIcon,
|
|
7141
7143
|
hidePanel = _ref.hidePanel,
|
|
7142
7144
|
renderPanelContent = _ref.renderPanelContent,
|
|
7143
|
-
hideFilterPopupHeader = _ref.hideFilterPopupHeader
|
|
7145
|
+
hideFilterPopupHeader = _ref.hideFilterPopupHeader,
|
|
7146
|
+
popupParent = _ref.popupParent;
|
|
7144
7147
|
var filterPanelRef = react__WEBPACK_IMPORTED_MODULE_3___default.a.useRef(null);
|
|
7145
7148
|
|
|
7146
|
-
var _React$useState = react__WEBPACK_IMPORTED_MODULE_3___default.a.useState(Object(_utils__WEBPACK_IMPORTED_MODULE_11__["calculatePopupRelative"])(ele,
|
|
7149
|
+
var _React$useState = react__WEBPACK_IMPORTED_MODULE_3___default.a.useState(Object(_utils__WEBPACK_IMPORTED_MODULE_11__["calculatePopupRelative"])(ele, popupParent, _getPanelOffset(ele, hideFilterPopupHeader))),
|
|
7147
7150
|
_React$useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_React$useState, 2),
|
|
7148
7151
|
position = _React$useState2[0],
|
|
7149
7152
|
setPosition = _React$useState2[1];
|
|
@@ -7154,7 +7157,7 @@ function Panel(_ref) {
|
|
|
7154
7157
|
};
|
|
7155
7158
|
|
|
7156
7159
|
var handleFilterPanelResize = function handleFilterPanelResize(resize) {
|
|
7157
|
-
setPosition(Object(_utils__WEBPACK_IMPORTED_MODULE_11__["calculatePopupRelative"])(ele,
|
|
7160
|
+
setPosition(Object(_utils__WEBPACK_IMPORTED_MODULE_11__["calculatePopupRelative"])(ele, popupParent, _getPanelOffset(ele, hideFilterPopupHeader)));
|
|
7158
7161
|
};
|
|
7159
7162
|
|
|
7160
7163
|
Object(react__WEBPACK_IMPORTED_MODULE_3__["useEffect"])(function () {
|
|
@@ -7189,7 +7192,8 @@ function Filter(_ref2) {
|
|
|
7189
7192
|
isFilterActive = _ref2.isFilterActive,
|
|
7190
7193
|
stopClickEventPropagation = _ref2.stopClickEventPropagation,
|
|
7191
7194
|
stopESCKeyDownEventPropagation = _ref2.stopESCKeyDownEventPropagation,
|
|
7192
|
-
hideFilterPopupHeader = _ref2.hideFilterPopupHeader
|
|
7195
|
+
hideFilterPopupHeader = _ref2.hideFilterPopupHeader,
|
|
7196
|
+
getPopupParent = _ref2.getPopupParent;
|
|
7193
7197
|
|
|
7194
7198
|
var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_3___default.a.useState(false),
|
|
7195
7199
|
_React$useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_React$useState3, 2),
|
|
@@ -7247,6 +7251,7 @@ function Filter(_ref2) {
|
|
|
7247
7251
|
|
|
7248
7252
|
var iconClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()((_cx = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_cx, className, true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_cx, 'filter-panel-open', showPanel), _cx));
|
|
7249
7253
|
var displayFilterIcon = typeof filterIcon === 'function' ? filterIcon(isFilterActive) : filterIcon;
|
|
7254
|
+
var popupParent = (getPopupParent === null || getPopupParent === void 0 ? void 0 : getPopupParent(iconWrapRef.current)) || document.body;
|
|
7250
7255
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(FilterIconSpanStyle, {
|
|
7251
7256
|
style: style,
|
|
7252
7257
|
className: iconClassName,
|
|
@@ -7265,8 +7270,9 @@ function Filter(_ref2) {
|
|
|
7265
7270
|
filterIcon: displayFilterIcon,
|
|
7266
7271
|
hidePanel: hidePanel,
|
|
7267
7272
|
renderPanelContent: renderPanelContent,
|
|
7268
|
-
hideFilterPopupHeader: hideFilterPopupHeader
|
|
7269
|
-
|
|
7273
|
+
hideFilterPopupHeader: hideFilterPopupHeader,
|
|
7274
|
+
popupParent: popupParent
|
|
7275
|
+
}), popupParent));
|
|
7270
7276
|
}
|
|
7271
7277
|
|
|
7272
7278
|
function _getPanelOffset(ele, hideFilterPopupHeader) {
|