Skip to content

Commit

Permalink
feat(picker): Update pickerOptions interface (#236)
Browse files Browse the repository at this point in the history
Update picker options Interface according to picker spec
  • Loading branch information
Andrzej Sala authored and pcholuj committed Jun 3, 2019
1 parent 0dc8de2 commit 2d6b533
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
18 changes: 13 additions & 5 deletions src/lib/picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ export interface PickerStoreOptions {
export interface PickerCustomText {
// Actions
Upload?: string;
'Upload more'?: string;
'Deselect All'?: string;
'View/Edit Selected'?: string;
'Sign Out'?: string;
Expand All @@ -285,11 +286,15 @@ export interface PickerCustomText {
'more files'?: string;

// Cloud
Connect?: string;
'Select Files from'?: string;
'You need to authenticate with '?: string;
'Connect {providerName}'?: string;
'Select Files from {providerName}'?: string;
'You need to authenticate with {providerName}.'?: string;
'A new page will open to connect your account.'?: string;
'We only extract images and never modify or delete them.'?: string;
'To disconnect from {providerName} click "Sign out" button in the menu.'?: string;
'Sign in with Google'?: string;
'Go back'?: string;
'This folder is empty.'?: string;

// Summary
Files?: string;
Expand Down Expand Up @@ -325,6 +330,7 @@ export interface PickerCustomText {
'Try now'?: string;

// Local File Source
'Drag and Drop, Copy and Paste Files'?: string;
'or Drag and Drop, Copy and Paste Files'?: string;
'Select Files to Upload'?: string;
'Select From'?: string;
Expand All @@ -346,6 +352,7 @@ export interface PickerCustomText {
'File {displayName} is too big. The accepted file size is less than {roundFileSize}'?: string;
'Our file upload limit is {maxFiles} {filesText}'?: string;
'No search results found for "{search}"'?: string;
'An error occurred. Please try again.'?: string;
}

export interface PickerOptions {
Expand Down Expand Up @@ -392,10 +399,11 @@ export interface PickerOptions {
container?: string | Node;

/**
* Turn on cleaning JPEG image exif. Method can keep image orientation
* Turn on cleaning JPEG image exif. Method can keep image orientation or color profiles
*/
cleanupImageExif?: boolean | {
keepOrientation: boolean
keepOrientation?: boolean,
keepICCandAPP?: boolean
};
/**
* Customize the text on the cloud authentication screen in Picker.
Expand Down
5 changes: 4 additions & 1 deletion src/schema/picker.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ export const PickerParamsSchema = {
keepOrientation: {
type: 'boolean',
},
keepICCandAPP: {
type: 'boolean',
},
},
},
],
Expand Down Expand Up @@ -386,6 +389,6 @@ export const PickerParamsSchema = {
type: 'object',
additionalProperties: false,
properties: UploadParamsSchema.properties,// manual import upload definitions
}
},
},
};

0 comments on commit 2d6b533

Please sign in to comment.