@ccs-ui/rc-pro 1.1.25-beta-8 → 1.1.25-beta-10
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/dialog/HookModal.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { FormProps } from 'antd';
|
|
3
3
|
import { DialogFormRef } from './form';
|
|
4
4
|
import { CcsDialogModal, CcsDialogModalProps } from './hook';
|
|
5
|
-
export declare const DialogSelfButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "
|
|
5
|
+
export declare const DialogSelfButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "onCancel" | "onRequestBefore"> & {
|
|
6
6
|
formRef: React.RefObject<DialogFormRef>;
|
|
7
7
|
formInitialValues: FormProps['initialValues'];
|
|
8
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
package/es/dialog/HookModal.js
CHANGED
|
@@ -25,13 +25,13 @@ var DragModal = function DragModal(_ref) {
|
|
|
25
25
|
var modal = _ref.modal,
|
|
26
26
|
dragState = _ref.dragState,
|
|
27
27
|
onDragState = _ref.onDragState;
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
28
|
+
var nodeRef = useRef(null);
|
|
29
|
+
var onStart = function onStart(event, uiData) {
|
|
30
|
+
var _nodeRef$current;
|
|
31
31
|
var _window$document$docu = window.document.documentElement,
|
|
32
32
|
clientWidth = _window$document$docu.clientWidth,
|
|
33
33
|
clientHeight = _window$document$docu.clientHeight;
|
|
34
|
-
var targetRect = (
|
|
34
|
+
var targetRect = (_nodeRef$current = nodeRef.current) === null || _nodeRef$current === void 0 ? void 0 : _nodeRef$current.getBoundingClientRect();
|
|
35
35
|
if (!targetRect) {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
@@ -47,13 +47,12 @@ var DragModal = function DragModal(_ref) {
|
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
49
|
return /*#__PURE__*/_jsx(Draggable, {
|
|
50
|
+
nodeRef: nodeRef,
|
|
50
51
|
disabled: dragState.disabled,
|
|
51
52
|
bounds: dragState.bounds,
|
|
52
|
-
onStart:
|
|
53
|
-
return _onStart(event, uiData);
|
|
54
|
-
},
|
|
53
|
+
onStart: onStart,
|
|
55
54
|
children: /*#__PURE__*/_jsx("div", {
|
|
56
|
-
ref:
|
|
55
|
+
ref: nodeRef,
|
|
57
56
|
children: modal
|
|
58
57
|
})
|
|
59
58
|
});
|
package/es/status-tag/index.d.ts
CHANGED