Skip to content

Commit 0721d3e

Browse files
authored
Merge pull request #46 from klippa-app/development
Merge `development` into `master`
2 parents af8d212 + 9baa42a commit 0721d3e

File tree

5 files changed

+49
-5
lines changed

5 files changed

+49
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.10
2+
3+
* Bump iOS to 0.5.3
4+
15
## 0.2.9
26

37
* Bump Android to 2.1.7

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ KlippaScannerSDK.getCameraPermission().then((authStatus) => {
174174

175175
// The warning message when the camera result is too dark.
176176
ImageTooDarkMessage: "The image is too dark",
177+
178+
// What the default color conversion will be (grayscale, original, enhanced).
179+
DefaultImageColor: "original",
180+
181+
// The text inside of the color selection alert dialog button named original.
182+
ImageColorOriginalText: "original",
183+
184+
// The text inside of the color selection alert dialog button named grayscale.
185+
ImageColorGrayscaleText: "grayscale",
186+
187+
// The text inside of the color selection alert dialog button named enhanced.
188+
ImageColorEnhancedText: "enhanced",
177189

178190
// The primary color of the interface, should be a UIColor.
179191
PrimaryColor: null,
@@ -342,7 +354,7 @@ Add or edit the file `android/app/src/main/res/values/strings.xml`, add the foll
342354

343355
### iOS
344356

345-
Use the following properties in the config when running `getCameraResult`: `ImageTooBrightMessage`, `ImageTooDarkMessage`, `DeleteButtonText`, `RetakeButtonText`, `CancelButtonText`, `CancelAndDeleteImagesButtonText`, `CancelConfirmationMessage`, `MoveCloserMessage`, `ImageMovingMessage`, `ImageLimitReachedMessage`, `OrientationWarningMessage`.
357+
Use the following properties in the config when running `getCameraResult`: `ImageTooBrightMessage`, `ImageTooDarkMessage`, `DeleteButtonText`, `RetakeButtonText`, `CancelButtonText`, `CancelAndDeleteImagesButtonText`, `CancelConfirmationMessage`, `MoveCloserMessage`, `ImageMovingMessage`, `ImageLimitReachedMessage`, `OrientationWarningMessage`, `ImageColorOriginalText`, `ImageColorGrayscaleText`, `ImageColorEnhancedText`.
346358

347359

348360
## Important iOS notes

ios/KlippaScannerSDK.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ @implementation KlippaScannerSDK
6262
KlippaScanner.setup.isMultipleDocumentsModeEnabled = [[config objectForKey:@"DefaultMultipleDocuments"] boolValue];
6363
}
6464

65+
if ([config objectForKey:@"DefaultImageColor"]) {
66+
KlippaScanner.setup.defaultImageColor = [config objectForKey:@"DefaultImageColor"];
67+
}
68+
6569
if ([config objectForKey:@"DefaultCrop"]) {
6670
KlippaScanner.setup.isCropEnabled = [[config objectForKey:@"DefaultCrop"] boolValue];
6771
}
@@ -114,6 +118,18 @@ @implementation KlippaScannerSDK
114118
KlippaScanner.setup.cancelButtonText = [config objectForKey:@"CancelButtonText"];
115119
}
116120

121+
if ([config objectForKey:@"ImageColorOriginalText"]) {
122+
KlippaScanner.setup.imageColorOriginalText = [config objectForKey:@"ImageColorOriginalText"];
123+
}
124+
125+
if ([config objectForKey:@"ImageColorGrayscaleText"]) {
126+
KlippaScanner.setup.imageColorGrayscaleText = [config objectForKey:@"ImageColorGrayscaleText"];
127+
}
128+
129+
if ([config objectForKey:@"ImageColorEnhancedText"]) {
130+
KlippaScanner.setup.imageColorEnhancedText = [config objectForKey:@"ImageColorEnhancedText"];
131+
}
132+
117133
if ([config objectForKey:@"CancelAndDeleteImagesButtonText"]) {
118134
KlippaScanner.setup.cancelAndDeleteImagesButtonText = [config objectForKey:@"CancelAndDeleteImagesButtonText"];
119135
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@klippa/react-native-klippa-scanner-sdk",
33
"title": "React Native Klippa Scanner SDK",
4-
"version": "0.2.9",
4+
"version": "0.2.10",
55
"description": "Allows you to take pictures with the Klippa Scanner SDK from React Native.",
66
"main": "index.js",
77
"files": [

types/index.d.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ export class CameraConfig {
117117
// Where to put the image results.
118118
StoragePath?: string;
119119

120-
// What the default color conversion will be (grayscale, original).
121-
DefaultColor?: 'original' | 'grayscale';
120+
// What the default color conversion will be (original, grayscale, enhanced).
121+
DefaultColor?: 'original' | 'grayscale' | 'enhanced';
122122

123123
OutputFilename?: string;
124124

@@ -136,6 +136,15 @@ export class CameraConfig {
136136
// The text inside of the cancel button.
137137
CancelButtonText?: string;
138138

139+
// The text inside of the color selection alert dialog button named original.
140+
ImageColorOriginalText?: string;
141+
142+
// The text inside of the color selection alert dialog button named grayscale.
143+
ImageColorGrayscaleText?: string;
144+
145+
// The text inside of the color selection alert dialog button named enhanced.
146+
ImageColorEnhancedText?: string;
147+
139148
// The text inside of the cancel alert button.
140149
CancelAndDeleteImagesButtonText?: string;
141150

@@ -148,6 +157,9 @@ export class CameraConfig {
148157
// The warning message when the camera result is too dark.
149158
ImageTooDarkMessage?: string;
150159

160+
// What the default color conversion will be (original, grayscale, enhanced).
161+
DefaultImageColor?: 'original' | 'grayscale' | 'enhanced';
162+
151163
// The iOS colors to be configured as RGB Hex. For Android see the readme.
152164

153165
// The primary color of the interface, should be a hex RGB color string.
@@ -200,7 +212,7 @@ export class CameraResult {
200212
// Android only.
201213

202214
// What color option was used, so you can save it as default.
203-
Color?: 'original' | 'grayscale';
215+
Color?: 'original' | 'grayscale' | 'enhanced';
204216
}
205217

206218
export class CameraResultImage {

0 commit comments

Comments
 (0)