@ccs-ui/rc-pro 2.3.6-alpha-20 → 2.3.6-alpha-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.
- package/es/config.js +1 -1
- package/es/dialog/button.d.ts +1 -1
- package/es/dialog/button.js +2 -2
- package/es/select/ modal.d.ts +2 -4
- package/es/select/ modal.js +4 -7
- package/es/select/customize.d.ts +2 -4
- package/es/select/customize.js +4 -7
- package/package.json +1 -1
package/es/config.js
CHANGED
|
@@ -83,7 +83,7 @@ function AppConfig(_ref) {
|
|
|
83
83
|
return algorithms;
|
|
84
84
|
};
|
|
85
85
|
useEffect(function () {
|
|
86
|
-
var csss = [".ccs-dialog-drawer .".concat(prefixCls, "-drawer-footer{padding:0 !important;}"), ".ccs-tabs-auto-height > .".concat(prefixCls, "-tabs-content-holder,\n .ccs-tabs-auto-height > .").concat(prefixCls, "-tabs-content-holder > .").concat(prefixCls, "-tabs-content,\n .ccs-tabs-auto-height > .").concat(prefixCls, "-tabs-content-holder > .").concat(prefixCls, "-tabs-content > div,\n .ccs-tabs-auto-height> .").concat(prefixCls, "-tabs-content-holder> .").concat(prefixCls, "-tabs-content> div> .ccs-pl { height: 100%;}"), ".ccs-keep-alive-nav .".concat(prefixCls, "-tabs-tab {border: 0 !important;border-radius: 0 !important;}"), ".ccs-keep-alive-nav .".concat(prefixCls, "-tabs-tab-active {background-color: #f0f2f5 !important;}"), ".ccs-keep-alive .dark .ccs-keep-alive-nav .".concat(prefixCls, "-tabs-tab-active {background-color: #2b2c2c !important;} "), ".ccs-pl .".concat(prefixCls, "-table-title {padding: 0 !important;} ")];
|
|
86
|
+
var csss = [".".concat(prefixCls, "-drawer .").concat(prefixCls, "-drawer-extra >.").concat(prefixCls, "-btn+.").concat(prefixCls, "-btn {margin-inline-start: 8px;}"), ".ccs-dialog-drawer .".concat(prefixCls, "-drawer-footer{padding:0 !important;}"), ".ccs-tabs-auto-height > .".concat(prefixCls, "-tabs-content-holder,\n .ccs-tabs-auto-height > .").concat(prefixCls, "-tabs-content-holder > .").concat(prefixCls, "-tabs-content,\n .ccs-tabs-auto-height > .").concat(prefixCls, "-tabs-content-holder > .").concat(prefixCls, "-tabs-content > div,\n .ccs-tabs-auto-height> .").concat(prefixCls, "-tabs-content-holder> .").concat(prefixCls, "-tabs-content> div> .ccs-pl { height: 100%;}"), ".ccs-keep-alive-nav .".concat(prefixCls, "-tabs-tab {border: 0 !important;border-radius: 0 !important;}"), ".ccs-keep-alive-nav .".concat(prefixCls, "-tabs-tab-active {background-color: #f0f2f5 !important;}"), ".ccs-keep-alive .dark .ccs-keep-alive-nav .".concat(prefixCls, "-tabs-tab-active {background-color: #2b2c2c !important;} "), ".ccs-pl .".concat(prefixCls, "-table-title {padding: 0 !important;} ")];
|
|
87
87
|
insertCss(csss.join(''));
|
|
88
88
|
}, []);
|
|
89
89
|
|
package/es/dialog/button.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type DialogButtonsProps<T> = Pick<CcsDialogModalProps, 'okText' | 'onClos
|
|
|
16
16
|
export type DialogButtonRef = {
|
|
17
17
|
onSetButtons: (e: React.ReactElement) => void;
|
|
18
18
|
};
|
|
19
|
-
export declare const DialogButtonHolder: <TParams, TData>({ auth, extraBtn, formRef, request, onOk, onClose, buttonRef, requestFieldNames, formInitialValues, preventRequestHandle, }: Pick<CcsDialogModalProps<TParams, TData>, "
|
|
19
|
+
export declare const DialogButtonHolder: <TParams, TData>({ auth, extraBtn, formRef, request, onOk, onClose, buttonRef, requestFieldNames, formInitialValues, preventRequestHandle, }: Pick<CcsDialogModalProps<TParams, TData>, "onClose" | "auth" | "request" | "onOk" | "extraBtn" | "requestFieldNames" | "preventRequestHandle"> & {
|
|
20
20
|
formRef: React.RefObject<DialogFormRef<TParams>>;
|
|
21
21
|
formInitialValues: FormProps['initialValues'];
|
|
22
22
|
buttonRef: RefObject<DialogButtonRef>;
|
package/es/dialog/button.js
CHANGED
|
@@ -14,7 +14,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
14
14
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import { CcsButton } from "./..";
|
|
17
|
-
import { Button, Form
|
|
17
|
+
import { Button, Form } from 'antd';
|
|
18
18
|
import React, { useEffect, useImperativeHandle, useState } from 'react';
|
|
19
19
|
import CcsDialog from '.';
|
|
20
20
|
import { useDialogFields } from "../hooks/use-app";
|
|
@@ -231,7 +231,7 @@ export default function CcsDialogButtons(_ref3) {
|
|
|
231
231
|
useEffect(function () {
|
|
232
232
|
var _buttonRef$current;
|
|
233
233
|
if (!onOk && !children) return;
|
|
234
|
-
var btns = /*#__PURE__*/_jsxs(
|
|
234
|
+
var btns = /*#__PURE__*/_jsxs(_Fragment, {
|
|
235
235
|
children: [children, onOk && /*#__PURE__*/_jsxs(_Fragment, {
|
|
236
236
|
children: [!hideCancel && /*#__PURE__*/_jsx(Button, {
|
|
237
237
|
onClick: closeDialog,
|
package/es/select/ modal.d.ts
CHANGED
|
@@ -2,11 +2,9 @@ import { ModalProps, SelectProps } from 'antd';
|
|
|
2
2
|
import { ReactElement, ReactNode } from 'react';
|
|
3
3
|
import { SelectChildrenProps } from './customize';
|
|
4
4
|
export interface ModalSelectProps extends Omit<SelectProps, 'children' | 'title'> {
|
|
5
|
-
/** 选择触发器宽度 */
|
|
6
|
-
width?: number;
|
|
7
5
|
/** modal props */
|
|
8
6
|
modal?: ModalProps;
|
|
9
7
|
/** 自定义内容 */
|
|
10
|
-
children
|
|
8
|
+
children?: ReactElement | ((props: SelectChildrenProps) => ReactNode);
|
|
11
9
|
}
|
|
12
|
-
export default function ModalSelect({
|
|
10
|
+
export default function ModalSelect({ style, mode, modal, value, children, labelInValue, onChange: onOkChange, ...otherProps }: ModalSelectProps): import("react/jsx-runtime").JSX.Element;
|
package/es/select/ modal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["
|
|
1
|
+
var _excluded = ["style", "mode", "modal", "value", "children", "labelInValue", "onChange"];
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
@@ -20,8 +20,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
20
20
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
export default function ModalSelect(_ref) {
|
|
23
|
-
var
|
|
24
|
-
style = _ref.style,
|
|
23
|
+
var style = _ref.style,
|
|
25
24
|
mode = _ref.mode,
|
|
26
25
|
modal = _ref.modal,
|
|
27
26
|
value = _ref.value,
|
|
@@ -119,9 +118,7 @@ export default function ModalSelect(_ref) {
|
|
|
119
118
|
placeholder: '请选择'
|
|
120
119
|
}, otherProps), {}, {
|
|
121
120
|
mode: !!labelText ? undefined : mode,
|
|
122
|
-
style:
|
|
123
|
-
width: width
|
|
124
|
-
}),
|
|
121
|
+
style: style,
|
|
125
122
|
options: options,
|
|
126
123
|
onChange: function onChange(e) {
|
|
127
124
|
setValueState(e);
|
|
@@ -138,7 +135,7 @@ export default function ModalSelect(_ref) {
|
|
|
138
135
|
forceRender: true,
|
|
139
136
|
onOk: onModalOk
|
|
140
137
|
}, modal), {}, {
|
|
141
|
-
children: typeof children === 'function' ? children(childrenProps) : /*#__PURE__*/React.cloneElement(children, childrenProps)
|
|
138
|
+
children: children && (typeof children === 'function' ? children(childrenProps) : /*#__PURE__*/React.cloneElement(children, childrenProps))
|
|
142
139
|
}))]
|
|
143
140
|
});
|
|
144
141
|
}
|
package/es/select/customize.d.ts
CHANGED
|
@@ -11,17 +11,15 @@ export type SelectChildrenProps = Pick<SelectProps, 'value' | 'onChange' | 'mode
|
|
|
11
11
|
onLoading?: (loading: boolean) => void;
|
|
12
12
|
};
|
|
13
13
|
export interface CustomizeSelectProps extends Omit<SelectProps, 'children'> {
|
|
14
|
-
/** 选择触发器宽度 */
|
|
15
|
-
width?: number;
|
|
16
14
|
/** 内容宽度 */
|
|
17
15
|
contentWidth?: number;
|
|
18
16
|
/** 自定义内容 */
|
|
19
|
-
children
|
|
17
|
+
children?: ReactElement | ((props: SelectChildrenProps) => ReactNode);
|
|
20
18
|
}
|
|
21
19
|
/**
|
|
22
20
|
* 自定义弹框
|
|
23
21
|
* @param SelectCustomizeProps
|
|
24
22
|
* @returns
|
|
25
23
|
*/
|
|
26
|
-
declare function SelectIndex({
|
|
24
|
+
declare function SelectIndex({ value, style, mode, children, contentWidth, labelInValue, onChange, ...otherProps }: CustomizeSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
27
25
|
export default SelectIndex;
|
package/es/select/customize.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["
|
|
1
|
+
var _excluded = ["value", "style", "mode", "children", "contentWidth", "labelInValue", "onChange"];
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
@@ -24,8 +24,7 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
24
24
|
* @returns
|
|
25
25
|
*/
|
|
26
26
|
function SelectIndex(_ref) {
|
|
27
|
-
var
|
|
28
|
-
value = _ref.value,
|
|
27
|
+
var value = _ref.value,
|
|
29
28
|
style = _ref.style,
|
|
30
29
|
mode = _ref.mode,
|
|
31
30
|
children = _ref.children,
|
|
@@ -80,7 +79,7 @@ function SelectIndex(_ref) {
|
|
|
80
79
|
display: 'none'
|
|
81
80
|
},
|
|
82
81
|
ref: ref,
|
|
83
|
-
children: typeof children === 'function' ? children(childrenProps) : /*#__PURE__*/React.cloneElement(children, childrenProps)
|
|
82
|
+
children: children && (typeof children === 'function' ? children(childrenProps) : /*#__PURE__*/React.cloneElement(children, childrenProps))
|
|
84
83
|
});
|
|
85
84
|
}, [value]);
|
|
86
85
|
useEffect(function () {
|
|
@@ -131,9 +130,7 @@ function SelectIndex(_ref) {
|
|
|
131
130
|
},
|
|
132
131
|
mode: !!labelText ? undefined : mode,
|
|
133
132
|
value: loading ? undefined : renderValueText(),
|
|
134
|
-
style: _objectSpread(
|
|
135
|
-
width: width
|
|
136
|
-
}),
|
|
133
|
+
style: _objectSpread({}, style),
|
|
137
134
|
onChange: _onChange,
|
|
138
135
|
options: options
|
|
139
136
|
}))
|