Skip to content

Commit 11be0cc

Browse files
author
Andrzej Sala
authored
feat(config): Update version of picker (#226)
New version of picker contains changes to satisfy google ux review
1 parent d067b3e commit 11be0cc

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</p>
77
<p align="center">
88
<a href="https://npmjs.com/package/filestack-js"><img src="https://img.shields.io/npm/v/filestack-js.svg" /></a>
9-
<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>
10-
<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>
9+
<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>
10+
<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>
1111
<img src="https://img.shields.io/badge/module%20formats-umd%2C%20esm%2C%20cjs-green.svg" />
1212
<br/>
1313
<img src="https://badges.herokuapp.com/browsers?labels=none&googlechrome=latest&firefox=latest&microsoftedge=latest&iexplore=11&safari=latest&iphone=latest" />

src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* @private
2020
*/
21-
const PICKER_VERSION = '1.4.7';
21+
const PICKER_VERSION = '1.4.8';
2222

2323
/**
2424
* @private

src/lib/picker.ts

+37
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ export interface PickerFileMetadata {
155155
url: string;
156156
}
157157

158+
export interface CustomAuthTextOptions {
159+
[key: string]: {
160+
top?: string[],
161+
bottom?: string[]
162+
};
163+
}
164+
158165
export interface PickerResponse {
159166
filesUploaded: PickerFileMetadata[];
160167
filesFailed: PickerFileMetadata[];
@@ -387,6 +394,36 @@ export interface PickerOptions {
387394
cleanupImageExif?: boolean | {
388395
keepOrientation: boolean
389396
};
397+
/**
398+
* Customize the text on the cloud authentication screen in Picker.
399+
* Use a cloud source name (see [[PickerOptions.fromSources]])
400+
* or a 'default' as a key, then put your custom notice or consent
401+
* to the 'top' or the 'bottom' key to show it respectivly above or under 'Connect button'.
402+
*
403+
* ```javascript
404+
* customAuthText: {
405+
* // use it for every cloud authentication screen
406+
* default: {
407+
* top: [
408+
* 'default top first line',
409+
* 'default top second line'
410+
* ],
411+
* bottom: [
412+
* 'default bottom first line',
413+
* 'default bottom second line'
414+
* ]
415+
* },
416+
* // override a default bottom text for only gmail
417+
* gmail: {
418+
* bottom: [
419+
* 'We need your permission to access your data and',
420+
* 'process it with our machine learning system.'
421+
* ]
422+
* }
423+
* }
424+
* ```
425+
*/
426+
customAuthText?: CustomAuthTextOptions;
390427
/**
391428
* Picker display mode, one of `'inline'`, `'overlay'`, `'dropPane'` - default is `'overlay'`.
392429
*/

0 commit comments

Comments
 (0)