Skip to content

Commit 2d6b533

Browse files
Andrzej Salapcholuj
authored andcommitted
feat(picker): Update pickerOptions interface (#236)
Update picker options Interface according to picker spec
1 parent 0dc8de2 commit 2d6b533

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

src/lib/picker.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ export interface PickerStoreOptions {
264264
export interface PickerCustomText {
265265
// Actions
266266
Upload?: string;
267+
'Upload more'?: string;
267268
'Deselect All'?: string;
268269
'View/Edit Selected'?: string;
269270
'Sign Out'?: string;
@@ -285,11 +286,15 @@ export interface PickerCustomText {
285286
'more files'?: string;
286287

287288
// Cloud
288-
Connect?: string;
289-
'Select Files from'?: string;
290-
'You need to authenticate with '?: string;
289+
'Connect {providerName}'?: string;
290+
'Select Files from {providerName}'?: string;
291+
'You need to authenticate with {providerName}.'?: string;
291292
'A new page will open to connect your account.'?: string;
292293
'We only extract images and never modify or delete them.'?: string;
294+
'To disconnect from {providerName} click "Sign out" button in the menu.'?: string;
295+
'Sign in with Google'?: string;
296+
'Go back'?: string;
297+
'This folder is empty.'?: string;
293298

294299
// Summary
295300
Files?: string;
@@ -325,6 +330,7 @@ export interface PickerCustomText {
325330
'Try now'?: string;
326331

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

351358
export interface PickerOptions {
@@ -392,10 +399,11 @@ export interface PickerOptions {
392399
container?: string | Node;
393400

394401
/**
395-
* Turn on cleaning JPEG image exif. Method can keep image orientation
402+
* Turn on cleaning JPEG image exif. Method can keep image orientation or color profiles
396403
*/
397404
cleanupImageExif?: boolean | {
398-
keepOrientation: boolean
405+
keepOrientation?: boolean,
406+
keepICCandAPP?: boolean
399407
};
400408
/**
401409
* Customize the text on the cloud authentication screen in Picker.

src/schema/picker.schema.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ export const PickerParamsSchema = {
8989
keepOrientation: {
9090
type: 'boolean',
9191
},
92+
keepICCandAPP: {
93+
type: 'boolean',
94+
},
9295
},
9396
},
9497
],
@@ -386,6 +389,6 @@ export const PickerParamsSchema = {
386389
type: 'object',
387390
additionalProperties: false,
388391
properties: UploadParamsSchema.properties,// manual import upload definitions
389-
}
392+
},
390393
},
391394
};

0 commit comments

Comments
 (0)