@levo-so/react 0.1.18 → 0.1.22
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/{CheckboxWidget-Dp9IAz5Q.js → CheckboxWidget-nJO8XlGD.js} +1 -1
- package/dist/{CollectionFormBuilder-DpTePTDd.js → CollectionFormBuilder-DeGyMEXJ.js} +162 -166
- package/dist/{CurrencyWidget-BfnmQP9S.js → CurrencyWidget-BaMho9Pw.js} +1 -1
- package/dist/{DateTimeWidget-CqjC2iYx.js → DateTimeWidget-VCmX__cv.js} +1 -1
- package/dist/{DefaultFormVariant-CG7WUPV3.js → DefaultFormVariant-fTWKRYI_.js} +7 -7
- package/dist/{DropdownWidget-15oYGYnv.js → DropdownWidget-zAr9v_IY.js} +18 -18
- package/dist/{EmailWidget-mGeLzigY.js → EmailWidget-d3hSxbAS.js} +2 -2
- package/dist/{FormCaptcha-CbLdFHHY.js → FormCaptcha-YeElu90S.js} +16 -16
- package/dist/{GeocoderWidget-BXv8P8Y1.js → GeocoderWidget-BOqaJMm1.js} +2 -2
- package/dist/{MultiGeocoderWidget-eCOGwc1m.js → MultiGeocoderWidget-BTffSkJX.js} +3 -3
- package/dist/{MultiTextWidget-DpT1gLmr.js → MultiTextWidget-L2Eoz2Zv.js} +1 -1
- package/dist/{PhoneWidget-DisB02Ll.js → PhoneWidget-CnDhiovx.js} +1 -1
- package/dist/{RadioWidget-DjWXEZQx.js → RadioWidget-CG01ys9E.js} +2 -2
- package/dist/{RichTextWidget-BnqTjA-v.js → RichTextWidget-DCX1Vpw4.js} +2 -2
- package/dist/{Spinner-Bzu2xCFZ.js → Spinner-BnrQ9e_i.js} +58 -57
- package/dist/{StepsFormVariant-BYzPBT2c.js → StepsFormVariant-eW9O8rik.js} +22 -22
- package/dist/{SwitchWidget-DQ2OHpuP.js → SwitchWidget-CstjQ_nx.js} +1 -1
- package/dist/{TextWidget-qHY9_hkz.js → TextWidget-D4uLMuLS.js} +1 -1
- package/dist/{TextareaWidget-BP5mJR7j.js → TextareaWidget-CHgyJUuy.js} +1 -1
- package/dist/{ToggleCheckboxWidget-CzXZ9l_k.js → ToggleCheckboxWidget-Cfwlrjn7.js} +1 -1
- package/dist/{Tooltip-DEBnSqlo.js → Tooltip-DPzkfrjl.js} +15 -14
- package/dist/{URLWidget-BcZQVzW7.js → URLWidget-CZE68DgS.js} +2 -2
- package/dist/UploadWidget-Dstuk_qo.js +656 -0
- package/dist/audience/components/page.d.ts.map +1 -1
- package/dist/audience/index.js +1 -1
- package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts +11 -0
- package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts.map +1 -0
- package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/components/Dialog.d.ts +3 -1
- package/dist/components/Dialog.d.ts.map +1 -1
- package/dist/components/Sonner.d.ts +1 -1
- package/dist/components/Sonner.d.ts.map +1 -1
- package/dist/components/Tooltip.d.ts +1 -0
- package/dist/components/Tooltip.d.ts.map +1 -1
- package/dist/components/index.js +29 -28
- package/dist/index.css +1 -1
- package/dist/index.js +50 -49
- package/dist/membership/components/Popup.d.ts.map +1 -1
- package/dist/page-sR2SWtb2.js +189 -0
- package/package.json +4 -4
- package/dist/UploadWidget-BNdydN68.js +0 -616
- package/dist/page-BKyDlf0z.js +0 -212
package/dist/page-BKyDlf0z.js
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as R } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
-
import { useEffect as m, useState as S } from "react";
|
|
4
|
-
import { useInView as C } from "react-intersection-observer";
|
|
5
|
-
import { u as O } from "./LevoProvider-BAZy7_tP.js";
|
|
6
|
-
import { usePageLifecycle as H, LifecycleState as I } from "use-page-lifecycle";
|
|
7
|
-
const wt = ({ id: t, properties: r = {} }) => {
|
|
8
|
-
const { audience: e } = O(), { ref: n, inView: s } = C({
|
|
9
|
-
triggerOnce: !0
|
|
10
|
-
});
|
|
11
|
-
return m(() => {
|
|
12
|
-
e != null && e.instance && s && (e == null || e.track("block.view", {
|
|
13
|
-
...r,
|
|
14
|
-
resource: "block",
|
|
15
|
-
identifier: t
|
|
16
|
-
}));
|
|
17
|
-
}, [s]), /* @__PURE__ */ R.jsx("div", { ref: n, style: { height: "0px" } });
|
|
18
|
-
}, Tt = ({ event: t, properties: r }) => {
|
|
19
|
-
const { audience: e } = O();
|
|
20
|
-
return m(() => {
|
|
21
|
-
e != null && e.instance && (e == null || e.track(t, r));
|
|
22
|
-
}, [e == null ? void 0 : e.instance, t, r]), null;
|
|
23
|
-
};
|
|
24
|
-
function k(t) {
|
|
25
|
-
var r = typeof t;
|
|
26
|
-
return t != null && (r == "object" || r == "function");
|
|
27
|
-
}
|
|
28
|
-
var F = typeof global == "object" && global && global.Object === Object && global, _ = typeof self == "object" && self && self.Object === Object && self, W = F || _ || Function("return this")(), j = function() {
|
|
29
|
-
return W.Date.now();
|
|
30
|
-
}, G = /\s/;
|
|
31
|
-
function V(t) {
|
|
32
|
-
for (var r = t.length; r-- && G.test(t.charAt(r)); )
|
|
33
|
-
;
|
|
34
|
-
return r;
|
|
35
|
-
}
|
|
36
|
-
var z = /^\s+/;
|
|
37
|
-
function X(t) {
|
|
38
|
-
return t && t.slice(0, V(t) + 1).replace(z, "");
|
|
39
|
-
}
|
|
40
|
-
var y = W.Symbol, A = Object.prototype, Y = A.hasOwnProperty, Z = A.toString, b = y ? y.toStringTag : void 0;
|
|
41
|
-
function q(t) {
|
|
42
|
-
var r = Y.call(t, b), e = t[b];
|
|
43
|
-
try {
|
|
44
|
-
t[b] = void 0;
|
|
45
|
-
var n = !0;
|
|
46
|
-
} catch {
|
|
47
|
-
}
|
|
48
|
-
var s = Z.call(t);
|
|
49
|
-
return n && (r ? t[b] = e : delete t[b]), s;
|
|
50
|
-
}
|
|
51
|
-
var J = Object.prototype, K = J.toString;
|
|
52
|
-
function Q(t) {
|
|
53
|
-
return K.call(t);
|
|
54
|
-
}
|
|
55
|
-
var tt = "[object Null]", et = "[object Undefined]", P = y ? y.toStringTag : void 0;
|
|
56
|
-
function nt(t) {
|
|
57
|
-
return t == null ? t === void 0 ? et : tt : P && P in Object(t) ? q(t) : Q(t);
|
|
58
|
-
}
|
|
59
|
-
function rt(t) {
|
|
60
|
-
return t != null && typeof t == "object";
|
|
61
|
-
}
|
|
62
|
-
var it = "[object Symbol]";
|
|
63
|
-
function ot(t) {
|
|
64
|
-
return typeof t == "symbol" || rt(t) && nt(t) == it;
|
|
65
|
-
}
|
|
66
|
-
var U = NaN, st = /^[-+]0x[0-9a-f]+$/i, at = /^0b[01]+$/i, ct = /^0o[0-7]+$/i, ft = parseInt;
|
|
67
|
-
function $(t) {
|
|
68
|
-
if (typeof t == "number")
|
|
69
|
-
return t;
|
|
70
|
-
if (ot(t))
|
|
71
|
-
return U;
|
|
72
|
-
if (k(t)) {
|
|
73
|
-
var r = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
74
|
-
t = k(r) ? r + "" : r;
|
|
75
|
-
}
|
|
76
|
-
if (typeof t != "string")
|
|
77
|
-
return t === 0 ? t : +t;
|
|
78
|
-
t = X(t);
|
|
79
|
-
var e = at.test(t);
|
|
80
|
-
return e || ct.test(t) ? ft(t.slice(2), e ? 2 : 8) : st.test(t) ? U : +t;
|
|
81
|
-
}
|
|
82
|
-
var lt = "Expected a function", ut = Math.max, gt = Math.min;
|
|
83
|
-
function dt(t, r, e) {
|
|
84
|
-
var n, s, c, l, i, a, f = 0, h = !1, u = !1, g = !0;
|
|
85
|
-
if (typeof t != "function")
|
|
86
|
-
throw new TypeError(lt);
|
|
87
|
-
r = $(r) || 0, k(e) && (h = !!e.leading, u = "maxWait" in e, c = u ? ut($(e.maxWait) || 0, r) : c, g = "trailing" in e ? !!e.trailing : g);
|
|
88
|
-
function w(o) {
|
|
89
|
-
var d = n, p = s;
|
|
90
|
-
return n = s = void 0, f = o, l = t.apply(p, d), l;
|
|
91
|
-
}
|
|
92
|
-
function D(o) {
|
|
93
|
-
return f = o, i = setTimeout(v, r), h ? w(o) : l;
|
|
94
|
-
}
|
|
95
|
-
function N(o) {
|
|
96
|
-
var d = o - a, p = o - f, L = r - d;
|
|
97
|
-
return u ? gt(L, c - p) : L;
|
|
98
|
-
}
|
|
99
|
-
function x(o) {
|
|
100
|
-
var d = o - a, p = o - f;
|
|
101
|
-
return a === void 0 || d >= r || d < 0 || u && p >= c;
|
|
102
|
-
}
|
|
103
|
-
function v() {
|
|
104
|
-
var o = j();
|
|
105
|
-
if (x(o))
|
|
106
|
-
return E(o);
|
|
107
|
-
i = setTimeout(v, N(o));
|
|
108
|
-
}
|
|
109
|
-
function E(o) {
|
|
110
|
-
return i = void 0, g && n ? w(o) : (n = s = void 0, l);
|
|
111
|
-
}
|
|
112
|
-
function M() {
|
|
113
|
-
i !== void 0 && clearTimeout(i), f = 0, n = a = s = i = void 0;
|
|
114
|
-
}
|
|
115
|
-
function B() {
|
|
116
|
-
return i === void 0 ? l : E(j());
|
|
117
|
-
}
|
|
118
|
-
function T() {
|
|
119
|
-
var o = j(), d = x(o);
|
|
120
|
-
if (n = arguments, s = this, a = o, d) {
|
|
121
|
-
if (i === void 0)
|
|
122
|
-
return D(a);
|
|
123
|
-
if (u)
|
|
124
|
-
return clearTimeout(i), i = setTimeout(v, r), w(a);
|
|
125
|
-
}
|
|
126
|
-
return i === void 0 && (i = setTimeout(v, r)), l;
|
|
127
|
-
}
|
|
128
|
-
return T.cancel = M, T.flush = B, T;
|
|
129
|
-
}
|
|
130
|
-
const mt = () => {
|
|
131
|
-
const [t, r] = S(0), [e, n] = S(0), s = dt((c) => {
|
|
132
|
-
n(c), r(c);
|
|
133
|
-
}, 250);
|
|
134
|
-
return m(() => {
|
|
135
|
-
const c = () => {
|
|
136
|
-
const l = window.scrollY, i = document.documentElement.scrollHeight, a = window.innerHeight, f = Math.round(
|
|
137
|
-
l / (i - a) * 100
|
|
138
|
-
);
|
|
139
|
-
f % 10 === 0 && f > e && s(f);
|
|
140
|
-
};
|
|
141
|
-
return window.addEventListener("scroll", c), () => window.removeEventListener("scroll", c);
|
|
142
|
-
}, [e]), t;
|
|
143
|
-
}, jt = ({ id: t, properties: r = {} }) => {
|
|
144
|
-
var h;
|
|
145
|
-
const { client: e, audience: n } = O(), [s, c] = S(), l = mt(), i = typeof window < "u" ? window.location.href : void 0;
|
|
146
|
-
m(() => {
|
|
147
|
-
i && c(i);
|
|
148
|
-
}, [i]), m(() => {
|
|
149
|
-
n != null && n.instance && (n == null || n.track("page.scroll", {
|
|
150
|
-
resource: "page",
|
|
151
|
-
identifier: t,
|
|
152
|
-
percent: l
|
|
153
|
-
}));
|
|
154
|
-
}, [n == null ? void 0 : n.instance, l]), m(() => {
|
|
155
|
-
const u = () => {
|
|
156
|
-
n == null || n.track("page.bounce", {
|
|
157
|
-
resource: "page",
|
|
158
|
-
identifier: t
|
|
159
|
-
});
|
|
160
|
-
};
|
|
161
|
-
return window && window.addEventListener("beforeunload", u), () => {
|
|
162
|
-
window && window.removeEventListener("beforeunload", u);
|
|
163
|
-
};
|
|
164
|
-
}, [i]);
|
|
165
|
-
const [a] = H();
|
|
166
|
-
if (m(() => {
|
|
167
|
-
a === I.TERMINATED && (n == null || n.track("page.bounce", {
|
|
168
|
-
resource: "page",
|
|
169
|
-
identifier: t,
|
|
170
|
-
state: a
|
|
171
|
-
})), a === I.FROZEN && (n == null || n.track("page.bounce", {
|
|
172
|
-
resource: "page",
|
|
173
|
-
identifier: t,
|
|
174
|
-
state: a
|
|
175
|
-
}));
|
|
176
|
-
}, [a]), !(e != null && e.insightsUrl) || !e.workspace || !e.workspace.startsWith("W"))
|
|
177
|
-
return console.error(
|
|
178
|
-
"[@levo-so/audience] The utility could not be initialized, due to missing workspace, or endpoint for insights."
|
|
179
|
-
), null;
|
|
180
|
-
let f = "";
|
|
181
|
-
try {
|
|
182
|
-
const u = (h = e == null ? void 0 : e.insightsUrl) != null && h.startsWith("/") ? `${window.location.origin}${e.insightsUrl}` : "", g = new URL(
|
|
183
|
-
`${u}/v1/insights/event/hello.gif` || "http://localhost/v1/insights/event/hello.gif"
|
|
184
|
-
);
|
|
185
|
-
g.searchParams.set("workspace", e.workspace), s && (g.searchParams.set("url", s), g.searchParams.set("location", btoa(s))), typeof document < "u" && g.searchParams.set("page_title", document.title), t && g.searchParams.set("identifier", t), f = g.toString();
|
|
186
|
-
} catch {
|
|
187
|
-
}
|
|
188
|
-
return e != null && e.insightsUrl && e.workspace && s ? /* @__PURE__ */ R.jsx(
|
|
189
|
-
"img",
|
|
190
|
-
{
|
|
191
|
-
alt: "",
|
|
192
|
-
src: f,
|
|
193
|
-
style: {
|
|
194
|
-
height: "0px"
|
|
195
|
-
},
|
|
196
|
-
onLoad: () => {
|
|
197
|
-
n != null && n.instance ? n == null || n.instance.page({
|
|
198
|
-
resource: "page",
|
|
199
|
-
identifier: r.id
|
|
200
|
-
}) : n == null || n.initiate({
|
|
201
|
-
...r,
|
|
202
|
-
id: t
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
) : null;
|
|
207
|
-
};
|
|
208
|
-
export {
|
|
209
|
-
wt as L,
|
|
210
|
-
Tt as a,
|
|
211
|
-
jt as b
|
|
212
|
-
};
|