@oceanbase/ui 0.3.1 → 0.3.3
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/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1 -1
- package/es/Boundary/Components/Code.d.ts +1 -1
- package/es/Boundary/Components/Code.js +17 -4
- package/es/Boundary/Components/Exception.d.ts +1 -1
- package/es/Boundary/Components/Exception.js +17 -7
- package/es/Boundary/Components/Function.d.ts +1 -1
- package/es/Boundary/Components/Function.js +17 -4
- package/es/Highlight/index.d.ts +1 -1
- package/es/LightFilter/index.d.ts +5 -0
- package/es/LightFilter/index.js +27 -0
- package/es/LightFilter/style/index.d.ts +9 -0
- package/es/LightFilter/style/index.js +26 -0
- package/es/ProTable/index.d.ts +5 -0
- package/es/ProTable/index.js +54 -0
- package/es/ProTable/style/index.d.ts +9 -0
- package/es/ProTable/style/index.js +10 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +2 -0
- package/lib/Boundary/Components/Code.d.ts +1 -1
- package/lib/Boundary/Components/Code.js +15 -2
- package/lib/Boundary/Components/Exception.d.ts +1 -1
- package/lib/Boundary/Components/Exception.js +37 -16
- package/lib/Boundary/Components/Function.d.ts +1 -1
- package/lib/Boundary/Components/Function.js +10 -2
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/LightFilter/index.d.ts +5 -0
- package/lib/LightFilter/index.js +45 -0
- package/lib/LightFilter/style/index.d.ts +9 -0
- package/lib/LightFilter/style/index.js +60 -0
- package/lib/ProTable/index.d.ts +5 -0
- package/lib/ProTable/index.js +80 -0
- package/lib/ProTable/style/index.d.ts +9 -0
- package/lib/ProTable/style/index.js +39 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +6 -0
- package/package.json +13 -13
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { LocaleWrapperProps } from '../../locale/LocaleWrapper';
|
|
3
3
|
import type { CodeType } from '../constant';
|
|
4
4
|
import type { BoundaryLocale } from '../IBoundary';
|
|
5
|
-
export interface IBoundaryCode extends LocaleWrapperProps {
|
|
5
|
+
export interface IBoundaryCode extends LocaleWrapperProps, React.HTMLProps<HTMLDivElement> {
|
|
6
6
|
code: CodeType;
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
children?: React.ReactNode;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["children", "onClick", "code", "imageUrl", "title", "buttonText", "locale", "className"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
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; }
|
|
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; }
|
|
1
10
|
import { Button } from '@oceanbase/design';
|
|
2
11
|
import React, { useMemo } from 'react';
|
|
3
12
|
import LocaleWrapper from "../../locale/LocaleWrapper";
|
|
4
13
|
import { CODE_PRESET } from "../constant";
|
|
5
14
|
import zhCN from "../locale/zh-CN";
|
|
15
|
+
import classNames from 'classnames';
|
|
6
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
18
|
var BoundaryCode = function BoundaryCode(props) {
|
|
@@ -12,13 +22,16 @@ var BoundaryCode = function BoundaryCode(props) {
|
|
|
12
22
|
imageUrl = props.imageUrl,
|
|
13
23
|
title = props.title,
|
|
14
24
|
buttonText = props.buttonText,
|
|
15
|
-
locale = props.locale
|
|
25
|
+
locale = props.locale,
|
|
26
|
+
className = props.className,
|
|
27
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
16
28
|
var info = useMemo(function () {
|
|
17
29
|
var data = CODE_PRESET(locale);
|
|
18
30
|
return data[code];
|
|
19
31
|
}, [code, locale]);
|
|
20
|
-
return /*#__PURE__*/_jsx("div", {
|
|
21
|
-
className:
|
|
32
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
33
|
+
className: classNames('boundary-container', 'boundary-code', "ob-boundary-".concat(code), className)
|
|
34
|
+
}, restProps), {}, {
|
|
22
35
|
children: /*#__PURE__*/_jsxs("div", {
|
|
23
36
|
className: "empty",
|
|
24
37
|
children: [/*#__PURE__*/_jsx("img", {
|
|
@@ -31,7 +44,7 @@ var BoundaryCode = function BoundaryCode(props) {
|
|
|
31
44
|
children: buttonText || info.buttonText
|
|
32
45
|
})]
|
|
33
46
|
})
|
|
34
|
-
});
|
|
47
|
+
}));
|
|
35
48
|
};
|
|
36
49
|
export var Code = LocaleWrapper({
|
|
37
50
|
componentName: 'Boundary',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LocaleWrapperProps } from '../../locale/LocaleWrapper';
|
|
3
3
|
import type { BoundaryLocale } from '../IBoundary';
|
|
4
|
-
export interface ExceptionProps extends LocaleWrapperProps {
|
|
4
|
+
export interface ExceptionProps extends LocaleWrapperProps, React.HTMLProps<HTMLDivElement> {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
7
|
imageUrl?: string;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
var _excluded = ["imageUrl", "title", "buttonText", "subscription", "isNotCompatible", "showError", "hasButton", "locale", "className"];
|
|
1
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
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
|
+
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; }
|
|
2
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -17,6 +22,7 @@ import React from 'react';
|
|
|
17
22
|
import LocaleWrapper from "../../locale/LocaleWrapper";
|
|
18
23
|
import { EXCEPTION_PRESET } from "../constant";
|
|
19
24
|
import zhCN from "../locale/zh-CN";
|
|
25
|
+
import classNames from 'classnames';
|
|
20
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
27
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
28
|
var BoundaryException = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -71,7 +77,9 @@ var BoundaryException = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
71
77
|
showError = _this$props$showError === void 0 ? false : _this$props$showError,
|
|
72
78
|
_this$props$hasButton = _this$props.hasButton,
|
|
73
79
|
hasButton = _this$props$hasButton === void 0 ? true : _this$props$hasButton,
|
|
74
|
-
locale = _this$props.locale
|
|
80
|
+
locale = _this$props.locale,
|
|
81
|
+
className = _this$props.className,
|
|
82
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
|
75
83
|
var errorInfo = EXCEPTION_PRESET(locale).ERROR_BOUNDARY;
|
|
76
84
|
var notCompatibleInfo = EXCEPTION_PRESET(locale).INCOMPATIBLE_VERSION;
|
|
77
85
|
var _this$state = this.state,
|
|
@@ -80,8 +88,9 @@ var BoundaryException = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
80
88
|
var errorDescription = info === null || info === void 0 ? void 0 : info.componentStack;
|
|
81
89
|
var errorMessage = (error || '').toString();
|
|
82
90
|
if ((_this$state2 = this.state) !== null && _this$state2 !== void 0 && _this$state2.hasError) {
|
|
83
|
-
return /*#__PURE__*/_jsx("div", {
|
|
84
|
-
className:
|
|
91
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
92
|
+
className: classNames('boundary-container', 'ob-boundary-error', className)
|
|
93
|
+
}, restProps), {}, {
|
|
85
94
|
children: /*#__PURE__*/_jsxs("div", {
|
|
86
95
|
className: "empty",
|
|
87
96
|
children: [/*#__PURE__*/_jsx("img", {
|
|
@@ -110,10 +119,11 @@ var BoundaryException = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
110
119
|
children: buttonText || errorInfo.buttonText
|
|
111
120
|
}) : '']
|
|
112
121
|
})
|
|
113
|
-
});
|
|
122
|
+
}));
|
|
114
123
|
} else if (isNotCompatible) {
|
|
115
|
-
return /*#__PURE__*/_jsx("div", {
|
|
116
|
-
className:
|
|
124
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
125
|
+
className: classNames('boundary-container', 'ob-boundary-browser-not-compatible', className)
|
|
126
|
+
}, restProps), {}, {
|
|
117
127
|
children: /*#__PURE__*/_jsxs("div", {
|
|
118
128
|
className: "empty",
|
|
119
129
|
children: [/*#__PURE__*/_jsx("img", {
|
|
@@ -124,7 +134,7 @@ var BoundaryException = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
124
134
|
children: subscription ? subscription : notCompatibleInfo.subscription
|
|
125
135
|
})]
|
|
126
136
|
})
|
|
127
|
-
});
|
|
137
|
+
}));
|
|
128
138
|
}
|
|
129
139
|
return this.props.children;
|
|
130
140
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FunctionConfigType, FunctionStateType } from '../constant';
|
|
3
|
-
export interface IBoundaryFunction {
|
|
3
|
+
export interface IBoundaryFunction extends React.HTMLProps<HTMLDivElement> {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
state: FunctionStateType;
|
|
6
6
|
config: FunctionConfigType;
|
|
@@ -1,17 +1,30 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["children", "state", "config", "onClick", "className"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
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; }
|
|
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; }
|
|
1
10
|
import { Button } from '@oceanbase/design';
|
|
2
11
|
import React, { useMemo } from 'react';
|
|
12
|
+
import classNames from 'classnames';
|
|
3
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
15
|
export var BoundaryFunction = function BoundaryFunction(props) {
|
|
6
16
|
var children = props.children,
|
|
7
17
|
state = props.state,
|
|
8
18
|
config = props.config,
|
|
9
|
-
onClick = props.onClick
|
|
19
|
+
onClick = props.onClick,
|
|
20
|
+
className = props.className,
|
|
21
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
10
22
|
var info = useMemo(function () {
|
|
11
23
|
return state ? config[state] : config[Object.keys(config)[0]];
|
|
12
24
|
}, [config, state]);
|
|
13
|
-
return /*#__PURE__*/_jsx("div", {
|
|
14
|
-
className:
|
|
25
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
26
|
+
className: classNames('boundary-container', 'ob-boundary-function', className)
|
|
27
|
+
}, restProps), {}, {
|
|
15
28
|
children: /*#__PURE__*/_jsxs("div", {
|
|
16
29
|
className: "empty",
|
|
17
30
|
children: [/*#__PURE__*/_jsx("img", {
|
|
@@ -24,5 +37,5 @@ export var BoundaryFunction = function BoundaryFunction(props) {
|
|
|
24
37
|
children: info.buttonText
|
|
25
38
|
})]
|
|
26
39
|
})
|
|
27
|
-
});
|
|
40
|
+
}));
|
|
28
41
|
};
|
package/es/Highlight/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
|
|
|
29
29
|
export declare const THEME_LIGHT = "light";
|
|
30
30
|
declare const ThemeTypes: ["dark", "light"];
|
|
31
31
|
export type ThemeType = (typeof ThemeTypes)[number];
|
|
32
|
-
declare const supportedLanguages: ("ruby" | "css" | "
|
|
32
|
+
declare const supportedLanguages: ("ruby" | "css" | "java" | "json" | "bash" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "tsx" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LightFilterProps } from '@ant-design/pro-components';
|
|
3
|
+
export type { LightFilterProps };
|
|
4
|
+
declare function LightFilter<T>({ prefixCls: customizePrefixCls, ...restProps }: LightFilterProps<T>): React.JSX.Element;
|
|
5
|
+
export default LightFilter;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["prefixCls"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
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; }
|
|
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
|
+
import React, { useContext } from 'react';
|
|
11
|
+
import { LightFilter as AntLightFilter } from '@ant-design/pro-components';
|
|
12
|
+
import { ConfigProvider } from '@oceanbase/design';
|
|
13
|
+
import useStyle from "./style";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
function LightFilter(_ref) {
|
|
16
|
+
var customizePrefixCls = _ref.prefixCls,
|
|
17
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
19
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
20
|
+
var prefixCls = getPrefixCls('pro-form-light-filter', customizePrefixCls);
|
|
21
|
+
var _useStyle = useStyle(prefixCls),
|
|
22
|
+
wrapSSR = _useStyle.wrapSSR;
|
|
23
|
+
return wrapSSR( /*#__PURE__*/_jsx(AntLightFilter, _objectSpread({
|
|
24
|
+
prefixCls: customizePrefixCls
|
|
25
|
+
}, restProps)));
|
|
26
|
+
}
|
|
27
|
+
export default LightFilter;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { LightFilterToken } from '@ant-design/pro-form/es/layouts/LightFilter/style';
|
|
3
|
+
import type { GenerateStyle } from '@oceanbase/design/es/theme';
|
|
4
|
+
export declare const genLightFilterStyle: GenerateStyle<LightFilterToken>;
|
|
5
|
+
declare const _default: (prefixCls: string) => {
|
|
6
|
+
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
|
|
7
|
+
hashId: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
|
+
export var genLightFilterStyle = function genLightFilterStyle(token) {
|
|
7
|
+
var componentCls = token.componentCls,
|
|
8
|
+
proComponentsCls = token.proComponentsCls;
|
|
9
|
+
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(proComponentsCls, "-core-field-label"), {
|
|
10
|
+
'&-active, &:hover': {
|
|
11
|
+
backgroundColor: token.controlItemBgActive
|
|
12
|
+
}
|
|
13
|
+
})), "".concat(componentCls, "-middle"), _defineProperty({}, "".concat(proComponentsCls, "-core-field-label"), {
|
|
14
|
+
paddingInline: token.paddingSM,
|
|
15
|
+
borderRadius: token.borderRadius
|
|
16
|
+
})), "".concat(componentCls).concat(componentCls, "-small"), _defineProperty({}, "".concat(proComponentsCls, "-core-field-label"), {
|
|
17
|
+
paddingInline: token.paddingXS,
|
|
18
|
+
borderRadius: token.borderRadiusSM
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
export default (function (prefixCls) {
|
|
22
|
+
var useStyle = genComponentStyleHook('LightFilter', function (token) {
|
|
23
|
+
return [genLightFilterStyle(token)];
|
|
24
|
+
});
|
|
25
|
+
return useStyle(prefixCls);
|
|
26
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["pagination", "form", "prefixCls", "className"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
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; }
|
|
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
|
+
import React, { useContext } from 'react';
|
|
11
|
+
import { ProTable as AntProTable } from '@ant-design/pro-components';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import { ConfigProvider, Table } from '@oceanbase/design';
|
|
14
|
+
import useLightFilterStyle from "../LightFilter/style";
|
|
15
|
+
import useStyle from "./style";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
var ProTable = function ProTable(_ref) {
|
|
18
|
+
var customPagination = _ref.pagination,
|
|
19
|
+
form = _ref.form,
|
|
20
|
+
customizePrefixCls = _ref.prefixCls,
|
|
21
|
+
className = _ref.className,
|
|
22
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
24
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
25
|
+
|
|
26
|
+
// customize Table style
|
|
27
|
+
var tablePrefixCls = getPrefixCls('table', customizePrefixCls);
|
|
28
|
+
var _Table$useStyle = Table.useStyle(tablePrefixCls),
|
|
29
|
+
tableWrapSSR = _Table$useStyle.wrapSSR;
|
|
30
|
+
var pagination = Table.useDefaultPagination(customPagination);
|
|
31
|
+
|
|
32
|
+
// customize LightFilter style
|
|
33
|
+
var lightFilterPrefixCls = getPrefixCls('pro-form-light-filter', customizePrefixCls);
|
|
34
|
+
var _useLightFilterStyle = useLightFilterStyle(lightFilterPrefixCls),
|
|
35
|
+
lightFilterWrapSSR = _useLightFilterStyle.wrapSSR;
|
|
36
|
+
var prefixCls = getPrefixCls('pro-table', customizePrefixCls);
|
|
37
|
+
var _useStyle = useStyle(prefixCls),
|
|
38
|
+
wrapSSR = _useStyle.wrapSSR;
|
|
39
|
+
var proTableCls = classNames(className);
|
|
40
|
+
return tableWrapSSR(lightFilterWrapSSR(wrapSSR( /*#__PURE__*/_jsx(AntProTable
|
|
41
|
+
// default size change to `large`
|
|
42
|
+
, _objectSpread({
|
|
43
|
+
defaultSize: "large",
|
|
44
|
+
pagination: pagination,
|
|
45
|
+
form: _objectSpread({
|
|
46
|
+
// query form should remove required mark
|
|
47
|
+
requiredMark: false
|
|
48
|
+
}, form),
|
|
49
|
+
prefixCls: customizePrefixCls,
|
|
50
|
+
className: proTableCls
|
|
51
|
+
}, restProps)))));
|
|
52
|
+
};
|
|
53
|
+
ProTable.Summary = AntProTable.Summary;
|
|
54
|
+
export default ProTable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { GenerateStyle } from '@oceanbase/design/es/theme';
|
|
3
|
+
import type { OBToken } from '../../_util/genComponentStyleHook';
|
|
4
|
+
export declare const genProTableStyle: GenerateStyle<OBToken>;
|
|
5
|
+
declare const _default: (prefixCls: string) => {
|
|
6
|
+
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
|
|
7
|
+
hashId: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
2
|
+
export var genProTableStyle = function genProTableStyle(token) {
|
|
3
|
+
return {};
|
|
4
|
+
};
|
|
5
|
+
export default (function (prefixCls) {
|
|
6
|
+
var useStyle = genComponentStyleHook('ProTable', function (token) {
|
|
7
|
+
return [genProTableStyle(token)];
|
|
8
|
+
});
|
|
9
|
+
return useStyle(prefixCls);
|
|
10
|
+
});
|
package/es/index.d.ts
CHANGED
|
@@ -38,6 +38,10 @@ export { default as PageLoading } from './PageLoading';
|
|
|
38
38
|
export type { PageLoadingProps } from './PageLoading';
|
|
39
39
|
export { default as FooterToolbar } from './FooterToolbar';
|
|
40
40
|
export type { FooterToolbarProps } from './FooterToolbar';
|
|
41
|
+
export { default as ProTable } from './ProTable';
|
|
42
|
+
export type { ProTableProps } from './ProTable';
|
|
43
|
+
export { default as LightFilter } from './LightFilter';
|
|
44
|
+
export type { LightFilterProps } from './LightFilter';
|
|
41
45
|
export { default as Password } from './Password';
|
|
42
46
|
export type { PasswordProps } from './Password';
|
|
43
47
|
export { default as Ranger } from './Ranger';
|
package/es/index.js
CHANGED
|
@@ -21,6 +21,8 @@ export { default as NavMenu } from "./NavMenu";
|
|
|
21
21
|
export { default as PageContainer } from "./PageContainer";
|
|
22
22
|
export { default as PageLoading } from "./PageLoading";
|
|
23
23
|
export { default as FooterToolbar } from "./FooterToolbar";
|
|
24
|
+
export { default as ProTable } from "./ProTable";
|
|
25
|
+
export { default as LightFilter } from "./LightFilter";
|
|
24
26
|
export { default as Password } from "./Password";
|
|
25
27
|
export { default as Ranger } from "./Ranger";
|
|
26
28
|
export { default as SideTip } from "./SideTip";
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { LocaleWrapperProps } from '../../locale/LocaleWrapper';
|
|
3
3
|
import type { CodeType } from '../constant';
|
|
4
4
|
import type { BoundaryLocale } from '../IBoundary';
|
|
5
|
-
export interface IBoundaryCode extends LocaleWrapperProps {
|
|
5
|
+
export interface IBoundaryCode extends LocaleWrapperProps, React.HTMLProps<HTMLDivElement> {
|
|
6
6
|
code: CodeType;
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
children?: React.ReactNode;
|
|
@@ -37,13 +37,26 @@ var import_react = __toESM(require("react"));
|
|
|
37
37
|
var import_LocaleWrapper = __toESM(require("../../locale/LocaleWrapper"));
|
|
38
38
|
var import_constant = require("../constant");
|
|
39
39
|
var import_zh_CN = __toESM(require("../locale/zh-CN"));
|
|
40
|
+
var import_classnames = __toESM(require("classnames"));
|
|
40
41
|
var BoundaryCode = (props) => {
|
|
41
|
-
const { children, onClick, code, imageUrl, title, buttonText, locale } = props;
|
|
42
|
+
const { children, onClick, code, imageUrl, title, buttonText, locale, className, ...restProps } = props;
|
|
42
43
|
const info = (0, import_react.useMemo)(() => {
|
|
43
44
|
const data = (0, import_constant.CODE_PRESET)(locale);
|
|
44
45
|
return data[code];
|
|
45
46
|
}, [code, locale]);
|
|
46
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
47
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: (0, import_classnames.default)(
|
|
51
|
+
"boundary-container",
|
|
52
|
+
"boundary-code",
|
|
53
|
+
`ob-boundary-${code}`,
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...restProps
|
|
57
|
+
},
|
|
58
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: imageUrl || info.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, title || info.title), children, /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "primary", onClick: onClick || info.onClick }, buttonText || info.buttonText))
|
|
59
|
+
);
|
|
47
60
|
};
|
|
48
61
|
var Code = (0, import_LocaleWrapper.default)({
|
|
49
62
|
componentName: "Boundary",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LocaleWrapperProps } from '../../locale/LocaleWrapper';
|
|
3
3
|
import type { BoundaryLocale } from '../IBoundary';
|
|
4
|
-
export interface ExceptionProps extends LocaleWrapperProps {
|
|
4
|
+
export interface ExceptionProps extends LocaleWrapperProps, React.HTMLProps<HTMLDivElement> {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
7
|
imageUrl?: string;
|
|
@@ -37,6 +37,7 @@ var import_react = __toESM(require("react"));
|
|
|
37
37
|
var import_LocaleWrapper = __toESM(require("../../locale/LocaleWrapper"));
|
|
38
38
|
var import_constant = require("../constant");
|
|
39
39
|
var import_zh_CN = __toESM(require("../locale/zh-CN"));
|
|
40
|
+
var import_classnames = __toESM(require("classnames"));
|
|
40
41
|
var BoundaryException = class extends import_react.default.PureComponent {
|
|
41
42
|
constructor() {
|
|
42
43
|
super(...arguments);
|
|
@@ -74,7 +75,9 @@ var BoundaryException = class extends import_react.default.PureComponent {
|
|
|
74
75
|
isNotCompatible,
|
|
75
76
|
showError = false,
|
|
76
77
|
hasButton = true,
|
|
77
|
-
locale
|
|
78
|
+
locale,
|
|
79
|
+
className,
|
|
80
|
+
...restProps
|
|
78
81
|
} = this.props;
|
|
79
82
|
const errorInfo = (0, import_constant.EXCEPTION_PRESET)(locale).ERROR_BOUNDARY;
|
|
80
83
|
const notCompatibleInfo = (0, import_constant.EXCEPTION_PRESET)(locale).INCOMPATIBLE_VERSION;
|
|
@@ -82,24 +85,42 @@ var BoundaryException = class extends import_react.default.PureComponent {
|
|
|
82
85
|
const errorDescription = info == null ? void 0 : info.componentStack;
|
|
83
86
|
const errorMessage = (error || "").toString();
|
|
84
87
|
if ((_a = this.state) == null ? void 0 : _a.hasError) {
|
|
85
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
86
|
-
|
|
88
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
89
|
+
"div",
|
|
87
90
|
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
className: (0, import_classnames.default)("boundary-container", "ob-boundary-error", className),
|
|
92
|
+
...restProps
|
|
93
|
+
},
|
|
94
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: imageUrl || errorInfo.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, title || errorInfo.title), showError ? /* @__PURE__ */ import_react.default.createElement(
|
|
95
|
+
import_design.Alert,
|
|
96
|
+
{
|
|
97
|
+
type: "error",
|
|
98
|
+
showIcon: true,
|
|
99
|
+
message: errorMessage,
|
|
100
|
+
description: errorDescription,
|
|
101
|
+
style: {
|
|
102
|
+
marginTop: 24,
|
|
103
|
+
overflow: "auto",
|
|
104
|
+
maxHeight: "50vh",
|
|
105
|
+
// 为了避免被 Empty 的水平居中样式影响,需要设置 textAlign
|
|
106
|
+
textAlign: "left"
|
|
107
|
+
}
|
|
98
108
|
}
|
|
99
|
-
}
|
|
100
|
-
)
|
|
109
|
+
) : subscription && /* @__PURE__ */ import_react.default.createElement("span", null, subscription), hasButton ? /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "primary", onClick: () => this.onClick() }, buttonText || errorInfo.buttonText) : "")
|
|
110
|
+
);
|
|
101
111
|
} else if (isNotCompatible) {
|
|
102
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
className: (0, import_classnames.default)(
|
|
116
|
+
"boundary-container",
|
|
117
|
+
"ob-boundary-browser-not-compatible",
|
|
118
|
+
className
|
|
119
|
+
),
|
|
120
|
+
...restProps
|
|
121
|
+
},
|
|
122
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: imageUrl || notCompatibleInfo.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, title || notCompatibleInfo.title), /* @__PURE__ */ import_react.default.createElement("span", null, subscription ? subscription : notCompatibleInfo.subscription))
|
|
123
|
+
);
|
|
103
124
|
}
|
|
104
125
|
return this.props.children;
|
|
105
126
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FunctionConfigType, FunctionStateType } from '../constant';
|
|
3
|
-
export interface IBoundaryFunction {
|
|
3
|
+
export interface IBoundaryFunction extends React.HTMLProps<HTMLDivElement> {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
state: FunctionStateType;
|
|
6
6
|
config: FunctionConfigType;
|
|
@@ -34,12 +34,20 @@ __export(Function_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(Function_exports);
|
|
35
35
|
var import_design = require("@oceanbase/design");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
38
|
var BoundaryFunction = (props) => {
|
|
38
|
-
const { children, state, config, onClick } = props;
|
|
39
|
+
const { children, state, config, onClick, className, ...restProps } = props;
|
|
39
40
|
const info = (0, import_react.useMemo)(() => {
|
|
40
41
|
return state ? config[state] : config[Object.keys(config)[0]];
|
|
41
42
|
}, [config, state]);
|
|
42
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
43
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: (0, import_classnames.default)("boundary-container", "ob-boundary-function", className),
|
|
47
|
+
...restProps
|
|
48
|
+
},
|
|
49
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: info.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, info.title), children, info.buttonText && /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "primary", onClick: onClick || info.onClick }, info.buttonText))
|
|
50
|
+
);
|
|
43
51
|
};
|
|
44
52
|
// Annotate the CommonJS export names for ESM import in node:
|
|
45
53
|
0 && (module.exports = {
|
package/lib/Highlight/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
|
|
|
29
29
|
export declare const THEME_LIGHT = "light";
|
|
30
30
|
declare const ThemeTypes: ["dark", "light"];
|
|
31
31
|
export type ThemeType = (typeof ThemeTypes)[number];
|
|
32
|
-
declare const supportedLanguages: ("ruby" | "css" | "json" | "bash" | "javascript" | "typescript" | "groovy" | "
|
|
32
|
+
declare const supportedLanguages: ("ruby" | "css" | "java" | "json" | "bash" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "tsx" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LightFilterProps } from '@ant-design/pro-components';
|
|
3
|
+
export type { LightFilterProps };
|
|
4
|
+
declare function LightFilter<T>({ prefixCls: customizePrefixCls, ...restProps }: LightFilterProps<T>): React.JSX.Element;
|
|
5
|
+
export default LightFilter;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/LightFilter/index.tsx
|
|
30
|
+
var LightFilter_exports = {};
|
|
31
|
+
__export(LightFilter_exports, {
|
|
32
|
+
default: () => LightFilter_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(LightFilter_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_pro_components = require("@ant-design/pro-components");
|
|
37
|
+
var import_design = require("@oceanbase/design");
|
|
38
|
+
var import_style = __toESM(require("./style"));
|
|
39
|
+
function LightFilter({ prefixCls: customizePrefixCls, ...restProps }) {
|
|
40
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
41
|
+
const prefixCls = getPrefixCls("pro-form-light-filter", customizePrefixCls);
|
|
42
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
43
|
+
return wrapSSR(/* @__PURE__ */ import_react.default.createElement(import_pro_components.LightFilter, { prefixCls: customizePrefixCls, ...restProps }));
|
|
44
|
+
}
|
|
45
|
+
var LightFilter_default = LightFilter;
|