Skip to content

Commit

Permalink
feat(config): Update version of picker (#226)
Browse files Browse the repository at this point in the history
New version of picker contains changes to satisfy google ux review
  • Loading branch information
Andrzej Sala authored May 6, 2019
1 parent d067b3e commit 11be0cc
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</p>
<p align="center">
<a href="https://npmjs.com/package/filestack-js"><img src="https://img.shields.io/npm/v/filestack-js.svg" /></a>
<a href="https://static.filestackapi.com/filestack-js/1.x.x/filestack.min.js"><img src="https://img.badgesize.io/https://static.filestackapi.com/filestack-js/1.x.x/filestack.min.js?compression=gzip&color=green" /></a>
<a href="https://static.filestackapi.com/filestack-js/1.x.x/filestack.min.js"><img src="https://img.badgesize.io/https://static.filestackapi.com/filestack-js/1.x.x/filestack.min.js?color=green" /></a>
<a href="https://static.filestackapi.com/filestack-js/2.x.x/filestack.min.js"><img src="https://img.badgesize.io/https://static.filestackapi.com/filestack-js/2.x.x/filestack.min.js?compression=gzip&color=green" /></a>
<a href="https://static.filestackapi.com/filestack-js/2.x.x/filestack.min.js"><img src="https://img.badgesize.io/https://static.filestackapi.com/filestack-js/2.x.x/filestack.min.js?color=green" /></a>
<img src="https://img.shields.io/badge/module%20formats-umd%2C%20esm%2C%20cjs-green.svg" />
<br/>
<img src="https://badges.herokuapp.com/browsers?labels=none&googlechrome=latest&firefox=latest&microsoftedge=latest&iexplore=11&safari=latest&iphone=latest" />
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* @private
*/
const PICKER_VERSION = '1.4.7';
const PICKER_VERSION = '1.4.8';

/**
* @private
Expand Down
37 changes: 37 additions & 0 deletions src/lib/picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ export interface PickerFileMetadata {
url: string;
}

export interface CustomAuthTextOptions {
[key: string]: {
top?: string[],
bottom?: string[]
};
}

export interface PickerResponse {
filesUploaded: PickerFileMetadata[];
filesFailed: PickerFileMetadata[];
Expand Down Expand Up @@ -387,6 +394,36 @@ export interface PickerOptions {
cleanupImageExif?: boolean | {
keepOrientation: boolean
};
/**
* Customize the text on the cloud authentication screen in Picker.
* Use a cloud source name (see [[PickerOptions.fromSources]])
* or a 'default' as a key, then put your custom notice or consent
* to the 'top' or the 'bottom' key to show it respectivly above or under 'Connect button'.
*
* ```javascript
* customAuthText: {
* // use it for every cloud authentication screen
* default: {
* top: [
* 'default top first line',
* 'default top second line'
* ],
* bottom: [
* 'default bottom first line',
* 'default bottom second line'
* ]
* },
* // override a default bottom text for only gmail
* gmail: {
* bottom: [
* 'We need your permission to access your data and',
* 'process it with our machine learning system.'
* ]
* }
* }
* ```
*/
customAuthText?: CustomAuthTextOptions;
/**
* Picker display mode, one of `'inline'`, `'overlay'`, `'dropPane'` - default is `'overlay'`.
*/
Expand Down

0 comments on commit 11be0cc

Please sign in to comment.