@ccs-ui/rc-pro 1.1.25-beta-21 → 1.1.25-beta-22
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/auth/index.js +26 -12
- package/es/auth/index.less +1 -0
- package/es/dialog/DialogRequestButton.d.ts +1 -1
- package/es/dialog/DialogSelfOkButton.d.ts +1 -1
- package/es/editor/index.less +1 -0
- package/es/pro-table/_utils.d.ts +1 -1
- package/es/pro-table/_utils.js +1 -1
- package/package.json +1 -1
package/es/auth/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
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 = ["
|
|
3
|
-
_excluded2 = ["key", "label",
|
|
2
|
+
var _excluded = ["onDisabled", "onHidden"],
|
|
3
|
+
_excluded2 = ["key", "label"],
|
|
4
|
+
_excluded3 = ["key", "label", "disabled", "onDisabled", "onHidden"];
|
|
4
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; }
|
|
5
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; }
|
|
6
7
|
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; }
|
|
@@ -69,6 +70,17 @@ function AuthGroup(_ref4) {
|
|
|
69
70
|
return !item.hidden && !(item.onHidden && item.onHidden(selectedRows));
|
|
70
71
|
});
|
|
71
72
|
|
|
73
|
+
// link按钮删除无用参数
|
|
74
|
+
if (isLink) {
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
76
|
+
authButtons = authButtons.map(function (_ref7) {
|
|
77
|
+
var onDisabled = _ref7.onDisabled,
|
|
78
|
+
onHidden = _ref7.onHidden,
|
|
79
|
+
b = _objectWithoutProperties(_ref7, _excluded);
|
|
80
|
+
return _objectSpread({}, b);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
72
84
|
// 需要判断权限
|
|
73
85
|
if (onAuth) {
|
|
74
86
|
authButtons = authButtons.filter(function (b) {
|
|
@@ -111,10 +123,10 @@ function AuthGroup(_ref4) {
|
|
|
111
123
|
type: "vertical"
|
|
112
124
|
}),
|
|
113
125
|
className: "ccs-group-link",
|
|
114
|
-
children: showBtns === null || showBtns === void 0 ? void 0 : showBtns.map(function (
|
|
115
|
-
var key =
|
|
116
|
-
label =
|
|
117
|
-
restProps = _objectWithoutProperties(
|
|
126
|
+
children: showBtns === null || showBtns === void 0 ? void 0 : showBtns.map(function (_ref8) {
|
|
127
|
+
var key = _ref8.key,
|
|
128
|
+
label = _ref8.label,
|
|
129
|
+
restProps = _objectWithoutProperties(_ref8, _excluded2);
|
|
118
130
|
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
119
131
|
size: size,
|
|
120
132
|
type: "link",
|
|
@@ -147,12 +159,14 @@ function AuthGroup(_ref4) {
|
|
|
147
159
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
148
160
|
children: [/*#__PURE__*/_jsx(Space, {
|
|
149
161
|
wrap: true,
|
|
150
|
-
children: showBtns === null || showBtns === void 0 ? void 0 : showBtns.map(function (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
162
|
+
children: showBtns === null || showBtns === void 0 ? void 0 : showBtns.map(function ( // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
163
|
+
_ref9, index) {
|
|
164
|
+
var key = _ref9.key,
|
|
165
|
+
label = _ref9.label,
|
|
166
|
+
disabled = _ref9.disabled,
|
|
167
|
+
onDisabled = _ref9.onDisabled,
|
|
168
|
+
onHidden = _ref9.onHidden,
|
|
169
|
+
restProps = _objectWithoutProperties(_ref9, _excluded3);
|
|
156
170
|
// 按钮禁用
|
|
157
171
|
var isDisabled = disabled || onDisabled && onDisabled(selectedRows);
|
|
158
172
|
|
package/es/auth/index.less
CHANGED
|
@@ -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, "
|
|
4
|
+
declare const DialogRequestButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "onCancel" | "auth" | "request" | "onRequestBefore"> & {
|
|
5
5
|
formRef: React.RefObject<DialogFormRef>;
|
|
6
6
|
formInitialValues: FormProps['initialValues'];
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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 DialogSelfOkButton: ({ auth, formRef, formInitialValues, onCancel, onOk, }: Pick<CcsDialogModalProps, "
|
|
4
|
+
declare const DialogSelfOkButton: ({ auth, formRef, formInitialValues, onCancel, onOk, }: Pick<CcsDialogModalProps, "onCancel" | "auth" | "onOk"> & {
|
|
5
5
|
formRef: React.RefObject<DialogFormRef>;
|
|
6
6
|
formInitialValues: FormProps['initialValues'];
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
package/es/editor/index.less
CHANGED
package/es/pro-table/_utils.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ declare const getAllChildrenId: (data: any[], rowKey: string) => string[];
|
|
|
9
9
|
declare const isComponent: (element: ReactNode, displayName: string) => boolean;
|
|
10
10
|
/** 查找所有父级依赖 */
|
|
11
11
|
declare const getShowDpends: (items: CCS.TableFormItems, item: CCS.TableFormItems[0], depends: ShowDependType[]) => ShowDependType[];
|
|
12
|
-
export {
|
|
12
|
+
export { getAllChildrenId, getDataById, getShowDpends, isComponent, onTableInModalOrDrawer, onTableInTabItem, };
|
package/es/pro-table/_utils.js
CHANGED
|
@@ -91,4 +91,4 @@ var getShowDpends = function getShowDpends(items, item, depends) {
|
|
|
91
91
|
}
|
|
92
92
|
return depends;
|
|
93
93
|
};
|
|
94
|
-
export {
|
|
94
|
+
export { getAllChildrenId, getDataById, getShowDpends, isComponent, onTableInModalOrDrawer, onTableInTabItem };
|