d2coreui 23.0.7 → 23.0.9

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.
@@ -48,7 +48,7 @@ export const DraggableModalInner = memo((_a) => {
48
48
  const onMouseDrag = useDrag(x, y, onDragWithID);
49
49
  const onMouseResize = useResize(x, y, width, height, onResizeWithID);
50
50
  const titleElement = useMemo(() => (React.createElement("div", { className: "ant-design-draggable-modal-title", onMouseDown: onMouseDrag, onClick: onFocus }, title)), [onMouseDrag, onFocus, title]);
51
- return (React.createElement(Modal, Object.assign({ wrapClassName: "ant-design-draggable-modal", style: style, destroyOnClose: true, mask: false, maskClosable: false, width: width, zIndex: zIndex, title: titleElement, open: open }, otherProps),
51
+ return (React.createElement(Modal, Object.assign({ wrapClassName: "ant-design-draggable-modal", style: style, destroyOnClose: true, width: width, zIndex: zIndex, title: titleElement, open: open }, otherProps),
52
52
  children,
53
53
  React.createElement(ResizeHandle, { onMouseDown: onMouseResize })));
54
54
  });
@@ -1 +1 @@
1
- {"version":3,"file":"draggableModalInner.js","sourceRoot":"","sources":["../../../../../components/modal/impl/draggableModalInner.tsx"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAC,KAAK,EAAC,MAAM,MAAM,CAAA;AAC1B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AAEzC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AAGrC,MAAM,UAAU,GAAwB,EAAC,MAAM,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,EAAC,CAAA;AA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c,EAAE,IAAI,EACpB,IAAI,EAAE,KAAK,EACX,YAAY,EAAE,KAAK,EACnB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,IAAI,IACN,UAAU;QAEb,QAAQ;QACT,oBAAC,YAAY,IAAC,WAAW,EAAE,aAAa,GAAG,CACvC,CACX,CAAA;AACL,CAAC,CACJ,CAAC;AAEF,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;IACxC,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAA;AAC3D,CAAC","sourcesContent":["// https://github.com/CUBETIQ/antd-modal/\r\n\r\nimport * as React from 'react'\r\nimport {memo, useCallback, useEffect, useMemo} from 'react'\r\nimport {Modal} from 'antd'\r\nimport {ResizeHandle} from './resizeHandle'\r\nimport {useDrag} from './useDrag'\r\nimport {DraggableModalContextMethods} from './draggableModalContext'\r\nimport {usePrevious} from './usePrevious'\r\nimport {ModalID, ModalState} from './draggableModalReducer'\r\nimport {useResize} from './useResize'\r\nimport {DraggableModalProps} from \"./draggableModal\";\r\n\r\nconst modalStyle: React.CSSProperties = {margin: 0, paddingBottom: 0, pointerEvents: 'auto'}\r\n\r\ninterface ContextProps extends DraggableModalContextMethods {\r\n id: ModalID\r\n modalState: ModalState\r\n initialWidth?: number\r\n initialHeight?: number\r\n}\r\n\r\n//export type DraggableModalInnerProps = ModalProps & { children?: React.ReactNode } & ContextProps\r\nexport interface DraggableModalInnerProps extends DraggableModalProps, ContextProps {\r\n children?: React.ReactNode\r\n}\r\n\r\nexport const DraggableModalInner = memo(\r\n ({\r\n id,\r\n modalState,\r\n dispatch,\r\n open,\r\n children,\r\n title,\r\n initialWidth,\r\n initialHeight,\r\n onResize,\r\n ...otherProps\r\n }: DraggableModalInnerProps) => {\r\n // Call on mount and unmount.\r\n useEffect(() => {\r\n dispatch({type: 'mount', id, intialState: {initialWidth, initialHeight}});\r\n return () => dispatch({type: 'unmount', id})\r\n }, [dispatch, id, initialWidth, initialHeight]);\r\n\r\n // Bring this to the front if it's been opened with props.\r\n const visiblePrevious = usePrevious(open);\r\n useEffect(() => {\r\n if (open !== visiblePrevious) {\r\n if (open) {\r\n dispatch({type: 'show', id})\r\n } else {\r\n dispatch({type: 'hide', id})\r\n }\r\n }\r\n }, [open, visiblePrevious, id, dispatch]);\r\n\r\n const {zIndex, x, y, width, height} = modalState;\r\n\r\n const style: React.CSSProperties = useMemo(\r\n () => ({...modalStyle, top: y, left: x, height}),\r\n [y, x, height],\r\n );\r\n\r\n const onFocus = useCallback(() => dispatch({type: 'focus', id}), [id, dispatch])\r\n\r\n const onDragWithID = useCallback((args: any) => dispatch({type: 'drag', id, ...args}), [\r\n dispatch,\r\n id,\r\n ]);\r\n\r\n const onResizeWithID = useCallback((args: any) => {\r\n onResize?.({width: args.width, height: args.height});\r\n return dispatch({type: 'resize', id, ...args})\r\n }, [dispatch, id,]);\r\n\r\n const onMouseDrag = useDrag(x, y, onDragWithID);\r\n const onMouseResize = useResize(x, y, width, height, onResizeWithID);\r\n\r\n const titleElement = useMemo(\r\n () => (\r\n <div\r\n className=\"ant-design-draggable-modal-title\"\r\n onMouseDown={onMouseDrag}\r\n onClick={onFocus}\r\n >\r\n {title}\r\n </div>\r\n ),\r\n [onMouseDrag, onFocus, title],\r\n );\r\n\r\n return (\r\n <Modal\r\n wrapClassName=\"ant-design-draggable-modal\"\r\n style={style}\r\n destroyOnClose={true}\r\n mask={false}\r\n maskClosable={false}\r\n width={width}\r\n zIndex={zIndex}\r\n title={titleElement}\r\n open={open}\r\n {...otherProps}\r\n >\r\n {children}\r\n <ResizeHandle onMouseDown={onMouseResize}/>\r\n </Modal>\r\n )\r\n }\r\n);\r\n\r\nif (process.env.NODE_ENV !== 'production') {\r\n DraggableModalInner.displayName = 'DraggableModalInner'\r\n}\r\n"]}
1
+ {"version":3,"file":"draggableModalInner.js","sourceRoot":"","sources":["../../../../../components/modal/impl/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AC,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IAEpB,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;IAChD,MAAM,aAAa,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAErE,MAAM,YAAY,GAAG,OAAO,CACxB,GAAG,EAAE,CAAC,CACF,6BACI,SAAS,EAAC,kCAAkC,EAC5C,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,IAEf,KAAK,CACJ,CACT,EACD,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,CAChC,CAAC;IAEF,OAAO,CACH,oBAAC,KAAK,kBACF,aAAa,EAAC,4BAA4B,EAC1C,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,IAAI,EACpB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,IAAI,IACN,UAAU;QAEb,QAAQ;QACT,oBAAC,YAAY,IAAC,WAAW,EAAE,aAAa,GAAG,CACvC,CACX,CAAA;AACL,CAAC,CACJ,CAAC;AAEF,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;IACxC,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAA;AAC3D,CAAC","sourcesContent":["// https://github.com/CUBETIQ/antd-modal/\r\n\r\nimport * as React from 'react'\r\nimport {memo, useCallback, useEffect, useMemo} from 'react'\r\nimport {Modal} from 'antd'\r\nimport {ResizeHandle} from './resizeHandle'\r\nimport {useDrag} from './useDrag'\r\nimport {DraggableModalContextMethods} from './draggableModalContext'\r\nimport {usePrevious} from './usePrevious'\r\nimport {ModalID, ModalState} from './draggableModalReducer'\r\nimport {useResize} from './useResize'\r\nimport {DraggableModalProps} from \"./draggableModal\";\r\n\r\nconst modalStyle: React.CSSProperties = {margin: 0, paddingBottom: 0, pointerEvents: 'auto'}\r\n\r\ninterface ContextProps extends DraggableModalContextMethods {\r\n id: ModalID\r\n modalState: ModalState\r\n initialWidth?: number\r\n initialHeight?: number\r\n}\r\n\r\n//export type DraggableModalInnerProps = ModalProps & { children?: React.ReactNode } & ContextProps\r\nexport interface DraggableModalInnerProps extends DraggableModalProps, ContextProps {\r\n children?: React.ReactNode\r\n}\r\n\r\nexport const DraggableModalInner = memo(\r\n ({\r\n id,\r\n modalState,\r\n dispatch,\r\n open,\r\n children,\r\n title,\r\n initialWidth,\r\n initialHeight,\r\n onResize,\r\n ...otherProps\r\n }: DraggableModalInnerProps) => {\r\n // Call on mount and unmount.\r\n useEffect(() => {\r\n dispatch({type: 'mount', id, intialState: {initialWidth, initialHeight}});\r\n return () => dispatch({type: 'unmount', id})\r\n }, [dispatch, id, initialWidth, initialHeight]);\r\n\r\n // Bring this to the front if it's been opened with props.\r\n const visiblePrevious = usePrevious(open);\r\n useEffect(() => {\r\n if (open !== visiblePrevious) {\r\n if (open) {\r\n dispatch({type: 'show', id})\r\n } else {\r\n dispatch({type: 'hide', id})\r\n }\r\n }\r\n }, [open, visiblePrevious, id, dispatch]);\r\n\r\n const {zIndex, x, y, width, height} = modalState;\r\n\r\n const style: React.CSSProperties = useMemo(\r\n () => ({...modalStyle, top: y, left: x, height}),\r\n [y, x, height],\r\n );\r\n\r\n const onFocus = useCallback(() => dispatch({type: 'focus', id}), [id, dispatch])\r\n\r\n const onDragWithID = useCallback((args: any) => dispatch({type: 'drag', id, ...args}), [\r\n dispatch,\r\n id,\r\n ]);\r\n\r\n const onResizeWithID = useCallback((args: any) => {\r\n onResize?.({width: args.width, height: args.height});\r\n return dispatch({type: 'resize', id, ...args})\r\n }, [dispatch, id,]);\r\n\r\n const onMouseDrag = useDrag(x, y, onDragWithID);\r\n const onMouseResize = useResize(x, y, width, height, onResizeWithID);\r\n\r\n const titleElement = useMemo(\r\n () => (\r\n <div\r\n className=\"ant-design-draggable-modal-title\"\r\n onMouseDown={onMouseDrag}\r\n onClick={onFocus}\r\n >\r\n {title}\r\n </div>\r\n ),\r\n [onMouseDrag, onFocus, title],\r\n );\r\n\r\n return (\r\n <Modal\r\n wrapClassName=\"ant-design-draggable-modal\"\r\n style={style}\r\n destroyOnClose={true}\r\n width={width}\r\n zIndex={zIndex}\r\n title={titleElement}\r\n open={open}\r\n {...otherProps}\r\n >\r\n {children}\r\n <ResizeHandle onMouseDown={onMouseResize}/>\r\n </Modal>\r\n )\r\n }\r\n);\r\n\r\nif (process.env.NODE_ENV !== 'production') {\r\n DraggableModalInner.displayName = 'DraggableModalInner'\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "d2coreui",
3
- "version": "23.0.7",
3
+ "version": "23.0.9",
4
4
  "description": "Core UI components and utilities library.",
5
5
  "author": "Ipesoft s.r.o.",
6
6
  "license": "MIT",
@@ -1,5 +1,4 @@
1
1
  .ant-design-draggable-modal {
2
- pointer-events: none;
3
2
  overflow: hidden !important;
4
3
  }
5
4