@yuntijs/ui 1.0.0-beta.34 → 1.0.0-beta.35
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/Page/Page.d.ts +2 -1
- package/es/Page/Page.js +4 -2
- package/es/Table/index.js +7 -4
- package/package.json +3 -2
- package/umd/index.min.js +1 -1
- package/umd/index.min.js.map +1 -1
package/es/Page/Page.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { FlexProps } from 'antd/lib';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { PageContextValue } from './PageContext';
|
|
3
|
-
export interface PageProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
export interface PageProps extends React.HTMLAttributes<HTMLDivElement>, Pick<FlexProps, 'gap'> {
|
|
4
5
|
loading?: boolean;
|
|
5
6
|
status?: PageContextValue['status'];
|
|
6
7
|
Link?: PageContextValue['Link'];
|
package/es/Page/Page.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["loading", "className", "children", "Link", "status"];
|
|
4
|
+
var _excluded = ["loading", "className", "children", "Link", "status", "gap"];
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
import { Flex } from 'antd';
|
|
@@ -18,6 +18,8 @@ export var Page = function Page(props) {
|
|
|
18
18
|
_props$Link = props.Link,
|
|
19
19
|
Link = _props$Link === void 0 ? LinkFromRootConfigProvider || DefaultLink : _props$Link,
|
|
20
20
|
status = props.status,
|
|
21
|
+
_props$gap = props.gap,
|
|
22
|
+
gap = _props$gap === void 0 ? 16 : _props$gap,
|
|
21
23
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
22
24
|
var _useStyles = useStyles(otherProps),
|
|
23
25
|
styles = _useStyles.styles,
|
|
@@ -28,7 +30,7 @@ export var Page = function Page(props) {
|
|
|
28
30
|
setBreadcrumbItems = _useState2[1];
|
|
29
31
|
return /*#__PURE__*/_jsx(Flex, _objectSpread(_objectSpread({
|
|
30
32
|
className: cx(styles.root, className),
|
|
31
|
-
gap:
|
|
33
|
+
gap: gap,
|
|
32
34
|
vertical: true
|
|
33
35
|
}, otherProps), {}, {
|
|
34
36
|
children: /*#__PURE__*/_jsx(PageContext.Provider, {
|
package/es/Table/index.js
CHANGED
|
@@ -13,10 +13,8 @@ export var Table = function Table(props) {
|
|
|
13
13
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
14
14
|
var formatColumns = useMemo(function () {
|
|
15
15
|
return columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
|
|
16
|
-
if (
|
|
17
|
-
item
|
|
18
|
-
return text !== null && text !== void 0 ? text : '-';
|
|
19
|
-
};
|
|
16
|
+
if (item.render) {
|
|
17
|
+
return item;
|
|
20
18
|
}
|
|
21
19
|
if (item.ellipsis && item.ellipsis !== true && item.ellipsis.showTitle || item.ellipsis === true) {
|
|
22
20
|
var tooltipProps = item.ellipsis === true ? {} : item.ellipsis;
|
|
@@ -33,6 +31,11 @@ export var Table = function Table(props) {
|
|
|
33
31
|
}
|
|
34
32
|
});
|
|
35
33
|
}
|
|
34
|
+
if (!item.render) {
|
|
35
|
+
item.render = function (text) {
|
|
36
|
+
return text !== null && text !== void 0 ? text : '-';
|
|
37
|
+
};
|
|
38
|
+
}
|
|
36
39
|
return item;
|
|
37
40
|
});
|
|
38
41
|
}, [columns]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuntijs/ui",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.35",
|
|
4
4
|
"description": "☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yuntijs",
|
|
@@ -86,7 +86,6 @@
|
|
|
86
86
|
"@lexical/text": "^0.16.1",
|
|
87
87
|
"@lexical/utils": "^0.16.1",
|
|
88
88
|
"@lobehub/ui": "^1.146.4",
|
|
89
|
-
"dayjs": "^1.11.10",
|
|
90
89
|
"leva": "^0",
|
|
91
90
|
"lexical": "^0.16.1",
|
|
92
91
|
"lodash-es": "^4",
|
|
@@ -109,6 +108,7 @@
|
|
|
109
108
|
"antd-style": "^3.6.1",
|
|
110
109
|
"babel-plugin-antd-style": "latest",
|
|
111
110
|
"commitlint": "^18",
|
|
111
|
+
"dayjs": "^1.11.10",
|
|
112
112
|
"dumi": "^2",
|
|
113
113
|
"dumi-theme-lobehub": "^1.7.6",
|
|
114
114
|
"eslint": "^8.56.0",
|
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
"peerDependencies": {
|
|
132
132
|
"antd": ">=5",
|
|
133
133
|
"antd-style": ">=3",
|
|
134
|
+
"dayjs": ">=1",
|
|
134
135
|
"react": ">=18",
|
|
135
136
|
"react-dom": ">=18"
|
|
136
137
|
},
|