metag-sdk-ionic 1.2.7-native-0.77 → 1.2.7-native-0.78
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.
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import { Component, Input } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { IonicModule } from '@ionic/angular';
|
|
4
|
-
import { Camera, CameraResultType, CameraSource } from '@capacitor/camera';
|
|
4
|
+
import { Camera, CameraResultType, CameraSource, CameraDirection } from '@capacitor/camera';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "@ionic/angular";
|
|
7
|
-
import * as i2 from "@angular/common";
|
|
8
|
-
function NativeCameraSimpleComponent_p_4_Template(rf, ctx) { if (rf & 1) {
|
|
9
|
-
i0.ɵɵelementStart(0, "p");
|
|
10
|
-
i0.ɵɵtext(1);
|
|
11
|
-
i0.ɵɵelementEnd();
|
|
12
|
-
} if (rf & 2) {
|
|
13
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
14
|
-
i0.ɵɵadvance();
|
|
15
|
-
i0.ɵɵtextInterpolate(ctx_r0.text2);
|
|
16
|
-
} }
|
|
17
7
|
export class NativeCameraSimpleComponent {
|
|
18
8
|
constructor(modalController) {
|
|
19
9
|
this.modalController = modalController;
|
|
@@ -21,8 +11,8 @@ export class NativeCameraSimpleComponent {
|
|
|
21
11
|
this.text2 = '';
|
|
22
12
|
}
|
|
23
13
|
ngOnInit() {
|
|
24
|
-
// Auto-abrir la cámara
|
|
25
|
-
setTimeout(() => this.openCamera(),
|
|
14
|
+
// Auto-abrir la cámara inmediatamente
|
|
15
|
+
setTimeout(() => this.openCamera(), 300);
|
|
26
16
|
}
|
|
27
17
|
async openCamera() {
|
|
28
18
|
try {
|
|
@@ -31,7 +21,9 @@ export class NativeCameraSimpleComponent {
|
|
|
31
21
|
allowEditing: false,
|
|
32
22
|
resultType: CameraResultType.DataUrl,
|
|
33
23
|
source: CameraSource.Camera,
|
|
34
|
-
saveToGallery: false
|
|
24
|
+
saveToGallery: false,
|
|
25
|
+
direction: CameraDirection.Rear, // Forzar cámara trasera
|
|
26
|
+
presentationStyle: 'fullscreen'
|
|
35
27
|
});
|
|
36
28
|
if (image.dataUrl) {
|
|
37
29
|
// Convertir dataUrl a File
|
|
@@ -111,46 +103,24 @@ export class NativeCameraSimpleComponent {
|
|
|
111
103
|
}
|
|
112
104
|
}
|
|
113
105
|
static { this.ɵfac = function NativeCameraSimpleComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NativeCameraSimpleComponent)(i0.ɵɵdirectiveInject(i1.ModalController)); }; }
|
|
114
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NativeCameraSimpleComponent, selectors: [["app-native-camera-simple"]], inputs: { text1: "text1", text2: "text2", onTakePicture: "onTakePicture", closeRequested: "closeRequested" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls:
|
|
115
|
-
i0.ɵɵelementStart(0, "ion-content", 0)(1, "div", 1)
|
|
116
|
-
i0.ɵɵ
|
|
117
|
-
i0.ɵɵ
|
|
118
|
-
i0.ɵɵ
|
|
119
|
-
i0.ɵɵelementStart(5, "ion-button", 3);
|
|
120
|
-
i0.ɵɵlistener("click", function NativeCameraSimpleComponent_Template_ion_button_click_5_listener() { return ctx.openCamera(); });
|
|
121
|
-
i0.ɵɵelement(6, "ion-icon", 4);
|
|
122
|
-
i0.ɵɵtext(7, " Abrir C\u00E1mara ");
|
|
123
|
-
i0.ɵɵelementEnd();
|
|
124
|
-
i0.ɵɵelementStart(8, "ion-button", 5);
|
|
125
|
-
i0.ɵɵlistener("click", function NativeCameraSimpleComponent_Template_ion_button_click_8_listener() { return ctx.closeCamera(); });
|
|
126
|
-
i0.ɵɵtext(9, " Cancelar ");
|
|
106
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NativeCameraSimpleComponent, selectors: [["app-native-camera-simple"]], inputs: { text1: "text1", text2: "text2", onTakePicture: "onTakePicture", closeRequested: "closeRequested" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 5, vars: 0, consts: [[1, "native-camera-content"], [1, "camera-loading"], ["name", "crescent"]], template: function NativeCameraSimpleComponent_Template(rf, ctx) { if (rf & 1) {
|
|
107
|
+
i0.ɵɵelementStart(0, "ion-content", 0)(1, "div", 1);
|
|
108
|
+
i0.ɵɵelement(2, "ion-spinner", 2);
|
|
109
|
+
i0.ɵɵelementStart(3, "p");
|
|
110
|
+
i0.ɵɵtext(4, "Abriendo c\u00E1mara...");
|
|
127
111
|
i0.ɵɵelementEnd()()();
|
|
128
|
-
}
|
|
129
|
-
i0.ɵɵadvance(3);
|
|
130
|
-
i0.ɵɵtextInterpolate(ctx.text1);
|
|
131
|
-
i0.ɵɵadvance();
|
|
132
|
-
i0.ɵɵproperty("ngIf", ctx.text2);
|
|
133
|
-
} }, dependencies: [IonicModule, i1.IonButton, i1.IonContent, i1.IonIcon, CommonModule, i2.NgIf], styles: [".native-camera-content[_ngcontent-%COMP%] {\n --background: #000;\n }\n \n .camera-instructions[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 20px;\n text-align: center;\n color: white;\n }\n \n .camera-instructions[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n font-size: 24px;\n margin-bottom: 10px;\n }\n \n .camera-instructions[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 16px;\n margin-bottom: 30px;\n opacity: 0.8;\n }\n \n .camera-instructions[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] {\n margin: 10px 0;\n width: 100%;\n max-width: 300px;\n }"] }); }
|
|
112
|
+
} }, dependencies: [IonicModule, i1.IonContent, i1.IonSpinner, CommonModule], styles: [".native-camera-content[_ngcontent-%COMP%] {\n --background: #000;\n }\n \n .camera-loading[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n color: white;\n }\n \n .camera-loading[_ngcontent-%COMP%] ion-spinner[_ngcontent-%COMP%] {\n transform: scale(1.5);\n margin-bottom: 20px;\n }\n \n .camera-loading[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 16px;\n opacity: 0.8;\n }"] }); }
|
|
134
113
|
}
|
|
135
114
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NativeCameraSimpleComponent, [{
|
|
136
115
|
type: Component,
|
|
137
116
|
args: [{ selector: 'app-native-camera-simple', standalone: true, imports: [IonicModule, CommonModule], template: `
|
|
138
117
|
<ion-content class="native-camera-content">
|
|
139
|
-
<div class="camera-
|
|
140
|
-
<
|
|
141
|
-
<p
|
|
142
|
-
|
|
143
|
-
<ion-button expand="block" (click)="openCamera()" size="large">
|
|
144
|
-
<ion-icon name="camera" slot="start"></ion-icon>
|
|
145
|
-
Abrir Cámara
|
|
146
|
-
</ion-button>
|
|
147
|
-
|
|
148
|
-
<ion-button expand="block" fill="outline" (click)="closeCamera()">
|
|
149
|
-
Cancelar
|
|
150
|
-
</ion-button>
|
|
118
|
+
<div class="camera-loading">
|
|
119
|
+
<ion-spinner name="crescent"></ion-spinner>
|
|
120
|
+
<p>Abriendo cámara...</p>
|
|
151
121
|
</div>
|
|
152
122
|
</ion-content>
|
|
153
|
-
`, styles: ["\n .native-camera-content {\n --background: #000;\n }\n \n .camera-
|
|
123
|
+
`, styles: ["\n .native-camera-content {\n --background: #000;\n }\n \n .camera-loading {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n color: white;\n }\n \n .camera-loading ion-spinner {\n transform: scale(1.5);\n margin-bottom: 20px;\n }\n \n .camera-loading p {\n font-size: 16px;\n opacity: 0.8;\n }\n "] }]
|
|
154
124
|
}], () => [{ type: i1.ModalController }], { text1: [{
|
|
155
125
|
type: Input
|
|
156
126
|
}], text2: [{
|
|
@@ -160,5 +130,5 @@ export class NativeCameraSimpleComponent {
|
|
|
160
130
|
}], closeRequested: [{
|
|
161
131
|
type: Input
|
|
162
132
|
}] }); })();
|
|
163
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NativeCameraSimpleComponent, { className: "NativeCameraSimpleComponent", filePath: "src\\app\\pages\\id-vision\\components\\native-camera-simple\\native-camera-simple.component.ts", lineNumber:
|
|
133
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NativeCameraSimpleComponent, { className: "NativeCameraSimpleComponent", filePath: "src\\app\\pages\\id-vision\\components\\native-camera-simple\\native-camera-simple.component.ts", lineNumber: 43 }); })();
|
|
164
134
|
//# sourceMappingURL=native-camera-simple.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-camera-simple.component.js","sourceRoot":"","sources":["../../../../../../../src/app/pages/id-vision/components/native-camera-simple/native-camera-simple.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAmB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"native-camera-simple.component.js","sourceRoot":"","sources":["../../../../../../../src/app/pages/id-vision/components/native-camera-simple/native-camera-simple.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAmB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,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