Comparing version 7.8.0 to 7.8.1
@@ -162,4 +162,6 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
alt: alt, | ||
width: width, | ||
height: height, | ||
imageInfo: { | ||
width: width, | ||
height: height | ||
}, | ||
fallback: fallback, | ||
@@ -166,0 +168,0 @@ getContainer: getPreviewContainer, |
import type { DialogProps as IDialogPropTypes } from 'rc-dialog'; | ||
import React from 'react'; | ||
import type { ImgInfo } from './Image'; | ||
import type { TransformAction, TransformType } from './hooks/useImageTransform'; | ||
import type { ImgInfo } from './Image'; | ||
export type ToolbarRenderInfoType = { | ||
@@ -33,4 +33,6 @@ icons: { | ||
alt?: string; | ||
width?: number | string; | ||
height?: number | string; | ||
imageInfo?: { | ||
width: number | string; | ||
height: number | string; | ||
}; | ||
fallback?: string; | ||
@@ -37,0 +39,0 @@ movable?: boolean; |
@@ -7,3 +7,3 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
var _excluded = ["fallback", "src", "imgRef"], | ||
_excluded2 = ["prefixCls", "src", "alt", "width", "height", "fallback", "movable", "onClose", "visible", "icons", "rootClassName", "closeIcon", "getContainer", "current", "count", "countRender", "scaleStep", "minScale", "maxScale", "transitionName", "maskTransitionName", "imageRender", "imgCommonProps", "toolbarRender", "onTransform", "onChange"]; | ||
_excluded2 = ["prefixCls", "src", "alt", "imageInfo", "fallback", "movable", "onClose", "visible", "icons", "rootClassName", "closeIcon", "getContainer", "current", "count", "countRender", "scaleStep", "minScale", "maxScale", "transitionName", "maskTransitionName", "imageRender", "imgCommonProps", "toolbarRender", "onTransform", "onChange"]; | ||
import classnames from 'classnames'; | ||
@@ -14,2 +14,3 @@ import Dialog from 'rc-dialog'; | ||
import React, { useContext, useEffect, useRef, useState } from 'react'; | ||
import Operations from "./Operations"; | ||
import { PreviewGroupContext } from "./context"; | ||
@@ -20,3 +21,2 @@ import useImageTransform from "./hooks/useImageTransform"; | ||
import useTouchEvent from "./hooks/useTouchEvent"; | ||
import Operations from "./Operations"; | ||
import { BASE_SCALE_RATIO } from "./previewConfig"; | ||
@@ -46,4 +46,3 @@ var PreviewImage = function PreviewImage(_ref) { | ||
alt = props.alt, | ||
width = props.width, | ||
height = props.height, | ||
imageInfo = props.imageInfo, | ||
fallback = props.fallback, | ||
@@ -140,3 +139,3 @@ _props$movable = props.movable, | ||
var onReset = function onReset() { | ||
resetTransform("reset"); | ||
resetTransform('reset'); | ||
}; | ||
@@ -208,8 +207,6 @@ var onSwitchLeft = function onSwitchLeft(event) { | ||
})); | ||
var image = { | ||
var image = _objectSpread({ | ||
url: src, | ||
alt: alt, | ||
width: width, | ||
height: height | ||
}; | ||
alt: alt | ||
}, imageInfo); | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dialog, _extends({ | ||
@@ -216,0 +213,0 @@ transitionName: transitionName, |
@@ -172,4 +172,6 @@ "use strict"; | ||
alt: alt, | ||
width: width, | ||
height: height, | ||
imageInfo: { | ||
width: width, | ||
height: height | ||
}, | ||
fallback: fallback, | ||
@@ -176,0 +178,0 @@ getContainer: getPreviewContainer, |
import type { DialogProps as IDialogPropTypes } from 'rc-dialog'; | ||
import React from 'react'; | ||
import type { ImgInfo } from './Image'; | ||
import type { TransformAction, TransformType } from './hooks/useImageTransform'; | ||
import type { ImgInfo } from './Image'; | ||
export type ToolbarRenderInfoType = { | ||
@@ -33,4 +33,6 @@ icons: { | ||
alt?: string; | ||
width?: number | string; | ||
height?: number | string; | ||
imageInfo?: { | ||
width: number | string; | ||
height: number | string; | ||
}; | ||
fallback?: string; | ||
@@ -37,0 +39,0 @@ movable?: boolean; |
@@ -19,2 +19,3 @@ "use strict"; | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _Operations = _interopRequireDefault(require("./Operations")); | ||
var _context = require("./context"); | ||
@@ -25,6 +26,5 @@ var _useImageTransform2 = _interopRequireDefault(require("./hooks/useImageTransform")); | ||
var _useTouchEvent2 = _interopRequireDefault(require("./hooks/useTouchEvent")); | ||
var _Operations = _interopRequireDefault(require("./Operations")); | ||
var _previewConfig = require("./previewConfig"); | ||
var _excluded = ["fallback", "src", "imgRef"], | ||
_excluded2 = ["prefixCls", "src", "alt", "width", "height", "fallback", "movable", "onClose", "visible", "icons", "rootClassName", "closeIcon", "getContainer", "current", "count", "countRender", "scaleStep", "minScale", "maxScale", "transitionName", "maskTransitionName", "imageRender", "imgCommonProps", "toolbarRender", "onTransform", "onChange"]; | ||
_excluded2 = ["prefixCls", "src", "alt", "imageInfo", "fallback", "movable", "onClose", "visible", "icons", "rootClassName", "closeIcon", "getContainer", "current", "count", "countRender", "scaleStep", "minScale", "maxScale", "transitionName", "maskTransitionName", "imageRender", "imgCommonProps", "toolbarRender", "onTransform", "onChange"]; | ||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | ||
@@ -55,4 +55,3 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | ||
alt = props.alt, | ||
width = props.width, | ||
height = props.height, | ||
imageInfo = props.imageInfo, | ||
fallback = props.fallback, | ||
@@ -149,3 +148,3 @@ _props$movable = props.movable, | ||
var onReset = function onReset() { | ||
resetTransform("reset"); | ||
resetTransform('reset'); | ||
}; | ||
@@ -217,8 +216,6 @@ var onSwitchLeft = function onSwitchLeft(event) { | ||
})); | ||
var image = { | ||
var image = (0, _objectSpread2.default)({ | ||
url: src, | ||
alt: alt, | ||
width: width, | ||
height: height | ||
}; | ||
alt: alt | ||
}, imageInfo); | ||
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_rcDialog.default, (0, _extends2.default)({ | ||
@@ -225,0 +222,0 @@ transitionName: transitionName, |
{ | ||
"name": "rc-image", | ||
"version": "7.8.0", | ||
"version": "7.8.1", | ||
"description": "React easy to use image component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157417
3724