rc-image
Advanced tools
Comparing version 6.0.0 to 6.1.0
@@ -6,3 +6,3 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
import * as React from 'react'; | ||
import { COMMON_PROPS } from "../Image"; | ||
import { COMMON_PROPS } from "../common"; | ||
/** | ||
@@ -9,0 +9,0 @@ * Merge props provided `items` or context collected images |
@@ -5,3 +5,2 @@ import type { IDialogPropTypes } from 'rc-dialog/lib/IDialogPropTypes'; | ||
import type { TransformType } from './hooks/useImageTransform'; | ||
import type { ImageElementProps } from './interface'; | ||
import type { PreviewProps, ToolbarRenderInfoType } from './Preview'; | ||
@@ -46,4 +45,4 @@ import PreviewGroup from './PreviewGroup'; | ||
} | ||
export declare const COMMON_PROPS: (keyof Omit<ImageElementProps, 'src'>)[]; | ||
export declare const COMMON_PROPS: ("crossOrigin" | "decoding" | "draggable" | "loading" | "referrerPolicy" | "sizes" | "srcSet" | "useMap" | "alt")[]; | ||
declare const ImageInternal: CompoundedComponent<ImageProps>; | ||
export default ImageInternal; |
@@ -18,3 +18,4 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import PreviewGroup from "./PreviewGroup"; | ||
export var COMMON_PROPS = ['crossOrigin', 'decoding', 'draggable', 'loading', 'referrerPolicy', 'sizes', 'srcSet', 'useMap', 'alt']; | ||
import { COMMON_PROPS as CommonProps } from "./common"; | ||
export var COMMON_PROPS = CommonProps; | ||
function isImageValid(src) { | ||
@@ -21,0 +22,0 @@ return new Promise(function (resolve) { |
@@ -14,3 +14,3 @@ "use strict"; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _Image = require("../Image"); | ||
var _common = require("../common"); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -53,3 +53,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
Object.keys(item).forEach(function (key) { | ||
if (['src'].concat((0, _toConsumableArray2.default)(_Image.COMMON_PROPS)).includes(key)) { | ||
if (['src'].concat((0, _toConsumableArray2.default)(_common.COMMON_PROPS)).includes(key)) { | ||
data[key] = item[key]; | ||
@@ -56,0 +56,0 @@ } |
@@ -5,3 +5,2 @@ import type { IDialogPropTypes } from 'rc-dialog/lib/IDialogPropTypes'; | ||
import type { TransformType } from './hooks/useImageTransform'; | ||
import type { ImageElementProps } from './interface'; | ||
import type { PreviewProps, ToolbarRenderInfoType } from './Preview'; | ||
@@ -46,4 +45,4 @@ import PreviewGroup from './PreviewGroup'; | ||
} | ||
export declare const COMMON_PROPS: (keyof Omit<ImageElementProps, 'src'>)[]; | ||
export declare const COMMON_PROPS: ("crossOrigin" | "decoding" | "draggable" | "loading" | "referrerPolicy" | "sizes" | "srcSet" | "useMap" | "alt")[]; | ||
declare const ImageInternal: CompoundedComponent<ImageProps>; | ||
export default ImageInternal; |
@@ -23,2 +23,3 @@ "use strict"; | ||
var _PreviewGroup = _interopRequireDefault(require("./PreviewGroup")); | ||
var _common = require("./common"); | ||
var _excluded = ["src", "alt", "onPreviewClose", "prefixCls", "previewPrefixCls", "placeholder", "fallback", "width", "height", "style", "preview", "className", "onClick", "onError", "wrapperClassName", "wrapperStyle", "rootClassName"], | ||
@@ -28,3 +29,3 @@ _excluded2 = ["src", "visible", "onVisibleChange", "getContainer", "mask", "maskClassName", "icons", "scaleStep", "minScale", "maxScale", "imageRender", "toolbarRender"]; | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var COMMON_PROPS = ['crossOrigin', 'decoding', 'draggable', 'loading', 'referrerPolicy', 'sizes', 'srcSet', 'useMap', 'alt']; | ||
var COMMON_PROPS = _common.COMMON_PROPS; | ||
exports.COMMON_PROPS = COMMON_PROPS; | ||
@@ -31,0 +32,0 @@ function isImageValid(src) { |
{ | ||
"name": "rc-image", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "React easy to use image component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
132963
56
3010