amis 1.9.0-beta.12 → 1.9.0-beta.15
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/Schema.d.ts +4 -2
- package/lib/Schema.js.map +1 -1
- package/lib/SchemaRenderer.d.ts +2 -2
- package/lib/SchemaRenderer.js +3 -3
- package/lib/SchemaRenderer.js.map +2 -2
- package/lib/actions/Action.d.ts +8 -6
- package/lib/actions/Action.js.map +2 -2
- package/lib/actions/AjaxAction.d.ts +10 -7
- package/lib/actions/AjaxAction.js +27 -21
- package/lib/actions/AjaxAction.js.map +2 -2
- package/lib/actions/BreakAction.d.ts +2 -2
- package/lib/actions/BreakAction.js.map +1 -1
- package/lib/actions/BroadcastAction.d.ts +3 -3
- package/lib/actions/BroadcastAction.js +3 -2
- package/lib/actions/BroadcastAction.js.map +2 -2
- package/lib/actions/CmptAction.d.ts +2 -2
- package/lib/actions/CmptAction.js +7 -9
- package/lib/actions/CmptAction.js.map +2 -2
- package/lib/actions/ContinueAction.d.ts +2 -2
- package/lib/actions/ContinueAction.js.map +1 -1
- package/lib/actions/CopyAction.d.ts +7 -4
- package/lib/actions/CopyAction.js +8 -6
- package/lib/actions/CopyAction.js.map +2 -2
- package/lib/actions/CustomAction.d.ts +2 -2
- package/lib/actions/CustomAction.js.map +1 -1
- package/lib/actions/DialogAction.d.ts +14 -8
- package/lib/actions/DialogAction.js +6 -6
- package/lib/actions/DialogAction.js.map +2 -2
- package/lib/actions/DrawerAction.d.ts +3 -3
- package/lib/actions/DrawerAction.js.map +1 -1
- package/lib/actions/EmailAction.d.ts +10 -7
- package/lib/actions/EmailAction.js +4 -5
- package/lib/actions/EmailAction.js.map +2 -2
- package/lib/actions/LinkAction.d.ts +19 -11
- package/lib/actions/LinkAction.js +6 -5
- package/lib/actions/LinkAction.js.map +2 -2
- package/lib/actions/LoopAction.d.ts +6 -3
- package/lib/actions/LoopAction.js +22 -20
- package/lib/actions/LoopAction.js.map +2 -2
- package/lib/actions/PageAction.d.ts +8 -5
- package/lib/actions/PageAction.js +3 -2
- package/lib/actions/PageAction.js.map +2 -2
- package/lib/actions/ParallelAction.d.ts +2 -2
- package/lib/actions/ParallelAction.js.map +1 -1
- package/lib/actions/SwitchAction.d.ts +2 -2
- package/lib/actions/SwitchAction.js.map +1 -1
- package/lib/actions/ToastAction.d.ts +2 -2
- package/lib/actions/ToastAction.js +6 -4
- package/lib/actions/ToastAction.js.map +2 -2
- package/lib/components/Editor.d.ts +84 -84
- package/lib/components/InputBox.js +1 -1
- package/lib/components/InputBox.js.map +2 -2
- package/lib/components/Pagination.d.ts +1175 -0
- package/lib/components/Pagination.js +274 -0
- package/lib/components/Pagination.js.map +13 -0
- package/lib/components/PickerContainer.d.ts +1 -0
- package/lib/components/PickerContainer.js +3 -2
- package/lib/components/PickerContainer.js.map +2 -2
- package/lib/components/Rating.js +11 -9
- package/lib/components/Rating.js.map +2 -2
- package/lib/components/Select.js +3 -3
- package/lib/components/Select.js.map +2 -2
- package/lib/components/Tag.d.ts +148 -0
- package/lib/components/Tag.js +96 -0
- package/lib/components/Tag.js.map +13 -0
- package/lib/components/TooltipWrapper.d.ts +25 -21
- package/lib/components/TooltipWrapper.js +11 -1
- package/lib/components/TooltipWrapper.js.map +2 -2
- package/lib/components/TransferDropDown.d.ts +85 -84
- package/lib/components/TransferDropDown.js +2 -2
- package/lib/components/TransferDropDown.js.map +2 -2
- package/lib/components/Tree.d.ts +84 -84
- package/lib/components/formula/VariableList.d.ts +1 -0
- package/lib/components/formula/VariableList.js.map +2 -2
- package/lib/components/icons.js +2 -0
- package/lib/components/icons.js.map +2 -2
- package/lib/components/index.d.ts +4 -1
- package/lib/components/index.js +7 -1
- package/lib/components/index.js.map +2 -2
- package/lib/components/schema-editor/Array.d.ts +11 -0
- package/lib/components/schema-editor/Array.js +66 -0
- package/lib/components/schema-editor/Array.js.map +13 -0
- package/lib/components/schema-editor/Common.d.ts +29 -0
- package/lib/components/schema-editor/Common.js +69 -0
- package/lib/components/schema-editor/Common.js.map +13 -0
- package/lib/components/schema-editor/Item.d.ts +9 -0
- package/lib/components/schema-editor/Item.js +31 -0
- package/lib/components/schema-editor/Item.js.map +13 -0
- package/lib/components/schema-editor/Object.d.ts +44 -0
- package/lib/components/schema-editor/Object.js +191 -0
- package/lib/components/schema-editor/Object.js.map +13 -0
- package/lib/components/schema-editor/SchemaVariableList.d.ts +316 -0
- package/lib/components/schema-editor/SchemaVariableList.js +74 -0
- package/lib/components/schema-editor/SchemaVariableList.js.map +13 -0
- package/lib/components/schema-editor/SchemaVariableListPicker.d.ts +305 -0
- package/lib/components/schema-editor/SchemaVariableListPicker.js +32 -0
- package/lib/components/schema-editor/SchemaVariableListPicker.js.map +13 -0
- package/lib/components/schema-editor/index.d.ts +520 -0
- package/lib/components/schema-editor/index.js +118 -0
- package/lib/components/schema-editor/index.js.map +13 -0
- package/lib/components/table/Cell.d.ts +930 -0
- package/lib/components/table/Cell.js +36 -0
- package/lib/components/table/Cell.js.map +13 -0
- package/lib/components/table/HeadCellDropDown.d.ts +514 -0
- package/lib/components/table/HeadCellDropDown.js +52 -0
- package/lib/components/table/HeadCellDropDown.js.map +13 -0
- package/lib/components/table/HeadCellFilter.d.ts +771 -0
- package/lib/components/table/HeadCellFilter.js +106 -0
- package/lib/components/table/HeadCellFilter.js.map +13 -0
- package/lib/components/table/HeadCellSelect.d.ts +672 -0
- package/lib/components/table/HeadCellSelect.js +46 -0
- package/lib/components/table/HeadCellSelect.js.map +13 -0
- package/lib/components/table/HeadCellSort.d.ts +498 -0
- package/lib/components/table/HeadCellSort.js +67 -0
- package/lib/components/table/HeadCellSort.js.map +13 -0
- package/lib/components/table/index.d.ts +1355 -0
- package/lib/components/table/index.js +1095 -0
- package/lib/components/table/index.js.map +13 -0
- package/lib/env.d.ts +2 -4
- package/lib/env.js.map +2 -2
- package/lib/factory.js +0 -95
- package/lib/factory.js.map +2 -2
- package/lib/icons/dot.js +11 -0
- package/lib/index.d.ts +6 -1
- package/lib/index.js +9 -2
- package/lib/index.js.map +2 -2
- package/lib/locale/de-DE.js +18 -1
- package/lib/locale/de-DE.js.map +2 -2
- package/lib/locale/en-US.js +18 -1
- package/lib/locale/en-US.js.map +2 -2
- package/lib/locale/zh-CN.js +20 -1
- package/lib/locale/zh-CN.js.map +2 -2
- package/lib/renderers/Action.js +0 -2
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/Carousel.d.ts +5 -1
- package/lib/renderers/Carousel.js +18 -5
- package/lib/renderers/Carousel.js.map +2 -2
- package/lib/renderers/Form/ButtonGroupSelect.d.ts +2 -0
- package/lib/renderers/Form/ButtonGroupSelect.js +7 -0
- package/lib/renderers/Form/ButtonGroupSelect.js.map +2 -2
- package/lib/renderers/Form/Checkbox.js +3 -4
- package/lib/renderers/Form/Checkbox.js.map +2 -2
- package/lib/renderers/Form/Checkboxes.d.ts +2 -1
- package/lib/renderers/Form/Checkboxes.js +19 -14
- package/lib/renderers/Form/Checkboxes.js.map +2 -2
- package/lib/renderers/Form/Combo.js +23 -4
- package/lib/renderers/Form/Combo.js.map +2 -2
- package/lib/renderers/Form/DiffEditor.d.ts +126 -18
- package/lib/renderers/Form/Editor.d.ts +412 -112
- package/lib/renderers/Form/Editor.js +10 -1
- package/lib/renderers/Form/Editor.js.map +2 -2
- package/lib/renderers/Form/InputExcel.js +6 -1
- package/lib/renderers/Form/InputExcel.js.map +2 -2
- package/lib/renderers/Form/InputFile.js +1 -2
- package/lib/renderers/Form/InputFile.js.map +2 -2
- package/lib/renderers/Form/InputTree.js +1 -1
- package/lib/renderers/Form/InputTree.js.map +2 -2
- package/lib/renderers/Form/Item.d.ts +0 -6
- package/lib/renderers/Form/JSONSchemaEditor.d.ts +41 -0
- package/lib/renderers/Form/JSONSchemaEditor.js +33 -0
- package/lib/renderers/Form/JSONSchemaEditor.js.map +13 -0
- package/lib/renderers/Form/ListSelect.d.ts +2 -0
- package/lib/renderers/Form/ListSelect.js +7 -0
- package/lib/renderers/Form/ListSelect.js.map +2 -2
- package/lib/renderers/Form/Options.js +1 -0
- package/lib/renderers/Form/Options.js.map +2 -2
- package/lib/renderers/Form/Select.js +12 -1
- package/lib/renderers/Form/Select.js.map +2 -2
- package/lib/renderers/Form/TabsTransfer.d.ts +1 -1
- package/lib/renderers/Form/TabsTransfer.js +2 -2
- package/lib/renderers/Form/TabsTransfer.js.map +2 -2
- package/lib/renderers/Form/TreeSelect.d.ts +4 -0
- package/lib/renderers/Form/TreeSelect.js +2 -2
- package/lib/renderers/Form/TreeSelect.js.map +2 -2
- package/lib/renderers/Form/wrapControl.js +10 -5
- package/lib/renderers/Form/wrapControl.js.map +2 -2
- package/lib/renderers/Pagination.d.ts +49 -30
- package/lib/renderers/Pagination.js +3 -132
- package/lib/renderers/Pagination.js.map +2 -2
- package/lib/renderers/Table/HeadCellSearchDropdown.js +0 -1
- package/lib/renderers/Table/HeadCellSearchDropdown.js.map +2 -2
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.d.ts +29 -0
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.js +158 -0
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.js.map +13 -0
- package/lib/renderers/Table-v2/TableCell.d.ts +6 -0
- package/lib/renderers/Table-v2/TableCell.js +28 -0
- package/lib/renderers/Table-v2/TableCell.js.map +13 -0
- package/lib/renderers/Table-v2/index.d.ts +256 -0
- package/lib/renderers/Table-v2/index.js +548 -0
- package/lib/renderers/Table-v2/index.js.map +13 -0
- package/lib/renderers/Tabs.js +1 -1
- package/lib/renderers/Tabs.js.map +2 -2
- package/lib/renderers/Tag.d.ts +66 -0
- package/lib/renderers/Tag.js +53 -0
- package/lib/renderers/Tag.js.map +13 -0
- package/lib/renderers/Wizard.js +3 -3
- package/lib/renderers/Wizard.js.map +2 -2
- package/lib/schemaExtend.js +24 -30
- package/lib/schemaExtend.js.map +2 -2
- package/lib/store/combo.d.ts +140 -20
- package/lib/store/form.d.ts +56 -8
- package/lib/store/formItem.d.ts +3 -1
- package/lib/store/formItem.js +3 -1
- package/lib/store/formItem.js.map +2 -2
- package/lib/store/index.js +2 -0
- package/lib/store/index.js.map +2 -2
- package/lib/store/table-v2.d.ts +308 -0
- package/lib/store/table-v2.js +452 -0
- package/lib/store/table-v2.js.map +13 -0
- package/lib/store/table.d.ts +112 -16
- package/lib/store/table.js +1 -1
- package/lib/store/table.js.map +2 -2
- package/lib/themes/ang-ie11.css +1686 -120
- package/lib/themes/ang.css +1807 -208
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +1667 -101
- package/lib/themes/antd.css +1789 -201
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +1662 -97
- package/lib/themes/cxd.css +1983 -394
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +1667 -101
- package/lib/themes/dark.css +1789 -201
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default-ie11.css +1662 -97
- package/lib/themes/default.css +1983 -394
- package/lib/themes/default.css.map +1 -1
- package/lib/utils/DataSchema.d.ts +25 -0
- package/lib/utils/DataSchema.js +104 -0
- package/lib/utils/DataSchema.js.map +13 -0
- package/lib/utils/DataScope.d.ts +23 -0
- package/lib/utils/DataScope.js +140 -0
- package/lib/utils/DataScope.js.map +13 -0
- package/lib/utils/handleAction.js +1 -1
- package/lib/utils/handleAction.js.map +2 -2
- package/lib/utils/renderer-event.d.ts +8 -2
- package/lib/utils/renderer-event.js +102 -1
- package/lib/utils/renderer-event.js.map +2 -2
- package/package.json +3 -2
- package/schema.json +1476 -469
- package/scss/_properties.scss +69 -0
- package/scss/components/_button.scss +37 -39
- package/scss/components/_context-menu.scss +3 -18
- package/scss/components/_json-schema-editor.scss +126 -0
- package/scss/components/_pagination.scss +104 -23
- package/scss/components/_result-box.scss +2 -2
- package/scss/components/_table-v2.scss +912 -0
- package/scss/components/_tag.scss +177 -0
- package/scss/components/form/_selection.scss +1 -14
- package/scss/components/form/_text.scss +1 -1
- package/scss/themes/_antd-variables.scss +0 -13
- package/scss/themes/_common.scss +3 -0
- package/scss/themes/_cxd-variables.scss +7 -17
- package/scss/themes/_dark-variables.scss +0 -13
- package/scss/themes/cxd.scss +1 -1
- package/sdk/ang-ie11.css +2240 -227
- package/sdk/ang.css +2905 -859
- package/sdk/antd-ie11.css +2233 -220
- package/sdk/antd.css +2905 -870
- package/sdk/barcode.js +51 -51
- package/sdk/charts.js +14 -14
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +65 -65
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +2223 -211
- package/sdk/cxd.css +2911 -875
- package/sdk/dark-ie11.css +2233 -220
- package/sdk/dark.css +2905 -870
- package/sdk/exceljs.js +1 -1
- package/sdk/locale/de-DE.js +18 -1
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +16 -16
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +2223 -211
- package/sdk/sdk.css +2911 -875
- package/sdk/sdk.js +1326 -1270
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +57 -57
- package/src/Schema.ts +7 -0
- package/src/SchemaRenderer.tsx +4 -5
- package/src/actions/Action.ts +7 -6
- package/src/actions/AjaxAction.ts +33 -24
- package/src/actions/BreakAction.ts +2 -2
- package/src/actions/BroadcastAction.ts +6 -5
- package/src/actions/CmptAction.ts +5 -6
- package/src/actions/ContinueAction.ts +2 -2
- package/src/actions/CopyAction.ts +14 -8
- package/src/actions/CustomAction.ts +2 -2
- package/src/actions/DialogAction.ts +16 -10
- package/src/actions/DrawerAction.ts +3 -3
- package/src/actions/EmailAction.ts +12 -12
- package/src/actions/LinkAction.ts +34 -14
- package/src/actions/LoopAction.ts +13 -8
- package/src/actions/PageAction.ts +9 -6
- package/src/actions/ParallelAction.ts +2 -2
- package/src/actions/SwitchAction.ts +2 -2
- package/src/actions/ToastAction.ts +9 -5
- package/src/components/InputBox.tsx +1 -0
- package/src/components/Pagination.tsx +446 -0
- package/src/components/PickerContainer.tsx +8 -5
- package/src/components/Rating.tsx +16 -9
- package/src/components/Select.tsx +3 -3
- package/src/components/Tag.tsx +179 -0
- package/src/components/TooltipWrapper.tsx +14 -1
- package/src/components/TransferDropDown.tsx +3 -0
- package/src/components/formula/VariableList.tsx +1 -0
- package/src/components/icons.tsx +2 -0
- package/src/components/index.tsx +7 -1
- package/src/components/schema-editor/Array.tsx +95 -0
- package/src/components/schema-editor/Common.tsx +138 -0
- package/src/components/schema-editor/Item.tsx +36 -0
- package/src/components/schema-editor/Object.tsx +299 -0
- package/src/components/schema-editor/SchemaVariableList.tsx +97 -0
- package/src/components/schema-editor/SchemaVariableListPicker.tsx +66 -0
- package/src/components/schema-editor/index.tsx +211 -0
- package/src/components/table/Cell.tsx +70 -0
- package/src/components/table/HeadCellDropDown.tsx +115 -0
- package/src/components/table/HeadCellFilter.tsx +193 -0
- package/src/components/table/HeadCellSelect.tsx +86 -0
- package/src/components/table/HeadCellSort.tsx +102 -0
- package/src/components/table/index.tsx +1681 -0
- package/src/env.tsx +7 -14
- package/src/factory.tsx +3 -106
- package/src/icons/dot.svg +11 -0
- package/src/index.tsx +8 -1
- package/src/locale/de-DE.ts +18 -1
- package/src/locale/en-US.ts +18 -1
- package/src/locale/zh-CN.ts +20 -1
- package/src/renderers/Action.tsx +1 -1
- package/src/renderers/Carousel.tsx +21 -6
- package/src/renderers/Form/ButtonGroupSelect.tsx +10 -1
- package/src/renderers/Form/Checkbox.tsx +4 -4
- package/src/renderers/Form/Checkboxes.tsx +31 -25
- package/src/renderers/Form/Combo.tsx +20 -4
- package/src/renderers/Form/Editor.tsx +15 -1
- package/src/renderers/Form/InputExcel.tsx +6 -1
- package/src/renderers/Form/InputFile.tsx +1 -2
- package/src/renderers/Form/InputTree.tsx +1 -1
- package/src/renderers/Form/JSONSchemaEditor.tsx +67 -0
- package/src/renderers/Form/ListSelect.tsx +9 -1
- package/src/renderers/Form/Options.tsx +1 -1
- package/src/renderers/Form/Select.tsx +7 -0
- package/src/renderers/Form/TabsTransfer.tsx +2 -2
- package/src/renderers/Form/TreeSelect.tsx +8 -1
- package/src/renderers/Form/wrapControl.tsx +11 -5
- package/src/renderers/Pagination.tsx +65 -253
- package/src/renderers/Table/HeadCellSearchDropdown.tsx +0 -1
- package/src/renderers/Table-v2/HeadCellSearchDropdown.tsx +244 -0
- package/src/renderers/Table-v2/TableCell.tsx +19 -0
- package/src/renderers/Table-v2/index.tsx +1140 -0
- package/src/renderers/Tabs.tsx +1 -1
- package/src/renderers/Tag.tsx +128 -0
- package/src/renderers/Wizard.tsx +3 -3
- package/src/schemaExtend.ts +24 -28
- package/src/store/formItem.ts +5 -1
- package/src/store/index.ts +2 -0
- package/src/store/table-v2.ts +646 -0
- package/src/store/table.ts +1 -1
- package/src/utils/DataSchema.ts +131 -0
- package/src/utils/DataScope.ts +190 -0
- package/src/utils/handleAction.ts +1 -1
- package/src/utils/renderer-event.ts +113 -2
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* @file table/BodyCell
|
4
|
+
* @author fex
|
5
|
+
*/
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
7
|
+
exports.BodyCell = void 0;
|
8
|
+
var tslib_1 = require("tslib");
|
9
|
+
var react_1 = (0, tslib_1.__importDefault)(require("react"));
|
10
|
+
var theme_1 = require("../../theme");
|
11
|
+
var locale_1 = require("../../locale");
|
12
|
+
var zIndex = 1;
|
13
|
+
var BodyCell = /** @class */ (function (_super) {
|
14
|
+
(0, tslib_1.__extends)(BodyCell, _super);
|
15
|
+
function BodyCell() {
|
16
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
17
|
+
}
|
18
|
+
BodyCell.prototype.render = function () {
|
19
|
+
var _a;
|
20
|
+
var _b = this.props, fixed = _b.fixed, rowSpan = _b.rowSpan, colSpan = _b.colSpan, key = _b.key, children = _b.children, className = _b.className, column = _b.column, style = _b.style, groupId = _b.groupId, depth = _b.depth, Component = _b.wrapperComponent, cx = _b.classnames;
|
21
|
+
return (react_1.default.createElement(Component, { key: key || null, rowSpan: rowSpan && rowSpan > 1 ? rowSpan : null, colSpan: colSpan && colSpan > 1 ? colSpan : null, className: cx('Table-cell', className, (_a = {},
|
22
|
+
_a[cx("Table-cell-fix-".concat(fixed))] = fixed,
|
23
|
+
_a["text-".concat(column === null || column === void 0 ? void 0 : column.align)] = column === null || column === void 0 ? void 0 : column.align,
|
24
|
+
_a)), style: fixed ? (0, tslib_1.__assign)({ position: 'sticky', zIndex: zIndex }, style) : (0, tslib_1.__assign)({}, style), "data-group-id": groupId || null, "data-depth": depth || null }, children));
|
25
|
+
};
|
26
|
+
BodyCell.defaultProps = {
|
27
|
+
fixed: '',
|
28
|
+
wrapperComponent: 'td',
|
29
|
+
rowSpan: null,
|
30
|
+
colSpan: null
|
31
|
+
};
|
32
|
+
return BodyCell;
|
33
|
+
}(react_1.default.Component));
|
34
|
+
exports.BodyCell = BodyCell;
|
35
|
+
exports.default = (0, theme_1.themeable)((0, locale_1.localeable)(BodyCell));
|
36
|
+
//# sourceMappingURL=./components/table/Cell.js.map
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"file": "Cell.js",
|
4
|
+
"sourceRoot": "",
|
5
|
+
"sources": [
|
6
|
+
"/src/components/table/Cell.tsx"
|
7
|
+
],
|
8
|
+
"names": [],
|
9
|
+
"mappings": ";AAAA;;;GAGG;;;;AAEH,6DAA0B;AAE1B,qCAAkD;AAClD,uCAAqD;AAGrD,IAAM,MAAM,GAAG,CAAC,CAAC;AAiBjB;IAA8B,yCAAsB;IAApD;;IAuCA,CAAC;IA/BC,yBAAM,GAAN;;QACQ,IAAA,KAaF,IAAI,CAAC,KAAK,EAZZ,KAAK,WAAA,EACL,OAAO,aAAA,EACP,OAAO,aAAA,EACP,GAAG,SAAA,EACH,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,MAAM,YAAA,EACN,KAAK,WAAA,EACL,OAAO,aAAA,EACP,KAAK,WAAA,EACa,SAAS,sBAAA,EACf,EAAE,gBACF,CAAC;QAEf,OAAO,CACL,8BAAC,SAAS,IACR,GAAG,EAAE,GAAG,IAAI,IAAI,EAChB,OAAO,EAAE,OAAO,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAChD,OAAO,EAAE,OAAO,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAChD,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS;gBACnC,GAAC,EAAE,CAAC,yBAAkB,KAAK,CAAE,CAAC,IAAI,KAAK;gBACvC,GAAC,eAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAE,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK;oBACzC,EACF,KAAK,EAAE,KAAK,CAAC,CAAC,yBAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAA,IAAK,KAAK,EAAE,CAAC,2BAAK,KAAK,CAAC,mBACnD,OAAO,IAAI,IAAI,gBAClB,KAAK,IAAI,IAAI,IACzB,QAAQ,CAAa,CACxB,CAAC;IACJ,CAAC;IArCM,qBAAY,GAAG;QACpB,KAAK,EAAE,EAAE;QACT,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KACd,CAAC;IAiCJ,eAAC;CAAA,AAvCD,CAA8B,eAAK,CAAC,SAAS,GAuC5C;AAvCY,4BAAQ;AAyCrB,kBAAe,IAAA,iBAAS,EAAC,IAAA,mBAAU,EAAC,QAAQ,CAAC,CAAC,CAAC",
|
10
|
+
"sourcesContent": [
|
11
|
+
"/**\n * @file table/BodyCell\n * @author fex\n */\n\nimport React from 'react';\n\nimport {themeable, ThemeProps} from '../../theme';\nimport {LocaleProps, localeable} from '../../locale';\nimport {ColumnProps} from './index';\n\nconst zIndex = 1;\n\nexport interface Props extends ThemeProps, LocaleProps {\n fixed?: string | boolean; // left | right\n rowSpan?: number | any;\n colSpan?: number | any;\n key?: string | number;\n className?: string;\n children?: any;\n tagName?: string;\n style?: Object;\n column?: ColumnProps;\n wrapperComponent: any;\n groupId?: string; // 表头分组随机生成的id\n depth?: number; // 表头分组\n}\n\nexport class BodyCell extends React.Component<Props> {\n static defaultProps = {\n fixed: '',\n wrapperComponent: 'td',\n rowSpan: null,\n colSpan: null\n };\n\n render() {\n const {\n fixed,\n rowSpan,\n colSpan,\n key,\n children,\n className,\n column,\n style,\n groupId,\n depth,\n wrapperComponent: Component,\n classnames: cx\n } = this.props;\n\n return (\n <Component\n key={key || null}\n rowSpan={rowSpan && rowSpan > 1 ? rowSpan : null}\n colSpan={colSpan && colSpan > 1 ? colSpan : null}\n className={cx('Table-cell', className, {\n [cx(`Table-cell-fix-${fixed}`)] : fixed,\n [`text-${column?.align}`] : column?.align\n })}\n style={fixed ? {position: 'sticky', zIndex, ...style} : {...style}}\n data-group-id={groupId || null}\n data-depth={depth || null}\n >{children}</Component>\n );\n }\n}\n\nexport default themeable(localeable(BodyCell));"
|
12
|
+
]
|
13
|
+
}
|
@@ -0,0 +1,514 @@
|
|
1
|
+
/**
|
2
|
+
* @file table/HeadCellDropDown
|
3
|
+
* @author fex
|
4
|
+
*/
|
5
|
+
/// <reference types="hoist-non-react-statics" />
|
6
|
+
import React from 'react';
|
7
|
+
import { ThemeProps } from '../../theme';
|
8
|
+
import { LocaleProps } from '../../locale';
|
9
|
+
export interface FilterPayload {
|
10
|
+
closeDropdown?: boolean;
|
11
|
+
}
|
12
|
+
export interface FilterDropdownProps {
|
13
|
+
setSelectedKeys?: (keys: Array<string | number> | string) => void;
|
14
|
+
selectedKeys?: Array<string | number> | string;
|
15
|
+
confirm: (payload: FilterPayload) => void;
|
16
|
+
clearFilters?: () => void;
|
17
|
+
}
|
18
|
+
export interface Props extends ThemeProps, LocaleProps {
|
19
|
+
filterIcon: Function | React.ReactNode;
|
20
|
+
className: string;
|
21
|
+
layerClassName: string;
|
22
|
+
active: boolean;
|
23
|
+
popOverContainer?: () => Element | Text | null;
|
24
|
+
filterDropdown: (payload: FilterDropdownProps) => JSX.Element | null;
|
25
|
+
selectedKeys?: Array<string | number> | string;
|
26
|
+
setSelectedKeys?: (keys: Array<string | number> | string) => void;
|
27
|
+
}
|
28
|
+
export interface State {
|
29
|
+
isOpened: boolean;
|
30
|
+
}
|
31
|
+
export declare class HeadCellDropDown extends React.Component<Props, State> {
|
32
|
+
constructor(props: Props);
|
33
|
+
render(): JSX.Element;
|
34
|
+
openLayer(): void;
|
35
|
+
closeLayer(): void;
|
36
|
+
}
|
37
|
+
declare const _default: {
|
38
|
+
new (props: (Omit<Omit<Props, keyof LocaleProps> & {
|
39
|
+
locale?: string | undefined;
|
40
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
41
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps) | Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
42
|
+
locale?: string | undefined;
|
43
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
44
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>): {
|
45
|
+
render(): JSX.Element;
|
46
|
+
context: any;
|
47
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
48
|
+
locale?: string | undefined;
|
49
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
50
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
51
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
52
|
+
readonly props: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
53
|
+
locale?: string | undefined;
|
54
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
55
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
|
56
|
+
children?: React.ReactNode;
|
57
|
+
}>;
|
58
|
+
state: Readonly<{}>;
|
59
|
+
refs: {
|
60
|
+
[key: string]: React.ReactInstance;
|
61
|
+
};
|
62
|
+
componentDidMount?(): void;
|
63
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
64
|
+
locale?: string | undefined;
|
65
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
66
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
67
|
+
componentWillUnmount?(): void;
|
68
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
69
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
70
|
+
locale?: string | undefined;
|
71
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
72
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
73
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
74
|
+
locale?: string | undefined;
|
75
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
76
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
77
|
+
componentWillMount?(): void;
|
78
|
+
UNSAFE_componentWillMount?(): void;
|
79
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
80
|
+
locale?: string | undefined;
|
81
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
82
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
83
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
84
|
+
locale?: string | undefined;
|
85
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
86
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
87
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
88
|
+
locale?: string | undefined;
|
89
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
90
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
91
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
92
|
+
locale?: string | undefined;
|
93
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
94
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
95
|
+
};
|
96
|
+
new (props: Omit<Omit<Props, keyof LocaleProps> & {
|
97
|
+
locale?: string | undefined;
|
98
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
99
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps, context: any): {
|
100
|
+
render(): JSX.Element;
|
101
|
+
context: any;
|
102
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
103
|
+
locale?: string | undefined;
|
104
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
105
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
106
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
107
|
+
readonly props: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
108
|
+
locale?: string | undefined;
|
109
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
110
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
|
111
|
+
children?: React.ReactNode;
|
112
|
+
}>;
|
113
|
+
state: Readonly<{}>;
|
114
|
+
refs: {
|
115
|
+
[key: string]: React.ReactInstance;
|
116
|
+
};
|
117
|
+
componentDidMount?(): void;
|
118
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
119
|
+
locale?: string | undefined;
|
120
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
121
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
122
|
+
componentWillUnmount?(): void;
|
123
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
124
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
125
|
+
locale?: string | undefined;
|
126
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
127
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
128
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
129
|
+
locale?: string | undefined;
|
130
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
131
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
132
|
+
componentWillMount?(): void;
|
133
|
+
UNSAFE_componentWillMount?(): void;
|
134
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
135
|
+
locale?: string | undefined;
|
136
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
137
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
138
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
139
|
+
locale?: string | undefined;
|
140
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
141
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
142
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
143
|
+
locale?: string | undefined;
|
144
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
145
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
146
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<Props, keyof LocaleProps> & {
|
147
|
+
locale?: string | undefined;
|
148
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
149
|
+
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
150
|
+
};
|
151
|
+
displayName: string;
|
152
|
+
contextType: React.Context<string>;
|
153
|
+
ComposedComponent: React.ComponentType<{
|
154
|
+
new (props: (Omit<Props, keyof LocaleProps> & {
|
155
|
+
locale?: string | undefined;
|
156
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
157
|
+
}) | Readonly<Omit<Props, keyof LocaleProps> & {
|
158
|
+
locale?: string | undefined;
|
159
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
160
|
+
}>): {
|
161
|
+
render(): JSX.Element;
|
162
|
+
context: any;
|
163
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Props, keyof LocaleProps> & {
|
164
|
+
locale?: string | undefined;
|
165
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
166
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
167
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
168
|
+
readonly props: Readonly<Omit<Props, keyof LocaleProps> & {
|
169
|
+
locale?: string | undefined;
|
170
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
171
|
+
}> & Readonly<{
|
172
|
+
children?: React.ReactNode;
|
173
|
+
}>;
|
174
|
+
state: Readonly<{}>;
|
175
|
+
refs: {
|
176
|
+
[key: string]: React.ReactInstance;
|
177
|
+
};
|
178
|
+
componentDidMount?(): void;
|
179
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
180
|
+
locale?: string | undefined;
|
181
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
182
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
183
|
+
componentWillUnmount?(): void;
|
184
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
185
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
186
|
+
locale?: string | undefined;
|
187
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
188
|
+
}>, prevState: Readonly<{}>): any;
|
189
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
190
|
+
locale?: string | undefined;
|
191
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
192
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
193
|
+
componentWillMount?(): void;
|
194
|
+
UNSAFE_componentWillMount?(): void;
|
195
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
196
|
+
locale?: string | undefined;
|
197
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
198
|
+
}>, nextContext: any): void;
|
199
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
200
|
+
locale?: string | undefined;
|
201
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
202
|
+
}>, nextContext: any): void;
|
203
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
204
|
+
locale?: string | undefined;
|
205
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
206
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
207
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
208
|
+
locale?: string | undefined;
|
209
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
210
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
211
|
+
};
|
212
|
+
new (props: Omit<Props, keyof LocaleProps> & {
|
213
|
+
locale?: string | undefined;
|
214
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
215
|
+
}, context: any): {
|
216
|
+
render(): JSX.Element;
|
217
|
+
context: any;
|
218
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Props, keyof LocaleProps> & {
|
219
|
+
locale?: string | undefined;
|
220
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
221
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
222
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
223
|
+
readonly props: Readonly<Omit<Props, keyof LocaleProps> & {
|
224
|
+
locale?: string | undefined;
|
225
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
226
|
+
}> & Readonly<{
|
227
|
+
children?: React.ReactNode;
|
228
|
+
}>;
|
229
|
+
state: Readonly<{}>;
|
230
|
+
refs: {
|
231
|
+
[key: string]: React.ReactInstance;
|
232
|
+
};
|
233
|
+
componentDidMount?(): void;
|
234
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
235
|
+
locale?: string | undefined;
|
236
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
237
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
238
|
+
componentWillUnmount?(): void;
|
239
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
240
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
241
|
+
locale?: string | undefined;
|
242
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
243
|
+
}>, prevState: Readonly<{}>): any;
|
244
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
245
|
+
locale?: string | undefined;
|
246
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
247
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
248
|
+
componentWillMount?(): void;
|
249
|
+
UNSAFE_componentWillMount?(): void;
|
250
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
251
|
+
locale?: string | undefined;
|
252
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
253
|
+
}>, nextContext: any): void;
|
254
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
255
|
+
locale?: string | undefined;
|
256
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
257
|
+
}>, nextContext: any): void;
|
258
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
259
|
+
locale?: string | undefined;
|
260
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
261
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
262
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
263
|
+
locale?: string | undefined;
|
264
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
265
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
266
|
+
};
|
267
|
+
displayName: string;
|
268
|
+
contextType: React.Context<string>;
|
269
|
+
ComposedComponent: React.ComponentType<typeof HeadCellDropDown>;
|
270
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof HeadCellDropDown, {}> & {
|
271
|
+
ComposedComponent: typeof HeadCellDropDown;
|
272
|
+
}>;
|
273
|
+
} & import("hoist-non-react-statics").NonReactStatics<{
|
274
|
+
new (props: (Omit<Props, keyof LocaleProps> & {
|
275
|
+
locale?: string | undefined;
|
276
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
277
|
+
}) | Readonly<Omit<Props, keyof LocaleProps> & {
|
278
|
+
locale?: string | undefined;
|
279
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
280
|
+
}>): {
|
281
|
+
render(): JSX.Element;
|
282
|
+
context: any;
|
283
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Props, keyof LocaleProps> & {
|
284
|
+
locale?: string | undefined;
|
285
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
286
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
287
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
288
|
+
readonly props: Readonly<Omit<Props, keyof LocaleProps> & {
|
289
|
+
locale?: string | undefined;
|
290
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
291
|
+
}> & Readonly<{
|
292
|
+
children?: React.ReactNode;
|
293
|
+
}>;
|
294
|
+
state: Readonly<{}>;
|
295
|
+
refs: {
|
296
|
+
[key: string]: React.ReactInstance;
|
297
|
+
};
|
298
|
+
componentDidMount?(): void;
|
299
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
300
|
+
locale?: string | undefined;
|
301
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
302
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
303
|
+
componentWillUnmount?(): void;
|
304
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
305
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
306
|
+
locale?: string | undefined;
|
307
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
308
|
+
}>, prevState: Readonly<{}>): any;
|
309
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
310
|
+
locale?: string | undefined;
|
311
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
312
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
313
|
+
componentWillMount?(): void;
|
314
|
+
UNSAFE_componentWillMount?(): void;
|
315
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
316
|
+
locale?: string | undefined;
|
317
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
318
|
+
}>, nextContext: any): void;
|
319
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
320
|
+
locale?: string | undefined;
|
321
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
322
|
+
}>, nextContext: any): void;
|
323
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
324
|
+
locale?: string | undefined;
|
325
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
326
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
327
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
328
|
+
locale?: string | undefined;
|
329
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
330
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
331
|
+
};
|
332
|
+
new (props: Omit<Props, keyof LocaleProps> & {
|
333
|
+
locale?: string | undefined;
|
334
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
335
|
+
}, context: any): {
|
336
|
+
render(): JSX.Element;
|
337
|
+
context: any;
|
338
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Props, keyof LocaleProps> & {
|
339
|
+
locale?: string | undefined;
|
340
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
341
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
342
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
343
|
+
readonly props: Readonly<Omit<Props, keyof LocaleProps> & {
|
344
|
+
locale?: string | undefined;
|
345
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
346
|
+
}> & Readonly<{
|
347
|
+
children?: React.ReactNode;
|
348
|
+
}>;
|
349
|
+
state: Readonly<{}>;
|
350
|
+
refs: {
|
351
|
+
[key: string]: React.ReactInstance;
|
352
|
+
};
|
353
|
+
componentDidMount?(): void;
|
354
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
355
|
+
locale?: string | undefined;
|
356
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
357
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
358
|
+
componentWillUnmount?(): void;
|
359
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
360
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
361
|
+
locale?: string | undefined;
|
362
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
363
|
+
}>, prevState: Readonly<{}>): any;
|
364
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
365
|
+
locale?: string | undefined;
|
366
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
367
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
368
|
+
componentWillMount?(): void;
|
369
|
+
UNSAFE_componentWillMount?(): void;
|
370
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
371
|
+
locale?: string | undefined;
|
372
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
373
|
+
}>, nextContext: any): void;
|
374
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
375
|
+
locale?: string | undefined;
|
376
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
377
|
+
}>, nextContext: any): void;
|
378
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
379
|
+
locale?: string | undefined;
|
380
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
381
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
382
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
383
|
+
locale?: string | undefined;
|
384
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
385
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
386
|
+
};
|
387
|
+
displayName: string;
|
388
|
+
contextType: React.Context<string>;
|
389
|
+
ComposedComponent: React.ComponentType<typeof HeadCellDropDown>;
|
390
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof HeadCellDropDown, {}> & {
|
391
|
+
ComposedComponent: typeof HeadCellDropDown;
|
392
|
+
}, {}> & {
|
393
|
+
ComposedComponent: {
|
394
|
+
new (props: (Omit<Props, keyof LocaleProps> & {
|
395
|
+
locale?: string | undefined;
|
396
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
397
|
+
}) | Readonly<Omit<Props, keyof LocaleProps> & {
|
398
|
+
locale?: string | undefined;
|
399
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
400
|
+
}>): {
|
401
|
+
render(): JSX.Element;
|
402
|
+
context: any;
|
403
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Props, keyof LocaleProps> & {
|
404
|
+
locale?: string | undefined;
|
405
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
406
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
407
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
408
|
+
readonly props: Readonly<Omit<Props, keyof LocaleProps> & {
|
409
|
+
locale?: string | undefined;
|
410
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
411
|
+
}> & Readonly<{
|
412
|
+
children?: React.ReactNode;
|
413
|
+
}>;
|
414
|
+
state: Readonly<{}>;
|
415
|
+
refs: {
|
416
|
+
[key: string]: React.ReactInstance;
|
417
|
+
};
|
418
|
+
componentDidMount?(): void;
|
419
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
420
|
+
locale?: string | undefined;
|
421
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
422
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
423
|
+
componentWillUnmount?(): void;
|
424
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
425
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
426
|
+
locale?: string | undefined;
|
427
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
428
|
+
}>, prevState: Readonly<{}>): any;
|
429
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
430
|
+
locale?: string | undefined;
|
431
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
432
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
433
|
+
componentWillMount?(): void;
|
434
|
+
UNSAFE_componentWillMount?(): void;
|
435
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
436
|
+
locale?: string | undefined;
|
437
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
438
|
+
}>, nextContext: any): void;
|
439
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
440
|
+
locale?: string | undefined;
|
441
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
442
|
+
}>, nextContext: any): void;
|
443
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
444
|
+
locale?: string | undefined;
|
445
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
446
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
447
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
448
|
+
locale?: string | undefined;
|
449
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
450
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
451
|
+
};
|
452
|
+
new (props: Omit<Props, keyof LocaleProps> & {
|
453
|
+
locale?: string | undefined;
|
454
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
455
|
+
}, context: any): {
|
456
|
+
render(): JSX.Element;
|
457
|
+
context: any;
|
458
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Props, keyof LocaleProps> & {
|
459
|
+
locale?: string | undefined;
|
460
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
461
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
462
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
463
|
+
readonly props: Readonly<Omit<Props, keyof LocaleProps> & {
|
464
|
+
locale?: string | undefined;
|
465
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
466
|
+
}> & Readonly<{
|
467
|
+
children?: React.ReactNode;
|
468
|
+
}>;
|
469
|
+
state: Readonly<{}>;
|
470
|
+
refs: {
|
471
|
+
[key: string]: React.ReactInstance;
|
472
|
+
};
|
473
|
+
componentDidMount?(): void;
|
474
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
475
|
+
locale?: string | undefined;
|
476
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
477
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
478
|
+
componentWillUnmount?(): void;
|
479
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
480
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
481
|
+
locale?: string | undefined;
|
482
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
483
|
+
}>, prevState: Readonly<{}>): any;
|
484
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
485
|
+
locale?: string | undefined;
|
486
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
487
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
488
|
+
componentWillMount?(): void;
|
489
|
+
UNSAFE_componentWillMount?(): void;
|
490
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
491
|
+
locale?: string | undefined;
|
492
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
493
|
+
}>, nextContext: any): void;
|
494
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
495
|
+
locale?: string | undefined;
|
496
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
497
|
+
}>, nextContext: any): void;
|
498
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
499
|
+
locale?: string | undefined;
|
500
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
501
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
502
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Props, keyof LocaleProps> & {
|
503
|
+
locale?: string | undefined;
|
504
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
505
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
506
|
+
};
|
507
|
+
displayName: string;
|
508
|
+
contextType: React.Context<string>;
|
509
|
+
ComposedComponent: React.ComponentType<typeof HeadCellDropDown>;
|
510
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof HeadCellDropDown, {}> & {
|
511
|
+
ComposedComponent: typeof HeadCellDropDown;
|
512
|
+
};
|
513
|
+
};
|
514
|
+
export default _default;
|
@@ -0,0 +1,52 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* @file table/HeadCellDropDown
|
4
|
+
* @author fex
|
5
|
+
*/
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
7
|
+
exports.HeadCellDropDown = void 0;
|
8
|
+
var tslib_1 = require("tslib");
|
9
|
+
var react_1 = (0, tslib_1.__importDefault)(require("react"));
|
10
|
+
var react_dom_1 = require("react-dom");
|
11
|
+
var theme_1 = require("../../theme");
|
12
|
+
var locale_1 = require("../../locale");
|
13
|
+
var Overlay_1 = (0, tslib_1.__importDefault)(require("../Overlay"));
|
14
|
+
var PopOver_1 = (0, tslib_1.__importDefault)(require("../PopOver"));
|
15
|
+
var HeadCellDropDown = /** @class */ (function (_super) {
|
16
|
+
(0, tslib_1.__extends)(HeadCellDropDown, _super);
|
17
|
+
function HeadCellDropDown(props) {
|
18
|
+
var _this = _super.call(this, props) || this;
|
19
|
+
_this.state = {
|
20
|
+
isOpened: false
|
21
|
+
};
|
22
|
+
_this.openLayer = _this.openLayer.bind(_this);
|
23
|
+
_this.closeLayer = _this.closeLayer.bind(_this);
|
24
|
+
return _this;
|
25
|
+
}
|
26
|
+
HeadCellDropDown.prototype.render = function () {
|
27
|
+
var _this = this;
|
28
|
+
var isOpened = this.state.isOpened;
|
29
|
+
var _a = this.props, popOverContainer = _a.popOverContainer, active = _a.active, className = _a.className, layerClassName = _a.layerClassName, filterIcon = _a.filterIcon, filterDropdown = _a.filterDropdown, cx = _a.classnames, ns = _a.classPrefix;
|
30
|
+
return (react_1.default.createElement("span", { className: cx(className, active ? 'is-active' : '') },
|
31
|
+
react_1.default.createElement("span", { onClick: this.openLayer }, filterIcon && typeof filterIcon === 'function'
|
32
|
+
? filterIcon(active) : (filterIcon || null)),
|
33
|
+
isOpened ? (react_1.default.createElement(Overlay_1.default, { container: popOverContainer || (function () { return (0, react_dom_1.findDOMNode)(_this); }), placement: "left-bottom-left-top right-bottom-right-top", target: popOverContainer ? function () { return (0, react_dom_1.findDOMNode)(_this).parentNode; } : null, show: true },
|
34
|
+
react_1.default.createElement(PopOver_1.default, { classPrefix: ns, onHide: this.closeLayer, className: cx(layerClassName), overlay: true }, filterDropdown && typeof filterDropdown === 'function'
|
35
|
+
? filterDropdown((0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.props), { confirm: function (payload) {
|
36
|
+
if (!(payload && payload.closeDropdown === false)) {
|
37
|
+
_this.closeLayer();
|
38
|
+
}
|
39
|
+
} })) : (filterDropdown || null))))
|
40
|
+
: null));
|
41
|
+
};
|
42
|
+
HeadCellDropDown.prototype.openLayer = function () {
|
43
|
+
this.setState({ isOpened: true });
|
44
|
+
};
|
45
|
+
HeadCellDropDown.prototype.closeLayer = function () {
|
46
|
+
this.setState({ isOpened: false });
|
47
|
+
};
|
48
|
+
return HeadCellDropDown;
|
49
|
+
}(react_1.default.Component));
|
50
|
+
exports.HeadCellDropDown = HeadCellDropDown;
|
51
|
+
exports.default = (0, theme_1.themeable)((0, locale_1.localeable)(HeadCellDropDown));
|
52
|
+
//# sourceMappingURL=./components/table/HeadCellDropDown.js.map
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"file": "HeadCellDropDown.js",
|
4
|
+
"sourceRoot": "",
|
5
|
+
"sources": [
|
6
|
+
"/src/components/table/HeadCellDropDown.tsx"
|
7
|
+
],
|
8
|
+
"names": [],
|
9
|
+
"mappings": ";AAAA;;;GAGG;;;;AAEH,6DAA0B;AAC1B,uCAAsC;AAEtC,qCAAkD;AAClD,uCAAqD;AACrD,oEAAiC;AACjC,oEAAiC;AA4BjC;IAAsC,iDAA6B;IACjE,0BAAY,KAAY;QAAxB,YACE,kBAAM,KAAK,CAAC,SAQb;QANC,KAAI,CAAC,KAAK,GAAG;YACX,QAAQ,EAAE,KAAK;SAChB,CAAA;QAED,KAAI,CAAC,SAAS,GAAG,KAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;QAC3C,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;;IAC/C,CAAC;IAED,iCAAM,GAAN;QAAA,iBAoDC;QAnDQ,IAAA,QAAQ,GAAI,IAAI,CAAC,KAAK,SAAd,CAAe;QACxB,IAAA,KASF,IAAI,CAAC,KAAK,EARZ,gBAAgB,sBAAA,EAChB,MAAM,YAAA,EACN,SAAS,eAAA,EACT,cAAc,oBAAA,EACd,UAAU,gBAAA,EACV,cAAc,oBAAA,EACF,EAAE,gBAAA,EACD,EAAE,iBACH,CAAC;QAEf,OAAO,CACL,wCACE,SAAS,EAAE,EAAE,CACX,SAAS,EACT,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAC1B;YAED,wCAAM,OAAO,EAAE,IAAI,CAAC,SAAS,IAC1B,UAAU,IAAI,OAAO,UAAU,KAAK,UAAU;gBAC7C,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,CACxC;YAEL,QAAQ,CAAC,CAAC,CAAC,CACX,8BAAC,iBAAO,IACN,SAAS,EAAE,gBAAgB,IAAI,CAAC,cAAM,OAAA,IAAA,uBAAW,EAAC,KAAI,CAAC,EAAjB,CAAiB,CAAC,EACxD,SAAS,EAAC,6CAA6C,EACvD,MAAM,EACJ,gBAAgB,CAAC,CAAC,CAAC,cAAM,OAAA,IAAA,uBAAW,EAAC,KAAI,CAAE,CAAC,UAAU,EAA7B,CAA6B,CAAC,CAAC,CAAC,IAAI,EAE/D,IAAI;gBAEJ,8BAAC,iBAAO,IACN,WAAW,EAAE,EAAE,EACf,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAC7B,OAAO,UAEN,cAAc,IAAI,OAAO,cAAc,KAAK,UAAU;oBACrD,CAAC,CAAC,cAAc,iDAAK,IAAI,CAAC,KAAK,KAAE,OAAO,EAAE,UAAC,OAAsB;4BAC/D,IAAI,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,aAAa,KAAK,KAAK,CAAC,EAAE;gCACjD,KAAI,CAAC,UAAU,EAAE,CAAC;6BACnB;wBACH,CAAC,IAAE,CAAC,CAAC,CAAC,CAAC,cAAc,IAAI,IAAI,CAAC,CACxB,CACF,CAAC;gBACX,CAAC,CAAC,IAAI,CAEH,CACR,CAAC;IACJ,CAAC;IAED,oCAAS,GAAT;QACE,IAAI,CAAC,QAAQ,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;IAClC,CAAC;IAED,qCAAU,GAAV;QACE,IAAI,CAAC,QAAQ,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAC;IACnC,CAAC;IACH,uBAAC;AAAD,CAAC,AAzED,CAAsC,eAAK,CAAC,SAAS,GAyEpD;AAzEY,4CAAgB;AA2E7B,kBAAe,IAAA,iBAAS,EAAC,IAAA,mBAAU,EAAC,gBAAgB,CAAC,CAAC,CAAC",
|
10
|
+
"sourcesContent": [
|
11
|
+
"/**\n * @file table/HeadCellDropDown\n * @author fex\n */\n\nimport React from 'react';\nimport {findDOMNode} from 'react-dom';\n\nimport {themeable, ThemeProps} from '../../theme';\nimport {LocaleProps, localeable} from '../../locale';\nimport Overlay from '../Overlay';\nimport PopOver from '../PopOver';\n\nexport interface FilterPayload {\n closeDropdown?: boolean;\n}\n\nexport interface FilterDropdownProps {\n setSelectedKeys?: (keys: Array<string | number> | string) => void,\n selectedKeys?: Array<string | number> | string,\n confirm: (payload: FilterPayload) => void,\n clearFilters?: () => void\n}\n\nexport interface Props extends ThemeProps, LocaleProps {\n filterIcon: Function | React.ReactNode; // 图标方法 返回ReactNode\n className: string; // 图标样式\n layerClassName: string; // 展开层样式\n active: boolean; // 图标是否高亮\n popOverContainer?: () => Element | Text | null;\n filterDropdown: (payload: FilterDropdownProps) => JSX.Element | null ; // 菜单内容\n selectedKeys?: Array<string | number> | string;\n setSelectedKeys?: (keys: Array<string | number> | string) => void;\n}\n\nexport interface State {\n isOpened: boolean;\n}\n\nexport class HeadCellDropDown extends React.Component<Props, State> {\n constructor(props: Props) {\n super(props);\n\n this.state = {\n isOpened: false\n }\n\n this.openLayer = this.openLayer.bind(this);\n this.closeLayer = this.closeLayer.bind(this);\n }\n\n render() {\n const {isOpened} = this.state;\n const {\n popOverContainer,\n active,\n className,\n layerClassName,\n filterIcon,\n filterDropdown,\n classnames: cx,\n classPrefix: ns\n } = this.props;\n\n return (\n <span\n className={cx(\n className,\n active ? 'is-active' : ''\n )}\n >\n <span onClick={this.openLayer}>\n {filterIcon && typeof filterIcon === 'function'\n ? filterIcon(active) : (filterIcon || null)}\n </span>\n {\n isOpened ? (\n <Overlay\n container={popOverContainer || (() => findDOMNode(this))}\n placement=\"left-bottom-left-top right-bottom-right-top\"\n target={\n popOverContainer ? () => findDOMNode(this)!.parentNode : null\n }\n show\n >\n <PopOver\n classPrefix={ns}\n onHide={this.closeLayer}\n className={cx(layerClassName)}\n overlay\n >\n {filterDropdown && typeof filterDropdown === 'function'\n ? filterDropdown({...this.props, confirm: (payload: FilterPayload) => {\n if (!(payload && payload.closeDropdown === false)) {\n this.closeLayer();\n }\n }}) : (filterDropdown || null)}\n </PopOver>\n </Overlay>)\n : null\n }\n </span>\n );\n }\n\n openLayer() {\n this.setState({isOpened: true});\n }\n\n closeLayer() {\n this.setState({isOpened: false});\n }\n}\n\nexport default themeable(localeable(HeadCellDropDown));"
|
12
|
+
]
|
13
|
+
}
|