@lemon-fe/kits 1.0.0-170 → 1.0.0-171

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.
@@ -50,7 +50,7 @@ export default class DataGrid<TData extends Record<string, any>> extends Compone
50
50
  Text: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").TextEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
51
51
  Date: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").DateEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
52
52
  Number: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").NumberEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
53
- Select: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "mode" | "allowClear" | "options" | "virtual" | "showSearch" | "listHeight"> & {
53
+ Select: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "allowClear" | "mode" | "options" | "virtual" | "showSearch" | "listHeight"> & {
54
54
  fieldNames?: {
55
55
  label: string;
56
56
  value: string;
@@ -104,6 +104,7 @@ var defaultColDef = {
104
104
  };
105
105
  var defaultComponents = {
106
106
  agColumnHeader: HeaderRenderer,
107
+ agColumnGroupHeader: HeaderRenderer,
107
108
  'text-editor': TextEditor,
108
109
  'number-editor': NumberEditor,
109
110
  'date-editor': DateEditor,
@@ -803,7 +804,12 @@ var DataGrid = /*#__PURE__*/function (_Component) {
803
804
  children: map(children)
804
805
  };
805
806
 
806
- if (title !== undefined) {
807
+ if (_typeof(title) === 'object' || typeof title === 'function') {
808
+ opts.headerGroupComponentParams = _objectSpread(_objectSpread({}, opts.headerGroupComponentParams), {}, {
809
+ title: title
810
+ });
811
+ opts.headerGroupComponent = HeaderRenderer;
812
+ } else if (title !== undefined) {
807
813
  opts.headerName = title.toString();
808
814
  }
809
815
 
@@ -50,7 +50,7 @@ export interface ColType<TData> extends Omit<ColDef<TData>, 'editable'> {
50
50
  };
51
51
  }
52
52
  export interface ColGroupType<T> extends Omit<ColGroupDef<T>, 'children'> {
53
- title?: string | number;
53
+ title?: ReactNode | ((params: IHeaderParams) => ReactNode);
54
54
  children: ColsType<T>;
55
55
  key?: string;
56
56
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  interface Props {
3
3
  shape?: 'default' | 'order' | 'text';
4
- type?: 'default' | 'success' | 'warning' | 'error' | 'disabled';
4
+ type?: 'default' | 'success' | 'warning' | 'error' | 'disabled' | 'processing';
5
5
  children?: string;
6
6
  }
7
7
  export default function State(props: Props): JSX.Element;
@@ -1,6 +1,7 @@
1
1
  @color-success: #2ca471;
2
2
  @color-warning: #e37319;
3
3
  @color-error: #d54a42;
4
+ @color-processing: #16c0ff;
4
5
  @color-disabled: rgba(51, 51, 51, 0.5);
5
6
 
6
7
  .@{prefixCls}-state {
@@ -74,6 +75,10 @@
74
75
  .defaultShapeColor(@color-success);
75
76
  }
76
77
 
78
+ &-type-processing&-shape-default {
79
+ .defaultShapeColor(@color-processing);
80
+ }
81
+
77
82
  &-type-warning&-shape-default {
78
83
  .defaultShapeColor(@color-warning);
79
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.0.0-170",
3
+ "version": "1.0.0-171",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",