@microsoft/sp-image-helper
Advanced tools
Comparing version 1.14.0-beta.5 to 1.14.0-rc.2
@@ -13,55 +13,5 @@ /** | ||
/** | ||
* @file IImageHelperRequest.ts | ||
* @copyright Microsoft Corporation. All rights reserved. | ||
*/ | ||
/** | ||
* Interface for constructing a request to create an optimized image url from a file on SharePoint. | ||
* | ||
* @beta | ||
*/ | ||
export declare interface IImageHelperRequest { | ||
/** | ||
* The url to the item to be retrieved as an image. This can be an absolute url or a relative url. | ||
*/ | ||
sourceUrl: string; | ||
/** | ||
* Width of the image requested. | ||
* | ||
* @remarks | ||
* When the height is unspecified, the width is mapped to nearest larger resolution breakpoint with a maximum size. | ||
*/ | ||
width: number; | ||
/** | ||
* Optional height of the image requested | ||
* | ||
* @remarks | ||
* By default, the image height would be based on the width while maintaining the aspect ratio for the image. (This provides the image with the quickest response.) | ||
* When the height is specified, the width is not adjusted to the nearest larger resolution breakpoint. | ||
*/ | ||
height?: number; | ||
} | ||
/* Excluded from this release type: IImageHelperRequest */ | ||
/** | ||
* ImageHelper exposes the ability to convert a SharePoint url to an optimized thumbnail url. | ||
* @beta | ||
*/ | ||
export declare class ImageHelper { | ||
/** | ||
* Convert a url to a file or page on SharePoint into an optimized image url. | ||
* | ||
* @param request - IImageHelperRequest for the bundled parameters. | ||
* | ||
* @remarks | ||
* - If width and height are provided, then the resulting image will be scaled to the minimum of the width or height. | ||
* - The url will be most performant if only a width is provided. If a height is provided, the image will take longer to download due to the scaling. | ||
* - Only use this url at rendering time. It may contain an expiration token. Continue to use the original file's url for serialization. | ||
* | ||
* @returns A full url string for the image of the file. If no optimized url can be created (i.e. an external url or an unsupported file type), | ||
* the original sourceUrl is returned. | ||
* | ||
* @beta | ||
*/ | ||
static convertToImageUrl(request: IImageHelperRequest): string; | ||
} | ||
/* Excluded from this release type: ImageHelper */ | ||
@@ -68,0 +18,0 @@ /* Excluded from this release type: _IPreloadedData */ |
{ | ||
"name": "@microsoft/sp-image-helper", | ||
"version": "1.14.0-beta.5", | ||
"version": "1.14.0-rc.2", | ||
"description": "Image helper APIs for the Sharepoint Framework.", | ||
@@ -14,11 +14,11 @@ "license": "SEE LICENSE IN \"EULA\" FOLDER", | ||
"dependencies": { | ||
"@microsoft/office-ui-fabric-react-bundle": "1.14.0-beta.5", | ||
"@microsoft/sp-core-library": "1.14.0-beta.5", | ||
"@microsoft/sp-diagnostics": "1.14.0-beta.5", | ||
"@microsoft/sp-http": "1.14.0-beta.5", | ||
"@microsoft/sp-loader": "1.14.0-beta.5", | ||
"@microsoft/sp-lodash-subset": "1.14.0-beta.5", | ||
"@microsoft/sp-page-context": "1.14.0-beta.5", | ||
"@microsoft/office-ui-fabric-react-bundle": "1.14.0-rc.2", | ||
"@microsoft/sp-core-library": "1.14.0-rc.2", | ||
"@microsoft/sp-diagnostics": "1.14.0-rc.2", | ||
"@microsoft/sp-http": "1.14.0-rc.2", | ||
"@microsoft/sp-loader": "1.14.0-rc.2", | ||
"@microsoft/sp-lodash-subset": "1.14.0-rc.2", | ||
"@microsoft/sp-page-context": "1.14.0-rc.2", | ||
"tslib": "~1.10.0" | ||
} | ||
} |
1845465
2613
+ Added@microsoft/office-ui-fabric-react-bundle@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-core-library@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-diagnostics@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-dynamic-data@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-http@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-loader@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-lodash-subset@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-module-interfaces@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-odata-types@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-page-context@1.14.0-rc.2(transitive)
+ Added@microsoft/sp-polyfills@1.14.0-rc.2(transitive)
- Removed@microsoft/office-ui-fabric-react-bundle@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-core-library@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-diagnostics@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-dynamic-data@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-http@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-loader@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-lodash-subset@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-module-interfaces@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-odata-types@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-page-context@1.14.0-beta.5(transitive)
- Removed@microsoft/sp-polyfills@1.14.0-beta.5(transitive)