widget-web-component 1.0.18-dev.20250923-0249 → 1.0.18-dev.20250929-2309
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/README.md +18 -5
- package/index.js +14 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,20 @@ npm i widget-web-component
|
|
|
17
17
|
|
|
18
18
|
```Lit Example:
|
|
19
19
|
import { LitElement, html } from "lit";
|
|
20
|
-
import
|
|
20
|
+
import { initBelenderComponent } from 'widget-web-component';
|
|
21
|
+
|
|
22
|
+
// 1. Ejecutar la función asíncrona para iniciar Angular y obtener la clase.
|
|
23
|
+
initBelenderComponent()
|
|
24
|
+
.then((BelenderWebComponent) => {
|
|
25
|
+
|
|
26
|
+
// 2. Usar la clase (Function) obtenida para el registro manual.
|
|
27
|
+
customElements.define('belender-web-component', BelenderWebComponent);
|
|
28
|
+
|
|
29
|
+
console.log("✅ Componente registrado exitosamente.");
|
|
30
|
+
})
|
|
31
|
+
.catch(err => {
|
|
32
|
+
console.error("❌ Fallo el registro del Web Component:", err);
|
|
33
|
+
});
|
|
21
34
|
|
|
22
35
|
export class BelenderWidget extends LitElement {
|
|
23
36
|
connectedCallback() {
|
|
@@ -33,11 +46,11 @@ export class BelenderWidget extends LitElement {
|
|
|
33
46
|
}, 100);
|
|
34
47
|
return;
|
|
35
48
|
}
|
|
36
|
-
widget.isWebComponent = true;
|
|
49
|
+
widget.isWebComponent = true; <- required
|
|
37
50
|
widget.flowType = "clavepin";
|
|
38
|
-
widget.userID = "
|
|
39
|
-
widget.packageId = "
|
|
40
|
-
widget.documentNumber = "
|
|
51
|
+
widget.userID = "";
|
|
52
|
+
widget.packageId = "";
|
|
53
|
+
widget.documentNumber = "";
|
|
41
54
|
widget.birthDate = "1990/10/10";
|
|
42
55
|
widget.documentExpirationDate = "2030/1/1";
|
|
43
56
|
|