@soyio/soyio-widget 2.7.3 → 2.7.4

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/index.js CHANGED
@@ -10,7 +10,7 @@ var g = (e, t, n) => {
10
10
  t instanceof WeakSet ? t.add(e) : t.set(e, n);
11
11
  };
12
12
  var w = (e, t, n) => (L(e, t, "access private method"), n);
13
- async function P(e, t, n) {
13
+ async function H(e, t, n) {
14
14
  if (!e.contentWindow)
15
15
  throw new Error("Invalid iframe: contentWindow is null");
16
16
  const o = await import("./index-yZw-yxuV.js").then((i) => i.i);
@@ -27,7 +27,7 @@ const S = "https://app.soyio.id", b = "https://sandbox.soyio.id", A = [
27
27
  "UNEXPECTED_ERROR",
28
28
  "DENIED_CAMERA_PERMISSION",
29
29
  "REJECTED_SIGNATURE"
30
- ], H = "WIDGET_CLOSED", D = 420, $ = 720, U = 500;
30
+ ], P = "WIDGET_CLOSED", D = 420, $ = 720, U = 500;
31
31
  function O(e) {
32
32
  const t = document.getElementById(e);
33
33
  t && (console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."), t.remove());
@@ -133,6 +133,7 @@ class V {
133
133
  border-radius: 4px;
134
134
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
135
135
  font-size: 14px;
136
+ font-family: Helvetica neue, Helvetica, Arial, sans-serif;
136
137
  max-width: 300px;
137
138
  word-wrap: break-word;
138
139
  pointer-events: none;
@@ -140,7 +141,7 @@ class V {
140
141
  transition: opacity 0.2s ease-in-out;
141
142
  transform: translateX(-50%) translateY(-100%);
142
143
  margin-top: -8px;
143
- `, this.tooltipContent = document.createElement("div"), this.tooltipElement.appendChild(this.tooltipContent);
144
+ `, this.tooltipContent = document.createElement("div"), this.tooltipContent.style.cssText = "text-align: center;", this.tooltipElement.appendChild(this.tooltipContent);
144
145
  const n = document.createElement("div");
145
146
  n.style.cssText = `
146
147
  position: absolute;
@@ -183,7 +184,7 @@ class at {
183
184
  this.iframe && (this.iframe.style.height = `${t}px`);
184
185
  }
185
186
  async handleIframeReady() {
186
- !this.iframe || !this.appearance || await P(this.iframe, this.appearance, this.uniqueIdentifier);
187
+ !this.iframe || !this.appearance || await H(this.iframe, this.appearance, this.uniqueIdentifier);
187
188
  }
188
189
  handleStateChange(t) {
189
190
  const { isSelected: n, actionToken: o } = t;
@@ -272,7 +273,7 @@ function nt() {
272
273
  async function ot(e) {
273
274
  const { onEvent: t } = e, n = await import("./index-yZw-yxuV.js").then((o) => o.i);
274
275
  d && nt(), d = n.on(et, async (o) => {
275
- t(o.data), A.includes(o.data.eventName) ? tt() : o.data.eventName === H && f();
276
+ t(o.data), A.includes(o.data.eventName) ? tt() : o.data.eventName === P && f();
276
277
  });
277
278
  }
278
279
  function it(e) {
@@ -25,6 +25,7 @@
25
25
  border-radius: 4px;
26
26
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
27
27
  font-size: 14px;
28
+ font-family: Helvetica neue, Helvetica, Arial, sans-serif;
28
29
  max-width: 300px;
29
30
  word-wrap: break-word;
30
31
  pointer-events: none;
@@ -32,7 +33,7 @@
32
33
  transition: opacity 0.2s ease-in-out;
33
34
  transform: translateX(-50%) translateY(-100%);
34
35
  margin-top: -8px;
35
- `,this.tooltipContent=document.createElement("div"),this.tooltipElement.appendChild(this.tooltipContent);const m=document.createElement("div");m.style.cssText=`
36
+ `,this.tooltipContent=document.createElement("div"),this.tooltipContent.style.cssText="text-align: center;",this.tooltipElement.appendChild(this.tooltipContent);const m=document.createElement("div");m.style.cssText=`
36
37
  position: absolute;
37
38
  bottom: -4px;
38
39
  left: 50%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soyio/soyio-widget",
3
- "version": "2.7.3",
3
+ "version": "2.7.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",