@ccs-ui/rc-pro 1.1.25-beta-19 → 1.1.25-beta-21
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormProps } from 'antd';
|
|
2
2
|
import { DialogFormRef } from './form';
|
|
3
3
|
import { CcsDialogModalProps } from './hook';
|
|
4
|
-
declare const DialogRequestButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "
|
|
4
|
+
declare const DialogRequestButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "onRequestBefore" | "onCancel"> & {
|
|
5
5
|
formRef: React.RefObject<DialogFormRef>;
|
|
6
6
|
formInitialValues: FormProps['initialValues'];
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
package/es/editor/index.d.ts
CHANGED
|
@@ -4,13 +4,14 @@ import './index.less';
|
|
|
4
4
|
import JavaScriptEditor from './javascript';
|
|
5
5
|
import JsonEditor from './json';
|
|
6
6
|
import SqlEditor from './sql';
|
|
7
|
-
export type EditorPropsType = ReactCodeMirrorProps & {
|
|
7
|
+
export type EditorPropsType = Omit<ReactCodeMirrorProps, 'height'> & {
|
|
8
8
|
value?: string;
|
|
9
9
|
className?: string;
|
|
10
10
|
style?: CSSProperties;
|
|
11
11
|
placeholder?: string;
|
|
12
12
|
bordered?: boolean;
|
|
13
13
|
isPreview?: boolean;
|
|
14
|
+
height?: number | string;
|
|
14
15
|
onChange?: (e: string) => void;
|
|
15
16
|
};
|
|
16
17
|
declare function Editor({}: {}): import("react/jsx-runtime").JSX.Element;
|
package/es/editor/javascript.js
CHANGED
|
@@ -41,8 +41,9 @@ export default function JavaScriptEditor(_ref) {
|
|
|
41
41
|
});
|
|
42
42
|
previewProps.className = "".concat(classNames(className, 'ccs-editor', 'ccs-editor-preview'));
|
|
43
43
|
}
|
|
44
|
+
var newHeight = typeof height === 'number' ? "".concat(height, "px") : height;
|
|
44
45
|
return /*#__PURE__*/_jsx(CodeMirror, _objectSpread(_objectSpread({
|
|
45
|
-
height:
|
|
46
|
+
height: newHeight,
|
|
46
47
|
extensions: [javascript({
|
|
47
48
|
jsx: true
|
|
48
49
|
})],
|
package/es/editor/json.js
CHANGED
|
@@ -65,9 +65,10 @@ export default function JsonEditor(_ref) {
|
|
|
65
65
|
});
|
|
66
66
|
previewProps.className = "".concat(classNames(className, 'ccs-editor', 'ccs-editor-preview'));
|
|
67
67
|
}
|
|
68
|
+
var newHeight = typeof height === 'number' ? "".concat(height, "px") : height;
|
|
68
69
|
return /*#__PURE__*/_jsx(CodeMirror, _objectSpread(_objectSpread({
|
|
69
70
|
value: value,
|
|
70
|
-
height:
|
|
71
|
+
height: newHeight,
|
|
71
72
|
placeholder: placeholder || defaultPlaceholder,
|
|
72
73
|
extensions: [json(), regexpLinter],
|
|
73
74
|
onChange: function onChange(e) {
|
package/es/editor/sql.js
CHANGED
|
@@ -41,8 +41,9 @@ export default function SqlEditor(_ref) {
|
|
|
41
41
|
});
|
|
42
42
|
previewProps.className = "".concat(classNames(className, 'ccs-editor', 'ccs-editor-preview'));
|
|
43
43
|
}
|
|
44
|
+
var newHeight = typeof height === 'number' ? "".concat(height, "px") : height;
|
|
44
45
|
return /*#__PURE__*/_jsx(CodeMirror, _objectSpread(_objectSpread({
|
|
45
|
-
height:
|
|
46
|
+
height: newHeight,
|
|
46
47
|
extensions: [sql()],
|
|
47
48
|
placeholder: placeholder,
|
|
48
49
|
theme: isDark ? 'dark' : 'light'
|
package/es/ellipsis/index.js
CHANGED
package/es/theme-dialog.js
CHANGED
|
@@ -6,6 +6,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
8
|
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); }
|
|
9
|
+
import { message, Modal } from 'antd';
|
|
9
10
|
import _debounce from 'lodash/debounce';
|
|
10
11
|
var ThemeDialog = /*#__PURE__*/function () {
|
|
11
12
|
function ThemeDialog() {
|
|
@@ -28,10 +29,12 @@ var ThemeDialog = /*#__PURE__*/function () {
|
|
|
28
29
|
}, {
|
|
29
30
|
key: "easyMessage",
|
|
30
31
|
value: function easyMessage(result, successText, failText) {
|
|
32
|
+
var _this$message;
|
|
33
|
+
var msg = (_this$message = this.message) !== null && _this$message !== void 0 ? _this$message : message;
|
|
31
34
|
if (result !== null && result !== void 0 && result.success) {
|
|
32
|
-
|
|
35
|
+
msg.success(successText || '操作成功');
|
|
33
36
|
} else {
|
|
34
|
-
|
|
37
|
+
msg.error(failText || (result === null || result === void 0 ? void 0 : result.msg) || '操作失败');
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
|
|
@@ -50,7 +53,9 @@ _defineProperty(ThemeDialog, "modal", void 0);
|
|
|
50
53
|
_defineProperty(ThemeDialog, "easyConfirm", _debounce(function () {
|
|
51
54
|
var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
52
55
|
return new Promise(function (resolve) {
|
|
53
|
-
_class
|
|
56
|
+
var _class$modal;
|
|
57
|
+
var mod = (_class$modal = _class.modal) !== null && _class$modal !== void 0 ? _class$modal : Modal;
|
|
58
|
+
mod.confirm({
|
|
54
59
|
title: '操作确认',
|
|
55
60
|
content: content,
|
|
56
61
|
okText: '确定',
|