@lemon-fe/kits 1.0.0-138 → 1.0.0-139
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/es/components/Alert/index.d.ts +3 -0
- package/es/components/Alert/index.js +23 -0
- package/es/components/DataGrid/index.d.ts +1 -1
- package/es/components/DataGrid/index.js +4 -4
- package/es/components/DataGrid/index.less +18 -0
- package/es/components/DataGrid/renderer/CellIndexRenderer.d.ts +3 -1
- package/es/components/DataGrid/renderer/CellIndexRenderer.js +13 -6
- package/es/components/GreyPanel/index.d.ts +6 -0
- package/es/components/GreyPanel/index.js +20 -0
- package/es/components/GreyPanel/index.less +6 -0
- package/es/components/Icons/Calendar.js +12 -17
- package/es/components/Icons/Clock.d.ts +5 -0
- package/es/components/Icons/Clock.js +30 -0
- package/es/components/Icons/Search.d.ts +1 -1
- package/es/components/Icons/Search.js +7 -14
- package/es/components/Icons/index.d.ts +2 -0
- package/es/components/Icons/index.js +3 -1
- package/es/components/InputNumber/index.d.ts +8 -0
- package/es/components/InputNumber/index.js +36 -0
- package/es/components/InputNumber/index.less +44 -0
- package/es/components/Layout/index.less +1 -1
- package/es/components/SelectView/index.d.ts +5 -1
- package/es/components/SelectView/index.js +4 -2
- package/es/components/SelectView/index.less +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +3 -0
- package/es/index.less +2 -0
- package/es/init.js +18 -3
- package/es/styles/overrides.less +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var _excluded = ["icon", "type"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
+
|
|
7
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
+
|
|
9
|
+
import { Alert as AntdAlert } from 'antd';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import Icons from "../Icons";
|
|
12
|
+
export default function Alert(props) {
|
|
13
|
+
var icon = props.icon,
|
|
14
|
+
type = props.type,
|
|
15
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
16
|
+
|
|
17
|
+
return /*#__PURE__*/React.createElement(AntdAlert, _extends({}, restProps, {
|
|
18
|
+
type: type,
|
|
19
|
+
icon: icon || /*#__PURE__*/React.createElement(Icons.Tip, {
|
|
20
|
+
type: type
|
|
21
|
+
})
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
@@ -47,7 +47,7 @@ export default class DataGrid<TData extends Record<string, any>> extends Compone
|
|
|
47
47
|
Text: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").TextEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
|
|
48
48
|
Date: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").DateEditorParams & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
|
|
49
49
|
Number: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").NumberEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
|
|
50
|
-
Select: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "
|
|
50
|
+
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"> & {
|
|
51
51
|
fieldNames?: {
|
|
52
52
|
label: string;
|
|
53
53
|
value: string;
|
|
@@ -69,6 +69,7 @@ import { InfiniteRowModelModule } from '@ag-grid-community/infinite-row-model';
|
|
|
69
69
|
import { AgGridReact } from '@ag-grid-community/react';
|
|
70
70
|
import { Spin, Pagination, Empty } from 'antd';
|
|
71
71
|
import Scheme from 'async-validator';
|
|
72
|
+
import classNames from 'classnames';
|
|
72
73
|
import { get, set } from 'lodash';
|
|
73
74
|
import memoizeOne from 'memoize-one';
|
|
74
75
|
import React, { Component } from 'react';
|
|
@@ -1342,7 +1343,7 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1342
1343
|
return /*#__PURE__*/React.createElement(GridStoreContext.Provider, {
|
|
1343
1344
|
value: this.store
|
|
1344
1345
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1345
|
-
className:
|
|
1346
|
+
className: classNames('ag-theme-lemon', "".concat(prefix()), _defineProperty({}, prefix('group-rows'), restProps.groupDisplayType === 'groupRows')),
|
|
1346
1347
|
style: restProps.domLayout === 'autoHeight' ? {
|
|
1347
1348
|
height: 'auto'
|
|
1348
1349
|
} : undefined,
|
|
@@ -1359,6 +1360,7 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1359
1360
|
suppressPaginationPanel: true,
|
|
1360
1361
|
suppressCopyRowsToClipboard: true,
|
|
1361
1362
|
suppressRowClickSelection: true,
|
|
1363
|
+
enableCellEditingOnBackspace: true,
|
|
1362
1364
|
loadingOverlayComponent: this.LoadingOverlay,
|
|
1363
1365
|
noRowsOverlayComponent: this.NoRowsOverlay,
|
|
1364
1366
|
getMainMenuItems: this.getMainMenuItems,
|
|
@@ -1367,9 +1369,7 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1367
1369
|
sideBar: sideBarProp === true ? this.sideBarDef : sideBarProp,
|
|
1368
1370
|
pinnedBottomRowData: Array.isArray(summary) ? summary : summary ? [summary] : undefined,
|
|
1369
1371
|
masterDetail: detailCell !== undefined
|
|
1370
|
-
}, this.getMemoizedDetailCellParams(detailCell, detailCellRendererParams), {
|
|
1371
|
-
enableCellEditingOnBackspace: true
|
|
1372
|
-
}, restProps, {
|
|
1372
|
+
}, this.getMemoizedDetailCellParams(detailCell, detailCellRendererParams), restProps, {
|
|
1373
1373
|
getRowStyle: this.getRowStyle,
|
|
1374
1374
|
stopEditingWhenCellsLoseFocus: false,
|
|
1375
1375
|
onRowDataUpdated: this.rowDataUpdated,
|
|
@@ -60,6 +60,24 @@
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
&-group-rows {
|
|
64
|
+
.ag-row-level-1 {
|
|
65
|
+
background-color: fade(#f2f3f5, 40);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ag-row-level-2 {
|
|
69
|
+
background-color: fade(#f2f3f5, 60);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ag-row-level-3 {
|
|
73
|
+
background-color: fade(#f2f3f5, 80);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ag-row-level-4 {
|
|
77
|
+
background-color: fade(#f2f3f5, 90);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
63
81
|
&-operator {
|
|
64
82
|
position: absolute;
|
|
65
83
|
top: 4px;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import type { ICellRendererParams } from '@ag-grid-community/core';
|
|
2
|
-
export default function CellIndexRender<TData>(props: ICellRendererParams<TData>
|
|
2
|
+
export default function CellIndexRender<TData>(props: ICellRendererParams<TData> & {
|
|
3
|
+
useChildIndex?: boolean;
|
|
4
|
+
}): number | null;
|
|
@@ -13,9 +13,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import { useContext, useEffect, useState } from 'react';
|
|
14
14
|
import GridStoreContext from "../context/GridStore";
|
|
15
15
|
export default function CellIndexRender(props) {
|
|
16
|
-
var node = props.node
|
|
16
|
+
var node = props.node,
|
|
17
|
+
useChildIndex = props.useChildIndex;
|
|
18
|
+
var type = useChildIndex ? 'childIndex' : 'rowIndex';
|
|
17
19
|
|
|
18
|
-
var _useState = useState(node
|
|
20
|
+
var _useState = useState(node[type]),
|
|
19
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
22
|
index = _useState2[0],
|
|
21
23
|
setIndex = _useState2[1];
|
|
@@ -23,19 +25,24 @@ export default function CellIndexRender(props) {
|
|
|
23
25
|
var store = useContext(GridStoreContext);
|
|
24
26
|
useEffect(function () {
|
|
25
27
|
var handler = function handler(evt) {
|
|
26
|
-
setIndex(evt.node
|
|
28
|
+
setIndex(evt.node[type]);
|
|
27
29
|
};
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
var eventType = type === 'rowIndex' ? 'rowIndexChanged' : 'childIndexChanged';
|
|
32
|
+
node.addEventListener(eventType, handler);
|
|
30
33
|
return function () {
|
|
31
|
-
node.removeEventListener(
|
|
34
|
+
node.removeEventListener(eventType, handler);
|
|
32
35
|
};
|
|
33
|
-
}, []);
|
|
36
|
+
}, [type]);
|
|
34
37
|
|
|
35
38
|
if (index === null || node.isRowPinned()) {
|
|
36
39
|
return null;
|
|
37
40
|
}
|
|
38
41
|
|
|
42
|
+
if (type === 'childIndex') {
|
|
43
|
+
return index;
|
|
44
|
+
}
|
|
45
|
+
|
|
39
46
|
var _ref = store.getState(),
|
|
40
47
|
grid = _ref.grid;
|
|
41
48
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var _excluded = ["className"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
+
|
|
7
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
+
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { prefixClassName } from "../utils";
|
|
12
|
+
export default function GreyCard(props) {
|
|
13
|
+
var className = props.className,
|
|
14
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
15
|
+
|
|
16
|
+
var prefix = prefixClassName('grey-card');
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
18
|
+
className: classNames(prefix(), className)
|
|
19
|
+
}, restProps));
|
|
20
|
+
}
|
|
@@ -1,43 +1,38 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import Icon from '@ant-design/icons';
|
|
4
|
+
import React from 'react';
|
|
5
5
|
|
|
6
6
|
var CalendarSvg = function CalendarSvg(props) {
|
|
7
7
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
viewBox: "0 0 16 16",
|
|
11
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
viewBox: "0 0 14 14"
|
|
12
10
|
}, props), /*#__PURE__*/React.createElement("g", {
|
|
13
11
|
fill: "none",
|
|
14
12
|
fillRule: "evenodd"
|
|
15
13
|
}, /*#__PURE__*/React.createElement("path", {
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
fill: "currentColor",
|
|
15
|
+
d: "M3.75 0a.75.75 0 0 1 .75.75V3H3V.75A.75.75 0 0 1 3.75 0ZM10.25 0a.75.75 0 0 1 .75.75V3H9.5V.75a.75.75 0 0 1 .75-.75Z"
|
|
18
16
|
}), /*#__PURE__*/React.createElement("rect", {
|
|
19
|
-
stroke: "currentColor",
|
|
20
|
-
strokeWidth: "1.5",
|
|
21
|
-
x: "1.75",
|
|
22
|
-
y: "3.75",
|
|
23
17
|
width: "12.5",
|
|
24
18
|
height: "10.5",
|
|
19
|
+
x: ".75",
|
|
20
|
+
y: "2.75",
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
strokeWidth: "1.5",
|
|
25
23
|
rx: "2"
|
|
26
24
|
}), /*#__PURE__*/React.createElement("rect", {
|
|
27
|
-
fill: "currentColor",
|
|
28
|
-
x: "6",
|
|
29
|
-
y: "8",
|
|
30
25
|
width: "4",
|
|
31
26
|
height: "1.5",
|
|
27
|
+
x: "5",
|
|
28
|
+
y: "7",
|
|
29
|
+
fill: "currentColor",
|
|
32
30
|
rx: ".75"
|
|
33
31
|
})));
|
|
34
32
|
};
|
|
35
33
|
|
|
36
34
|
export default function Down(props) {
|
|
37
35
|
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
38
|
-
style: {
|
|
39
|
-
pointerEvents: 'none'
|
|
40
|
-
},
|
|
41
36
|
component: CalendarSvg
|
|
42
37
|
}, props));
|
|
43
38
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import Icon from '@ant-design/icons';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
var ClockSvg = function ClockSvg(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
viewBox: "0 0 14 14"
|
|
10
|
+
}, props), /*#__PURE__*/React.createElement("g", {
|
|
11
|
+
fill: "none",
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
strokeWidth: "1.5"
|
|
15
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
16
|
+
cx: "7",
|
|
17
|
+
cy: "7",
|
|
18
|
+
r: "6.25"
|
|
19
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
strokeLinejoin: "round",
|
|
22
|
+
d: "M10 7H7V4"
|
|
23
|
+
})));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default function Clock(props) {
|
|
27
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
28
|
+
component: ClockSvg
|
|
29
|
+
}, props));
|
|
30
|
+
}
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import Icon from '@ant-design/icons';
|
|
4
|
+
import React from 'react';
|
|
5
5
|
|
|
6
6
|
var Svg = function Svg(props) {
|
|
7
7
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
12
|
-
}, props), /*#__PURE__*/React.createElement("g", {
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
viewBox: "0 0 14 14"
|
|
10
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
13
11
|
fill: "currentColor",
|
|
14
|
-
fillRule: "
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
d: "M7.5.5a7 7 0 1 1 0 14 7 7 0 0 1 0-14Zm0 1.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z",
|
|
18
|
-
fillRule: "nonzero"
|
|
19
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
-
d: "M12.03 12.03a.75.75 0 0 1 1.061 0l1.768 1.768a.75.75 0 1 1-1.06 1.06l-1.769-1.767a.75.75 0 0 1 0-1.06Z"
|
|
21
|
-
})));
|
|
12
|
+
fillRule: "nonzero",
|
|
13
|
+
d: "M6 0a6 6 0 0 1 4.74 9.68l2.326 2.325a.75.75 0 1 1-1.06 1.06L9.68 10.74A6 6 0 1 1 6 0Zm0 1.5a4.5 4.5 0 1 0 2.76 8.055l.447-.348.348-.448a4.47 4.47 0 0 0 .938-2.506L10.5 6A4.5 4.5 0 0 0 6 1.5Z"
|
|
14
|
+
}));
|
|
22
15
|
};
|
|
23
16
|
|
|
24
17
|
export default function Search(props) {
|
|
@@ -3,6 +3,7 @@ import Add from './Add';
|
|
|
3
3
|
import BigTip from './BigTip';
|
|
4
4
|
import Calendar from './Calendar';
|
|
5
5
|
import Clear from './Clear';
|
|
6
|
+
import Clock from './Clock';
|
|
6
7
|
import Close from './Close';
|
|
7
8
|
import CloseLight from './CloseLight';
|
|
8
9
|
import CollapseUp from './CollapseUp';
|
|
@@ -31,5 +32,6 @@ declare const Icons: {
|
|
|
31
32
|
Clear: typeof Clear;
|
|
32
33
|
Question: typeof Question;
|
|
33
34
|
CloseLight: typeof CloseLight;
|
|
35
|
+
Clock: typeof Clock;
|
|
34
36
|
};
|
|
35
37
|
export default Icons;
|
|
@@ -2,6 +2,7 @@ import Add from "./Add";
|
|
|
2
2
|
import BigTip from "./BigTip";
|
|
3
3
|
import Calendar from "./Calendar";
|
|
4
4
|
import Clear from "./Clear";
|
|
5
|
+
import Clock from "./Clock";
|
|
5
6
|
import Close from "./Close";
|
|
6
7
|
import CloseLight from "./CloseLight";
|
|
7
8
|
import CollapseUp from "./CollapseUp";
|
|
@@ -30,6 +31,7 @@ var Icons = {
|
|
|
30
31
|
Add: Add,
|
|
31
32
|
Clear: Clear,
|
|
32
33
|
Question: Question,
|
|
33
|
-
CloseLight: CloseLight
|
|
34
|
+
CloseLight: CloseLight,
|
|
35
|
+
Clock: Clock
|
|
34
36
|
};
|
|
35
37
|
export default Icons;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var _excluded = ["suffix", "prefix", "className", "controls"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
|
|
11
|
+
import { InputNumber as AntdInputNumber } from 'antd';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import Icons from "../Icons";
|
|
15
|
+
import { prefixClassName } from "../utils";
|
|
16
|
+
export default function InputNumber(props) {
|
|
17
|
+
var suffix = props.suffix,
|
|
18
|
+
prefix = props.prefix,
|
|
19
|
+
className = props.className,
|
|
20
|
+
controls = props.controls,
|
|
21
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
22
|
+
|
|
23
|
+
var prefixCls = prefixClassName('input-number');
|
|
24
|
+
return /*#__PURE__*/React.createElement(AntdInputNumber, _extends({}, restProps, {
|
|
25
|
+
prefix: suffix !== null && suffix !== void 0 ? suffix : prefix,
|
|
26
|
+
className: classNames(className, _defineProperty({}, prefixCls('suffix'), !!suffix)),
|
|
27
|
+
controls: controls !== null && controls !== void 0 ? controls : {
|
|
28
|
+
downIcon: /*#__PURE__*/React.createElement(Icons.Down, null),
|
|
29
|
+
upIcon: /*#__PURE__*/React.createElement(Icons.Down, {
|
|
30
|
+
style: {
|
|
31
|
+
transform: 'rotate(180deg)'
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.@{prefixCls}-input-number {
|
|
2
|
+
&-suffix {
|
|
3
|
+
.@{ant-prefix}-input-number-affix-wrapper {
|
|
4
|
+
flex-direction: row-reverse;
|
|
5
|
+
padding-inline-end: @padding-sm;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.@{ant-prefix}-input-number-prefix {
|
|
9
|
+
color: #666;
|
|
10
|
+
margin-inline-end: 0;
|
|
11
|
+
margin-inline-start: 4px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.@{ant-prefix}-input-number-handler {
|
|
15
|
+
border-left: none;
|
|
16
|
+
|
|
17
|
+
&-wrap {
|
|
18
|
+
width: 12px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-up-inner {
|
|
22
|
+
top: unset;
|
|
23
|
+
bottom: -1px;
|
|
24
|
+
margin-top: unset;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-down-inner {
|
|
28
|
+
top: -1px;
|
|
29
|
+
transform: unset;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-down {
|
|
33
|
+
border-top: none !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-up-inner,
|
|
37
|
+
&-down-inner {
|
|
38
|
+
right: 0;
|
|
39
|
+
color: fade(#333, 70);
|
|
40
|
+
font-size: 10px !important;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { CSSProperties, ReactElement } from 'react';
|
|
2
|
-
import type { ColType, SortType } from '../DataGrid/typings';
|
|
2
|
+
import type { ColType, PaginationType, SortType } from '../DataGrid/typings';
|
|
3
3
|
import type { FilterProps } from '../Filter/typings';
|
|
4
4
|
interface Props<RecordType, ParamsType extends Record<string, any>> {
|
|
5
5
|
value?: RecordType[];
|
|
6
6
|
onChange?: (value: RecordType[], rowDoubleClicked?: boolean) => void;
|
|
7
|
+
/**
|
|
8
|
+
* @description 页脚
|
|
9
|
+
*/
|
|
10
|
+
pagination?: boolean | PaginationType;
|
|
7
11
|
/**
|
|
8
12
|
* @description 是否多选
|
|
9
13
|
* @default true
|
|
@@ -38,6 +38,8 @@ export default function SelectView(props) {
|
|
|
38
38
|
}, []);
|
|
39
39
|
var value = props.value,
|
|
40
40
|
onChange = props.onChange,
|
|
41
|
+
_props$pagination = props.pagination,
|
|
42
|
+
pagination = _props$pagination === void 0 ? true : _props$pagination,
|
|
41
43
|
columns = props.columns,
|
|
42
44
|
_props$selectedColumn = props.selectedColumns,
|
|
43
45
|
selectedColumns = _props$selectedColumn === void 0 ? columns : _props$selectedColumn,
|
|
@@ -218,7 +220,7 @@ export default function SelectView(props) {
|
|
|
218
220
|
columns: columns,
|
|
219
221
|
loading: loading,
|
|
220
222
|
fetch: request,
|
|
221
|
-
pagination:
|
|
223
|
+
pagination: pagination
|
|
222
224
|
}))));
|
|
223
225
|
};
|
|
224
226
|
|
|
@@ -234,7 +236,7 @@ export default function SelectView(props) {
|
|
|
234
236
|
onDataSourceChange: setData,
|
|
235
237
|
columns: mSelectedCols,
|
|
236
238
|
rowKey: rowKey,
|
|
237
|
-
pagination:
|
|
239
|
+
pagination: pagination,
|
|
238
240
|
context: {
|
|
239
241
|
data: data,
|
|
240
242
|
dataKeys: dataKeys
|
package/es/index.d.ts
CHANGED
|
@@ -40,6 +40,9 @@ export * from '@ag-grid-community/react';
|
|
|
40
40
|
export { default as TipMark } from './components/TipMark';
|
|
41
41
|
export { default as Portal } from './components/Portal';
|
|
42
42
|
export { default as State } from './components/State';
|
|
43
|
+
export { default as GreyPanel } from './components/GreyPanel';
|
|
44
|
+
export { default as Alert } from './components/Alert';
|
|
45
|
+
export { default as InputNumber } from './components/InputNumber';
|
|
43
46
|
export { default as BasicLayout } from './layouts/BasicLayout';
|
|
44
47
|
export { default as BlankLayout } from './layouts/BlankLayout';
|
|
45
48
|
export { default as MicroLayout } from './layouts/MicroLayout';
|
package/es/index.js
CHANGED
|
@@ -32,6 +32,9 @@ export * from '@ag-grid-community/react';
|
|
|
32
32
|
export { default as TipMark } from "./components/TipMark";
|
|
33
33
|
export { default as Portal } from "./components/Portal";
|
|
34
34
|
export { default as State } from "./components/State";
|
|
35
|
+
export { default as GreyPanel } from "./components/GreyPanel";
|
|
36
|
+
export { default as Alert } from "./components/Alert";
|
|
37
|
+
export { default as InputNumber } from "./components/InputNumber";
|
|
35
38
|
export { default as BasicLayout } from "./layouts/BasicLayout";
|
|
36
39
|
export { default as BlankLayout } from "./layouts/BlankLayout";
|
|
37
40
|
export { default as MicroLayout } from "./layouts/MicroLayout";
|
package/es/index.less
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
@import './components/SelectView/index.less';
|
|
23
23
|
@import './components/DataGrid/index.less';
|
|
24
24
|
@import './components/State/index.less';
|
|
25
|
+
@import './components/GreyPanel/index.less';
|
|
26
|
+
@import './components/InputNumber/index.less';
|
|
25
27
|
|
|
26
28
|
@import './layouts/BasicLayout/components/MainFramework/index.less';
|
|
27
29
|
@import './layouts/Breadcrumb/index.less';
|
package/es/init.js
CHANGED
|
@@ -7,7 +7,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
7
7
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
8
8
|
|
|
9
9
|
import { config } from '@lemon-fe/hooks';
|
|
10
|
-
import { message, Modal, Select, ConfigProvider, Result, Button, DatePicker, Cascader, TreeSelect, Empty, Menu } from 'antd';
|
|
10
|
+
import { message, Modal, Select, ConfigProvider, Result, Button, DatePicker, Cascader, TreeSelect, Empty, Menu, TimePicker } from 'antd';
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import Icons from "./components/Icons";
|
|
13
13
|
import PageLoading from "./components/PageLoading";
|
|
@@ -123,12 +123,27 @@ export default function init() {
|
|
|
123
123
|
clearIcon: /*#__PURE__*/React.createElement(Clear, null)
|
|
124
124
|
};
|
|
125
125
|
DatePicker.RangePicker.defaultProps = _objectSpread(_objectSpread({}, DatePicker.RangePicker.defaultProps), {}, {
|
|
126
|
-
suffixIcon: /*#__PURE__*/React.createElement(Icons.Calendar,
|
|
126
|
+
suffixIcon: /*#__PURE__*/React.createElement(Icons.Calendar, {
|
|
127
|
+
style: {
|
|
128
|
+
pointerEvents: 'none'
|
|
129
|
+
}
|
|
130
|
+
}),
|
|
127
131
|
clearIcon: /*#__PURE__*/React.createElement(Clear, null)
|
|
128
132
|
});
|
|
129
133
|
DatePicker.defaultProps = _objectSpread(_objectSpread({}, DatePicker.defaultProps), {}, {
|
|
130
|
-
suffixIcon: /*#__PURE__*/React.createElement(Icons.Calendar,
|
|
134
|
+
suffixIcon: /*#__PURE__*/React.createElement(Icons.Calendar, {
|
|
135
|
+
style: {
|
|
136
|
+
pointerEvents: 'none'
|
|
137
|
+
}
|
|
138
|
+
}),
|
|
131
139
|
clearIcon: /*#__PURE__*/React.createElement(Clear, null)
|
|
140
|
+
});
|
|
141
|
+
TimePicker.defaultProps = _objectSpread(_objectSpread({}, TimePicker.defaultProps), {}, {
|
|
142
|
+
suffixIcon: /*#__PURE__*/React.createElement(Icons.Clock, {
|
|
143
|
+
style: {
|
|
144
|
+
pointerEvents: 'none'
|
|
145
|
+
}
|
|
146
|
+
})
|
|
132
147
|
}); //@ts-ignore
|
|
133
148
|
|
|
134
149
|
Menu.defaultProps = {
|
package/es/styles/overrides.less
CHANGED
|
@@ -13,6 +13,7 @@ a[title='站长统计'] {
|
|
|
13
13
|
|
|
14
14
|
@height-base: 32px;
|
|
15
15
|
@border-color-base: #d9d9d9;
|
|
16
|
+
@border-color-split: #dcdcdc;
|
|
16
17
|
@border-radius-base: 4px;
|
|
17
18
|
@label-color: #666666;
|
|
18
19
|
|
|
@@ -180,7 +181,6 @@ a[title='站长统计'] {
|
|
|
180
181
|
|
|
181
182
|
&-suffix {
|
|
182
183
|
color: fade(#333, 70);
|
|
183
|
-
font-size: 16px;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
&&-disabled &-suffix {
|