@kdcloudjs/kdesign 1.6.32 → 1.6.33
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/CHANGELOG.md +15 -0
- package/dist/kdesign.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +468 -194
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/date-picker/date-picker.js +2 -5
- package/es/table/feature/colGroupExtendable.d.ts +4 -0
- package/es/table/feature/colGroupExtendable.js +9 -0
- package/es/table/interface.d.ts +2 -1
- package/es/table/table.js +5 -1
- package/lib/date-picker/date-picker.js +2 -6
- package/lib/table/feature/colGroupExtendable.d.ts +4 -0
- package/lib/table/feature/colGroupExtendable.js +17 -0
- package/lib/table/interface.d.ts +2 -1
- package/lib/table/table.js +6 -1
- package/package.json +1 -1
|
@@ -85,7 +85,6 @@ var InternalDatePicker = function InternalDatePicker(props, ref) {
|
|
|
85
85
|
onClick = datePickerProps.onClick,
|
|
86
86
|
_onOk = datePickerProps.onOk; // ref
|
|
87
87
|
|
|
88
|
-
var panelDivRef = React.useRef(null);
|
|
89
88
|
var inputDivRefDefault = React.useRef(null);
|
|
90
89
|
var inputDivRef = ref || inputDivRefDefault;
|
|
91
90
|
var popperRefDefault = React.useRef(null);
|
|
@@ -244,9 +243,7 @@ var InternalDatePicker = function InternalDatePicker(props, ref) {
|
|
|
244
243
|
if (!openValue) {
|
|
245
244
|
setSelectedValue(dateValue);
|
|
246
245
|
|
|
247
|
-
if (valueText
|
|
248
|
-
triggerTextChange('');
|
|
249
|
-
} else if (valueText !== text) {
|
|
246
|
+
if (valueText !== text) {
|
|
250
247
|
resetText();
|
|
251
248
|
}
|
|
252
249
|
} else {
|
|
@@ -399,7 +396,7 @@ var InternalDatePicker = function InternalDatePicker(props, ref) {
|
|
|
399
396
|
|
|
400
397
|
var inputProps = {
|
|
401
398
|
inputRef: inputRef,
|
|
402
|
-
panelDivRef:
|
|
399
|
+
panelDivRef: popperRef,
|
|
403
400
|
id: id,
|
|
404
401
|
autoFocus: autoFocus,
|
|
405
402
|
allowClear: allowClear,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { colGroupExtendOption } from '@kdcloudjs/table/es/table/pipeline/features';
|
|
2
|
+
import { TablePipeline } from '../interface';
|
|
3
|
+
declare function colGroupExtendable(pipeline: TablePipeline, columnGroupExtend: colGroupExtendOption): void;
|
|
4
|
+
export default colGroupExtendable;
|
package/es/table/interface.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TableProps as BaseTableProps, TablePipeline as TP, ArtColumnStaticPart } from '@kdcloudjs/table';
|
|
3
|
-
import { SortFeatureOptions, RowDetailFeatureOptions, FilterFeatureOptions, TreeModeFeatureOptions, ColumnDragOptions, ColumnResizeOptions, ContextMenuFeatureOptions, RangeSelectionFeatureOptions } from '@kdcloudjs/table/es/table/pipeline/features';
|
|
3
|
+
import { SortFeatureOptions, RowDetailFeatureOptions, FilterFeatureOptions, TreeModeFeatureOptions, ColumnDragOptions, ColumnResizeOptions, ContextMenuFeatureOptions, RangeSelectionFeatureOptions, colGroupExtendOption } from '@kdcloudjs/table/es/table/pipeline/features';
|
|
4
4
|
declare type TablePropsOfComponents = Pick<BaseTableProps, 'components'> & {
|
|
5
5
|
components?: {
|
|
6
6
|
/** 复选框 */
|
|
@@ -31,6 +31,7 @@ export interface TableProps extends TablePropsOfExtend, TablePropsOfComponents {
|
|
|
31
31
|
columnResize?: boolean | ColumnResizeOptions;
|
|
32
32
|
contextMenu?: IContextMenu;
|
|
33
33
|
rangeSelection?: TableRangeSelection;
|
|
34
|
+
columnGroupExtend?: colGroupExtendOption;
|
|
34
35
|
}
|
|
35
36
|
export declare type RowSelectionType = 'checkbox' | 'radio';
|
|
36
37
|
export declare type RowSelectionFixed = 'start' | 'end';
|
package/es/table/table.js
CHANGED
|
@@ -21,6 +21,7 @@ import useRangeSelection from './feature/useRangeSelection';
|
|
|
21
21
|
import useMergeCellHover from './feature/mergeCellHover';
|
|
22
22
|
import devWarning from '../_utils/devwarning';
|
|
23
23
|
import useFooterDataSource from './feature/useFooterDataSource';
|
|
24
|
+
import usecolGroupExtendable from './feature/colGroupExtendable';
|
|
24
25
|
var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
25
26
|
var columns = props.columns,
|
|
26
27
|
dataSource = props.dataSource,
|
|
@@ -52,7 +53,9 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
52
53
|
cssVariables = props.cssVariables,
|
|
53
54
|
stickyScrollHeight = props.stickyScrollHeight,
|
|
54
55
|
scrollbarWidth = props.scrollbarWidth,
|
|
55
|
-
scrollLoad = props.scrollLoad
|
|
56
|
+
scrollLoad = props.scrollLoad,
|
|
57
|
+
_props$columnGroupExt = props.columnGroupExtend,
|
|
58
|
+
columnGroupExtend = _props$columnGroupExt === void 0 ? {} : _props$columnGroupExt;
|
|
56
59
|
|
|
57
60
|
var _useContext = useContext(ConfigContext),
|
|
58
61
|
getPrefixCls = _useContext.getPrefixCls,
|
|
@@ -106,6 +109,7 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
106
109
|
useRangeSelection(pipeline, rangeSelection);
|
|
107
110
|
useMergeCellHover(pipeline);
|
|
108
111
|
useFooterDataSource(pipeline, footerDataSource);
|
|
112
|
+
usecolGroupExtendable(pipeline, columnGroupExtend);
|
|
109
113
|
/* -------------------------------------------------------------------------- */
|
|
110
114
|
|
|
111
115
|
/* after useTablePipeline, merge pipeline.getProps result */
|
|
@@ -122,8 +122,6 @@ var InternalDatePicker = function InternalDatePicker(props, ref) {
|
|
|
122
122
|
onClick = datePickerProps.onClick,
|
|
123
123
|
_onOk = datePickerProps.onOk; // ref
|
|
124
124
|
|
|
125
|
-
var panelDivRef = _react.default.useRef(null);
|
|
126
|
-
|
|
127
125
|
var inputDivRefDefault = _react.default.useRef(null);
|
|
128
126
|
|
|
129
127
|
var inputDivRef = ref || inputDivRefDefault;
|
|
@@ -285,9 +283,7 @@ var InternalDatePicker = function InternalDatePicker(props, ref) {
|
|
|
285
283
|
if (!openValue) {
|
|
286
284
|
setSelectedValue(dateValue);
|
|
287
285
|
|
|
288
|
-
if (valueText
|
|
289
|
-
triggerTextChange('');
|
|
290
|
-
} else if (valueText !== text) {
|
|
286
|
+
if (valueText !== text) {
|
|
291
287
|
resetText();
|
|
292
288
|
}
|
|
293
289
|
} else {
|
|
@@ -439,7 +435,7 @@ var InternalDatePicker = function InternalDatePicker(props, ref) {
|
|
|
439
435
|
|
|
440
436
|
var inputProps = {
|
|
441
437
|
inputRef: inputRef,
|
|
442
|
-
panelDivRef:
|
|
438
|
+
panelDivRef: popperRef,
|
|
443
439
|
id: id,
|
|
444
440
|
autoFocus: autoFocus,
|
|
445
441
|
allowClear: allowClear,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { colGroupExtendOption } from '@kdcloudjs/table/es/table/pipeline/features';
|
|
2
|
+
import { TablePipeline } from '../interface';
|
|
3
|
+
declare function colGroupExtendable(pipeline: TablePipeline, columnGroupExtend: colGroupExtendOption): void;
|
|
4
|
+
export default colGroupExtendable;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _table = require("@kdcloudjs/table");
|
|
9
|
+
|
|
10
|
+
function colGroupExtendable(pipeline, columnGroupExtend) {
|
|
11
|
+
if (columnGroupExtend) {
|
|
12
|
+
pipeline.use(_table.features.colGroupExtendable(columnGroupExtend));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var _default = colGroupExtendable;
|
|
17
|
+
exports.default = _default;
|
package/lib/table/interface.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TableProps as BaseTableProps, TablePipeline as TP, ArtColumnStaticPart } from '@kdcloudjs/table';
|
|
3
|
-
import { SortFeatureOptions, RowDetailFeatureOptions, FilterFeatureOptions, TreeModeFeatureOptions, ColumnDragOptions, ColumnResizeOptions, ContextMenuFeatureOptions, RangeSelectionFeatureOptions } from '@kdcloudjs/table/es/table/pipeline/features';
|
|
3
|
+
import { SortFeatureOptions, RowDetailFeatureOptions, FilterFeatureOptions, TreeModeFeatureOptions, ColumnDragOptions, ColumnResizeOptions, ContextMenuFeatureOptions, RangeSelectionFeatureOptions, colGroupExtendOption } from '@kdcloudjs/table/es/table/pipeline/features';
|
|
4
4
|
declare type TablePropsOfComponents = Pick<BaseTableProps, 'components'> & {
|
|
5
5
|
components?: {
|
|
6
6
|
/** 复选框 */
|
|
@@ -31,6 +31,7 @@ export interface TableProps extends TablePropsOfExtend, TablePropsOfComponents {
|
|
|
31
31
|
columnResize?: boolean | ColumnResizeOptions;
|
|
32
32
|
contextMenu?: IContextMenu;
|
|
33
33
|
rangeSelection?: TableRangeSelection;
|
|
34
|
+
columnGroupExtend?: colGroupExtendOption;
|
|
34
35
|
}
|
|
35
36
|
export declare type RowSelectionType = 'checkbox' | 'radio';
|
|
36
37
|
export declare type RowSelectionFixed = 'start' | 'end';
|
package/lib/table/table.js
CHANGED
|
@@ -59,6 +59,8 @@ var _devwarning = _interopRequireDefault(require("../_utils/devwarning"));
|
|
|
59
59
|
|
|
60
60
|
var _useFooterDataSource = _interopRequireDefault(require("./feature/useFooterDataSource"));
|
|
61
61
|
|
|
62
|
+
var _colGroupExtendable = _interopRequireDefault(require("./feature/colGroupExtendable"));
|
|
63
|
+
|
|
62
64
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
63
65
|
|
|
64
66
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -94,7 +96,9 @@ var Table = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
94
96
|
cssVariables = props.cssVariables,
|
|
95
97
|
stickyScrollHeight = props.stickyScrollHeight,
|
|
96
98
|
scrollbarWidth = props.scrollbarWidth,
|
|
97
|
-
scrollLoad = props.scrollLoad
|
|
99
|
+
scrollLoad = props.scrollLoad,
|
|
100
|
+
_props$columnGroupExt = props.columnGroupExtend,
|
|
101
|
+
columnGroupExtend = _props$columnGroupExt === void 0 ? {} : _props$columnGroupExt;
|
|
98
102
|
|
|
99
103
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
100
104
|
getPrefixCls = _useContext.getPrefixCls,
|
|
@@ -148,6 +152,7 @@ var Table = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
148
152
|
(0, _useRangeSelection.default)(pipeline, rangeSelection);
|
|
149
153
|
(0, _mergeCellHover.default)(pipeline);
|
|
150
154
|
(0, _useFooterDataSource.default)(pipeline, footerDataSource);
|
|
155
|
+
(0, _colGroupExtendable.default)(pipeline, columnGroupExtend);
|
|
151
156
|
/* -------------------------------------------------------------------------- */
|
|
152
157
|
|
|
153
158
|
/* after useTablePipeline, merge pipeline.getProps result */
|