Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): Update version of picker #226

Merged
merged 1 commit into from
May 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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