@jaak.ai/stamps 1.0.0-dev.14 → 1.0.0-dev.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/document-detector_19.cjs.entry.js +40 -1
- package/dist/collection/components/document-detector/document-detector.js +42 -3
- package/dist/esm/document-detector_19.entry.js +40 -1
- package/dist/stamps/p-ce933581.entry.js +9 -0
- package/dist/stamps/stamps.esm.js +1 -1
- package/dist/types/components/document-detector/document-detector.d.ts +13 -0
- package/dist/types/components.d.ts +24 -0
- package/package.json +1 -1
- package/dist/stamps/p-e70043eb.entry.js +0 -9
|
@@ -6210,6 +6210,7 @@ const DocumentDetector = class {
|
|
|
6210
6210
|
}
|
|
6211
6211
|
};
|
|
6212
6212
|
}
|
|
6213
|
+
this.init();
|
|
6213
6214
|
}
|
|
6214
6215
|
}
|
|
6215
6216
|
async setUiState(state) {
|
|
@@ -6292,7 +6293,45 @@ const DocumentDetector = class {
|
|
|
6292
6293
|
this.finalTranslations = this.translations
|
|
6293
6294
|
? this.translations
|
|
6294
6295
|
: rawTranslations;
|
|
6295
|
-
|
|
6296
|
+
const customTranslations = {};
|
|
6297
|
+
if (this.config && this.config.translation) {
|
|
6298
|
+
if (this.config.translation.front) {
|
|
6299
|
+
customTranslations["camera-feedback-scan-front"] = this.config.translation.front;
|
|
6300
|
+
}
|
|
6301
|
+
if (this.config.translation.back) {
|
|
6302
|
+
customTranslations["camera-feedback-scan-back"] = this.config.translation.back;
|
|
6303
|
+
}
|
|
6304
|
+
if (this.config.translation.changeSide) {
|
|
6305
|
+
customTranslations["camera-feedback-flip"] = this.config.translation.changeSide;
|
|
6306
|
+
}
|
|
6307
|
+
if (this.config.translation.adjustAngle) {
|
|
6308
|
+
customTranslations["camera-feedback-adjust-angle"] = this.config.translation.adjustAngle;
|
|
6309
|
+
}
|
|
6310
|
+
if (this.config.translation.cameraFeedbackBlur) {
|
|
6311
|
+
customTranslations["camera-feedback-blur"] = this.config.translation.cameraFeedbackBlur;
|
|
6312
|
+
}
|
|
6313
|
+
if (this.config.translation.cameraFeedbackFacePhotoCovered) {
|
|
6314
|
+
customTranslations["camera-feedback-face-photo-covered"] = this.config.translation.cameraFeedbackFacePhotoCovered;
|
|
6315
|
+
}
|
|
6316
|
+
if (this.config.translation.cameraFeedbackGlare) {
|
|
6317
|
+
customTranslations["camera-feedback-glare"] = this.config.translation.cameraFeedbackGlare;
|
|
6318
|
+
}
|
|
6319
|
+
if (this.config.translation.cameraFeedbackWrongSide) {
|
|
6320
|
+
customTranslations["camera-feedback-wrong-side"] = this.config.translation.cameraFeedbackWrongSide;
|
|
6321
|
+
}
|
|
6322
|
+
if (this.config.translation.moveCloser) {
|
|
6323
|
+
customTranslations["camera-feedback-move-closer"] = this.config.translation.moveCloser;
|
|
6324
|
+
}
|
|
6325
|
+
if (this.config.translation.moveFarther) {
|
|
6326
|
+
customTranslations["camera-feedback-move-farther"] = this.config.translation.moveFarther;
|
|
6327
|
+
}
|
|
6328
|
+
}
|
|
6329
|
+
// Merge custom translations with finalTranslations
|
|
6330
|
+
const mergedTranslations = {
|
|
6331
|
+
...(this.finalTranslations || {}),
|
|
6332
|
+
...customTranslations
|
|
6333
|
+
};
|
|
6334
|
+
this.translationService = new TranslationService(mergedTranslations);
|
|
6296
6335
|
this.sdkService = new SdkService();
|
|
6297
6336
|
}
|
|
6298
6337
|
render() {
|
|
@@ -125,6 +125,7 @@ export class DocumentDetector {
|
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
+
this.init();
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
131
|
async setUiState(state) {
|
|
@@ -207,7 +208,45 @@ export class DocumentDetector {
|
|
|
207
208
|
this.finalTranslations = this.translations
|
|
208
209
|
? this.translations
|
|
209
210
|
: rawTranslations;
|
|
210
|
-
|
|
211
|
+
const customTranslations = {};
|
|
212
|
+
if (this.config && this.config.translation) {
|
|
213
|
+
if (this.config.translation.front) {
|
|
214
|
+
customTranslations["camera-feedback-scan-front"] = this.config.translation.front;
|
|
215
|
+
}
|
|
216
|
+
if (this.config.translation.back) {
|
|
217
|
+
customTranslations["camera-feedback-scan-back"] = this.config.translation.back;
|
|
218
|
+
}
|
|
219
|
+
if (this.config.translation.changeSide) {
|
|
220
|
+
customTranslations["camera-feedback-flip"] = this.config.translation.changeSide;
|
|
221
|
+
}
|
|
222
|
+
if (this.config.translation.adjustAngle) {
|
|
223
|
+
customTranslations["camera-feedback-adjust-angle"] = this.config.translation.adjustAngle;
|
|
224
|
+
}
|
|
225
|
+
if (this.config.translation.cameraFeedbackBlur) {
|
|
226
|
+
customTranslations["camera-feedback-blur"] = this.config.translation.cameraFeedbackBlur;
|
|
227
|
+
}
|
|
228
|
+
if (this.config.translation.cameraFeedbackFacePhotoCovered) {
|
|
229
|
+
customTranslations["camera-feedback-face-photo-covered"] = this.config.translation.cameraFeedbackFacePhotoCovered;
|
|
230
|
+
}
|
|
231
|
+
if (this.config.translation.cameraFeedbackGlare) {
|
|
232
|
+
customTranslations["camera-feedback-glare"] = this.config.translation.cameraFeedbackGlare;
|
|
233
|
+
}
|
|
234
|
+
if (this.config.translation.cameraFeedbackWrongSide) {
|
|
235
|
+
customTranslations["camera-feedback-wrong-side"] = this.config.translation.cameraFeedbackWrongSide;
|
|
236
|
+
}
|
|
237
|
+
if (this.config.translation.moveCloser) {
|
|
238
|
+
customTranslations["camera-feedback-move-closer"] = this.config.translation.moveCloser;
|
|
239
|
+
}
|
|
240
|
+
if (this.config.translation.moveFarther) {
|
|
241
|
+
customTranslations["camera-feedback-move-farther"] = this.config.translation.moveFarther;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
// Merge custom translations with finalTranslations
|
|
245
|
+
const mergedTranslations = {
|
|
246
|
+
...(this.finalTranslations || {}),
|
|
247
|
+
...customTranslations
|
|
248
|
+
};
|
|
249
|
+
this.translationService = new TranslationService(mergedTranslations);
|
|
211
250
|
this.sdkService = new SdkService();
|
|
212
251
|
}
|
|
213
252
|
render() {
|
|
@@ -253,8 +292,8 @@ export class DocumentDetector {
|
|
|
253
292
|
"type": "unknown",
|
|
254
293
|
"mutable": true,
|
|
255
294
|
"complexType": {
|
|
256
|
-
"original": "{\n key: string;\n dynamicMode: boolean;\n strictMode: boolean;\n }",
|
|
257
|
-
"resolved": "{ key: string; dynamicMode: boolean; strictMode: boolean; }",
|
|
295
|
+
"original": "{\n key: string;\n dynamicMode: boolean;\n strictMode: boolean;\n translation: {\n front: string;\n back: string;\n changeSide: string;\n adjustAngle: string;\n cameraFeedbackBlur: string;\n cameraFeedbackFacePhotoCovered: string;\n cameraFeedbackGlare: string;\n cameraFeedbackWrongSide: string;\n moveCloser: string;\n moveFarther: string;\n }\n }",
|
|
296
|
+
"resolved": "{ key: string; dynamicMode: boolean; strictMode: boolean; translation: { front: string; back: string; changeSide: string; adjustAngle: string; cameraFeedbackBlur: string; cameraFeedbackFacePhotoCovered: string; cameraFeedbackGlare: string; cameraFeedbackWrongSide: string; moveCloser: string; moveFarther: string; }; }",
|
|
258
297
|
"references": {}
|
|
259
298
|
},
|
|
260
299
|
"required": false,
|
|
@@ -6206,6 +6206,7 @@ const DocumentDetector = class {
|
|
|
6206
6206
|
}
|
|
6207
6207
|
};
|
|
6208
6208
|
}
|
|
6209
|
+
this.init();
|
|
6209
6210
|
}
|
|
6210
6211
|
}
|
|
6211
6212
|
async setUiState(state) {
|
|
@@ -6288,7 +6289,45 @@ const DocumentDetector = class {
|
|
|
6288
6289
|
this.finalTranslations = this.translations
|
|
6289
6290
|
? this.translations
|
|
6290
6291
|
: rawTranslations;
|
|
6291
|
-
|
|
6292
|
+
const customTranslations = {};
|
|
6293
|
+
if (this.config && this.config.translation) {
|
|
6294
|
+
if (this.config.translation.front) {
|
|
6295
|
+
customTranslations["camera-feedback-scan-front"] = this.config.translation.front;
|
|
6296
|
+
}
|
|
6297
|
+
if (this.config.translation.back) {
|
|
6298
|
+
customTranslations["camera-feedback-scan-back"] = this.config.translation.back;
|
|
6299
|
+
}
|
|
6300
|
+
if (this.config.translation.changeSide) {
|
|
6301
|
+
customTranslations["camera-feedback-flip"] = this.config.translation.changeSide;
|
|
6302
|
+
}
|
|
6303
|
+
if (this.config.translation.adjustAngle) {
|
|
6304
|
+
customTranslations["camera-feedback-adjust-angle"] = this.config.translation.adjustAngle;
|
|
6305
|
+
}
|
|
6306
|
+
if (this.config.translation.cameraFeedbackBlur) {
|
|
6307
|
+
customTranslations["camera-feedback-blur"] = this.config.translation.cameraFeedbackBlur;
|
|
6308
|
+
}
|
|
6309
|
+
if (this.config.translation.cameraFeedbackFacePhotoCovered) {
|
|
6310
|
+
customTranslations["camera-feedback-face-photo-covered"] = this.config.translation.cameraFeedbackFacePhotoCovered;
|
|
6311
|
+
}
|
|
6312
|
+
if (this.config.translation.cameraFeedbackGlare) {
|
|
6313
|
+
customTranslations["camera-feedback-glare"] = this.config.translation.cameraFeedbackGlare;
|
|
6314
|
+
}
|
|
6315
|
+
if (this.config.translation.cameraFeedbackWrongSide) {
|
|
6316
|
+
customTranslations["camera-feedback-wrong-side"] = this.config.translation.cameraFeedbackWrongSide;
|
|
6317
|
+
}
|
|
6318
|
+
if (this.config.translation.moveCloser) {
|
|
6319
|
+
customTranslations["camera-feedback-move-closer"] = this.config.translation.moveCloser;
|
|
6320
|
+
}
|
|
6321
|
+
if (this.config.translation.moveFarther) {
|
|
6322
|
+
customTranslations["camera-feedback-move-farther"] = this.config.translation.moveFarther;
|
|
6323
|
+
}
|
|
6324
|
+
}
|
|
6325
|
+
// Merge custom translations with finalTranslations
|
|
6326
|
+
const mergedTranslations = {
|
|
6327
|
+
...(this.finalTranslations || {}),
|
|
6328
|
+
...customTranslations
|
|
6329
|
+
};
|
|
6330
|
+
this.translationService = new TranslationService(mergedTranslations);
|
|
6292
6331
|
this.sdkService = new SdkService();
|
|
6293
6332
|
}
|
|
6294
6333
|
render() {
|