@squeletteapp/widget 0.3.0 → 0.3.2
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/app-D873kcyq.js +40 -0
- package/dist/{index-B0eQqkb_.js → index-Bs3Vmkhb.js} +2021 -2137
- package/dist/widget.es.js +1 -1
- package/dist/widget.js +4 -4
- package/package.json +1 -1
- package/dist/app-BpPatA6a.js +0 -42
package/package.json
CHANGED
package/dist/app-BpPatA6a.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { s as n, t as m, A as c, y as l, u as d } from "./index-B0eQqkb_.js";
|
|
2
|
-
var p = "/Users/guillaume/projects/packages/widget/src/app/app.tsx";
|
|
3
|
-
function u({
|
|
4
|
-
src: i,
|
|
5
|
-
title: o,
|
|
6
|
-
onLoaded: s,
|
|
7
|
-
onClose: r
|
|
8
|
-
}) {
|
|
9
|
-
const t = m(c(null), "frameRef");
|
|
10
|
-
return l(() => {
|
|
11
|
-
const e = t.current;
|
|
12
|
-
if (!e) return;
|
|
13
|
-
const a = () => {
|
|
14
|
-
e.dataset.ready = "true", s == null || s();
|
|
15
|
-
};
|
|
16
|
-
return e.addEventListener("load", a), () => e.removeEventListener("load", a);
|
|
17
|
-
}, [s]), l(() => {
|
|
18
|
-
const e = (a) => {
|
|
19
|
-
console.log("WidgetFrame received message:", a.data), a.data.type === "close-feedback-widget" && (console.log("WidgetFrame closing widget as requested"), r());
|
|
20
|
-
};
|
|
21
|
-
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
22
|
-
}, [r]), d("iframe", {
|
|
23
|
-
ref: t,
|
|
24
|
-
class: "sq-frame",
|
|
25
|
-
part: "frame",
|
|
26
|
-
src: i,
|
|
27
|
-
title: o,
|
|
28
|
-
loading: "eager",
|
|
29
|
-
allow: "clipboard-write; clipboard-read; fullscreen;",
|
|
30
|
-
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"
|
|
31
|
-
}, void 0, !1, {
|
|
32
|
-
fileName: p,
|
|
33
|
-
lineNumber: 55,
|
|
34
|
-
columnNumber: 5
|
|
35
|
-
}, this);
|
|
36
|
-
}
|
|
37
|
-
const g = n;
|
|
38
|
-
export {
|
|
39
|
-
u as WidgetFrame,
|
|
40
|
-
u as default,
|
|
41
|
-
g as stylesText
|
|
42
|
-
};
|