@levo-so/react 0.1.37 → 0.1.40
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/{Sonner-t6JVKA0a.js → Sonner-5IAqCkBs.js} +12 -9
- package/dist/Tooltip-DcdGb876.js +383 -0
- package/dist/audience/hooks/useBounce.d.ts.map +1 -1
- package/dist/audience/hooks/useCurrentTab.d.ts.map +1 -1
- package/dist/audience/hooks/useDownloadSpeed.d.ts.map +1 -1
- package/dist/audience/hooks/useIdentifyAudience.d.ts.map +1 -1
- package/dist/audience/hooks/useOpenTabs.d.ts.map +1 -1
- package/dist/audience/hooks/usePerformanceMetrics.d.ts.map +1 -1
- package/dist/audience/index.js +1 -1
- package/dist/audience/utils/autocapture.d.ts.map +1 -1
- package/dist/components/Sonner.d.ts.map +1 -1
- package/dist/components/Spinner.d.ts.map +1 -1
- package/dist/components/index.js +20 -21
- package/dist/index.css +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +121 -83
- package/dist/isEmptyObject-B9yh0nbg.js +19 -0
- package/dist/{jsx-runtime-B6kdoens.js → jsx-runtime-D0AQ1Mn7.js} +216 -217
- package/dist/membership/index.d.ts +1 -1
- package/dist/membership/index.d.ts.map +1 -1
- package/dist/membership/index.js +1 -1
- package/dist/{page-BVVduzWl.js → page-DweUjn1K.js} +21 -20
- package/dist/providers/index.js +1 -1
- package/dist/utils/byteToSize.d.ts.map +1 -1
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/errorHandler.d.ts.map +1 -1
- package/dist/utils/index.js +10 -12
- package/dist/utils/isDateObject.d.ts.map +1 -1
- package/dist/utils/isEmptyObject.d.ts.map +1 -1
- package/dist/utils/isNullOrUndefined.d.ts.map +1 -1
- package/dist/utils/isObject.d.ts.map +1 -1
- package/package.json +8 -13
- package/dist/Checbox-sq-atGlJ.js +0 -28
- package/dist/CheckboxWidget-BR6g2qCr.js +0 -124
- package/dist/CollectionFormBuilder-KNHR7ngy.js +0 -1195
- package/dist/CurrencyWidget-XHAkyPjV.js +0 -60
- package/dist/DateTimeWidget-UaUunQAK.js +0 -80
- package/dist/DefaultFormVariant-C8hqkuxx.js +0 -81
- package/dist/DropdownWidget-DvObQQMp.js +0 -115
- package/dist/EmailWidget-7L0S6tat.js +0 -41
- package/dist/FormCaptcha-CgYoGiya.js +0 -187
- package/dist/GeocoderWidget-DfghAiuD.js +0 -68
- package/dist/Input-Vv7mKQFt.js +0 -54
- package/dist/MultiGeocoderWidget-CqwjH855.js +0 -49
- package/dist/MultiTextWidget-BMp9xdSv.js +0 -33
- package/dist/PhoneWidget-DFP4giY9.js +0 -48
- package/dist/RadioWidget-DMWMo2Mj.js +0 -109
- package/dist/RichTextWidget-DOCSDDib.js +0 -310
- package/dist/Spinner-B4CjY8aw.js +0 -411
- package/dist/StepsFormVariant-CUFLCpGE.js +0 -140
- package/dist/SwitchWidget-BjpxXOcZ.js +0 -53
- package/dist/TextWidget-Cgk_TFqD.js +0 -33
- package/dist/TextareaWidget-DGU_Xhrx.js +0 -30
- package/dist/ToggleCheckboxWidget-bhmeasG_.js +0 -44
- package/dist/Tooltip-DoWyn3Ho.js +0 -37
- package/dist/URLWidget-B20QysNc.js +0 -14
- package/dist/UploadWidget-SQ1MLpbO.js +0 -656
- package/dist/byteToSize-BFKZSBu1.js +0 -8
- package/dist/cn-C9QoOYNG.js +0 -6
- package/dist/collection/components/Altcha.d.ts +0 -10
- package/dist/collection/components/Altcha.d.ts.map +0 -1
- package/dist/collection/components/CollectionFormBuilder.d.ts +0 -12
- package/dist/collection/components/CollectionFormBuilder.d.ts.map +0 -1
- package/dist/collection/components/FieldRenderer.d.ts +0 -9
- package/dist/collection/components/FieldRenderer.d.ts.map +0 -1
- package/dist/collection/components/FormCaptcha.d.ts +0 -3
- package/dist/collection/components/FormCaptcha.d.ts.map +0 -1
- package/dist/collection/components/core/AsyncSelectPaginate/AsyncSelectPaginate.d.ts +0 -5
- package/dist/collection/components/core/AsyncSelectPaginate/AsyncSelectPaginate.d.ts.map +0 -1
- package/dist/collection/components/core/Checkbox/Checbox.d.ts +0 -5
- package/dist/collection/components/core/Checkbox/Checbox.d.ts.map +0 -1
- package/dist/collection/components/core/Input/Input.d.ts +0 -11
- package/dist/collection/components/core/Input/Input.d.ts.map +0 -1
- package/dist/collection/components/core/Switch/Switch.d.ts +0 -5
- package/dist/collection/components/core/Switch/Switch.d.ts.map +0 -1
- package/dist/collection/components/renderer/RenderArrayWidget.d.ts +0 -5
- package/dist/collection/components/renderer/RenderArrayWidget.d.ts.map +0 -1
- package/dist/collection/components/renderer/RenderCommonField.d.ts +0 -5
- package/dist/collection/components/renderer/RenderCommonField.d.ts.map +0 -1
- package/dist/collection/components/renderer/RenderRecordWidget.d.ts +0 -4
- package/dist/collection/components/renderer/RenderRecordWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/ErrorMessage.d.ts +0 -6
- package/dist/collection/components/widgets/ErrorMessage.d.ts.map +0 -1
- package/dist/collection/components/widgets/FieldWrapper.d.ts +0 -14
- package/dist/collection/components/widgets/FieldWrapper.d.ts.map +0 -1
- package/dist/collection/components/widgets/FormHelperText.d.ts +0 -6
- package/dist/collection/components/widgets/FormHelperText.d.ts.map +0 -1
- package/dist/collection/components/widgets/FormLabel.d.ts +0 -8
- package/dist/collection/components/widgets/FormLabel.d.ts.map +0 -1
- package/dist/collection/components/widgets/checkboxWidget/CheckboxWidget.d.ts +0 -8
- package/dist/collection/components/widgets/checkboxWidget/CheckboxWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts +0 -7
- package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts.map +0 -1
- package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2O.d.ts +0 -7
- package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2O.d.ts.map +0 -1
- package/dist/collection/components/widgets/collectionWidget/SelectedCollectionItems.d.ts +0 -8
- package/dist/collection/components/widgets/collectionWidget/SelectedCollectionItems.d.ts.map +0 -1
- package/dist/collection/components/widgets/currencyWidget/CurrencyWidget.d.ts +0 -9
- package/dist/collection/components/widgets/currencyWidget/CurrencyWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts +0 -8
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/dropdownWidget/DropdownWidget.d.ts +0 -9
- package/dist/collection/components/widgets/dropdownWidget/DropdownWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts +0 -8
- package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/geocoderWidget/GeocoderWidget.d.ts +0 -8
- package/dist/collection/components/widgets/geocoderWidget/GeocoderWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/multiGeocoderWidget/MultiGeocoderWidget.d.ts +0 -8
- package/dist/collection/components/widgets/multiGeocoderWidget/MultiGeocoderWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/multiTextWidget/MultiTextWidget.d.ts +0 -7
- package/dist/collection/components/widgets/multiTextWidget/MultiTextWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/phoneWidget/PhoneWidget.d.ts +0 -8
- package/dist/collection/components/widgets/phoneWidget/PhoneWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/radioWidget/RadioWidget.d.ts +0 -11
- package/dist/collection/components/widgets/radioWidget/RadioWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/richTextWidget/RichTextWidget.d.ts +0 -12
- package/dist/collection/components/widgets/richTextWidget/RichTextWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/switchWidget/SwitchWidget.d.ts +0 -8
- package/dist/collection/components/widgets/switchWidget/SwitchWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/textWidget/TextWidget.d.ts +0 -9
- package/dist/collection/components/widgets/textWidget/TextWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/textareaWidget/TextareaWidget.d.ts +0 -8
- package/dist/collection/components/widgets/textareaWidget/TextareaWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/toggleCheckboxWidget/ToggleCheckboxWidget.d.ts +0 -8
- package/dist/collection/components/widgets/toggleCheckboxWidget/ToggleCheckboxWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts +0 -11
- package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts.map +0 -1
- package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts +0 -11
- package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts.map +0 -1
- package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts +0 -10
- package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts.map +0 -1
- package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts +0 -13
- package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts.map +0 -1
- package/dist/collection/components/widgets/uploadWidget/ImportFromAssets.d.ts +0 -11
- package/dist/collection/components/widgets/uploadWidget/ImportFromAssets.d.ts.map +0 -1
- package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts +0 -19
- package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts.map +0 -1
- package/dist/collection/components/widgets/urlWidget/URLWidget.d.ts +0 -5
- package/dist/collection/components/widgets/urlWidget/URLWidget.d.ts.map +0 -1
- package/dist/collection/index.d.ts +0 -5
- package/dist/collection/index.d.ts.map +0 -1
- package/dist/collection/index.js +0 -20
- package/dist/collection/lib/FormBuilder.d.ts +0 -8
- package/dist/collection/lib/FormBuilder.d.ts.map +0 -1
- package/dist/collection/lib/SaveDraftValues.d.ts +0 -7
- package/dist/collection/lib/SaveDraftValues.d.ts.map +0 -1
- package/dist/collection/lib/hooks/useLevoForm.d.ts +0 -18
- package/dist/collection/lib/hooks/useLevoForm.d.ts.map +0 -1
- package/dist/collection/lib/provider/LevoFormProvider.d.ts +0 -9
- package/dist/collection/lib/provider/LevoFormProvider.d.ts.map +0 -1
- package/dist/collection/lib/variants/DefaultFormVariant.d.ts +0 -3
- package/dist/collection/lib/variants/DefaultFormVariant.d.ts.map +0 -1
- package/dist/collection/lib/variants/StepsFormVariant.d.ts +0 -4
- package/dist/collection/lib/variants/StepsFormVariant.d.ts.map +0 -1
- package/dist/collection/types/context.d.ts +0 -34
- package/dist/collection/types/context.d.ts.map +0 -1
- package/dist/collection/types/errors.d.ts +0 -7
- package/dist/collection/types/errors.d.ts.map +0 -1
- package/dist/collection/types/formVariant.d.ts +0 -18
- package/dist/collection/types/formVariant.d.ts.map +0 -1
- package/dist/collection/types/forms.d.ts +0 -31
- package/dist/collection/types/forms.d.ts.map +0 -1
- package/dist/collection/types/index.d.ts +0 -4
- package/dist/collection/types/index.d.ts.map +0 -1
- package/dist/collection/types/renderer.d.ts +0 -6
- package/dist/collection/types/renderer.d.ts.map +0 -1
- package/dist/collection/utils/formHelpers.d.ts +0 -48
- package/dist/collection/utils/formHelpers.d.ts.map +0 -1
- package/dist/collection/utils/getFieldValidations.d.ts +0 -6
- package/dist/collection/utils/getFieldValidations.d.ts.map +0 -1
- package/dist/collection/utils/index.d.ts +0 -6
- package/dist/collection/utils/index.d.ts.map +0 -1
- package/dist/collection/utils/schema.d.ts +0 -3
- package/dist/collection/utils/schema.d.ts.map +0 -1
- package/dist/collection/utils/setFormErrors.d.ts +0 -4
- package/dist/collection/utils/setFormErrors.d.ts.map +0 -1
- package/dist/collection/utils/storage.d.ts +0 -11
- package/dist/collection/utils/storage.d.ts.map +0 -1
- package/dist/errorHandler-_34Yv8wA.js +0 -9
- package/dist/isEmptyObject-C5s4GzLE.js +0 -8
- package/dist/libs.css +0 -1
- package/dist/libs.d.ts +0 -1
|
@@ -2,7 +2,7 @@ export declare class LevoOAuth {
|
|
|
2
2
|
static Container: import('react').FC<import('./components/Container').LevoOAuthProps>;
|
|
3
3
|
static Button: import('react').FC<{
|
|
4
4
|
provider: import('@levo-so/core').ILevoOAuthProvider;
|
|
5
|
-
children:
|
|
5
|
+
children: React.ReactNode;
|
|
6
6
|
}>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/membership/index.ts"],"names":[],"mappings":"AAIA,qBAAa,SAAS;IACpB,MAAM,CAAC,SAAS,sEAAa;IAE7B,MAAM,CAAC,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/membership/index.ts"],"names":[],"mappings":"AAIA,qBAAa,SAAS;IACpB,MAAM,CAAC,SAAS,sEAAa;IAE7B,MAAM,CAAC,MAAM;;kBAES,MAAO,SAAS;OAFf;CACxB"}
|
package/dist/membership/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var O = Object.defineProperty;
|
|
3
3
|
var R = (e, t, n) => t in e ? O(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var m = (e, t, n) => R(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
|
-
import { j as p } from "../jsx-runtime-
|
|
5
|
+
import { j as p } from "../jsx-runtime-D0AQ1Mn7.js";
|
|
6
6
|
import j, { useState as g, useEffect as x, useMemo as y, useContext as P, useRef as U, useCallback as W } from "react";
|
|
7
7
|
import { useLevo as _ } from "../providers/index.js";
|
|
8
8
|
const L = j.createContext({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var te = Object.defineProperty;
|
|
3
3
|
var ne = (e, t, o) => t in e ? te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
4
4
|
var U = (e, t, o) => ne(e, typeof t != "symbol" ? t + "" : t, o);
|
|
5
|
-
import { j as oe } from "./jsx-runtime-
|
|
5
|
+
import { j as oe } from "./jsx-runtime-D0AQ1Mn7.js";
|
|
6
6
|
import { useEffect as f, useState as h } from "react";
|
|
7
7
|
import { useInView as re } from "react-intersection-observer";
|
|
8
8
|
import { useLevo as b } from "./providers/index.js";
|
|
@@ -56,9 +56,9 @@ var he = Object.prototype, be = he.toString;
|
|
|
56
56
|
function we(e) {
|
|
57
57
|
return be.call(e);
|
|
58
58
|
}
|
|
59
|
-
var
|
|
59
|
+
var ye = "[object Null]", ve = "[object Undefined]", B = _ ? _.toStringTag : void 0;
|
|
60
60
|
function Se(e) {
|
|
61
|
-
return e == null ? e === void 0 ?
|
|
61
|
+
return e == null ? e === void 0 ? ve : ye : B && B in Object(e) ? pe(e) : we(e);
|
|
62
62
|
}
|
|
63
63
|
function ke(e) {
|
|
64
64
|
return e != null && typeof e == "object";
|
|
@@ -94,7 +94,7 @@ function Re(e, t, o) {
|
|
|
94
94
|
return n = r = void 0, u = g, i = e.apply(T, w), i;
|
|
95
95
|
}
|
|
96
96
|
function N(g) {
|
|
97
|
-
return u = g, c = setTimeout(
|
|
97
|
+
return u = g, c = setTimeout(v, t), l ? p(g) : i;
|
|
98
98
|
}
|
|
99
99
|
function S(g) {
|
|
100
100
|
var w = g - a, T = g - u, F = t - w;
|
|
@@ -104,11 +104,11 @@ function Re(e, t, o) {
|
|
|
104
104
|
var w = g - a, T = g - u;
|
|
105
105
|
return a === void 0 || w >= t || w < 0 || d && T >= s;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function v() {
|
|
108
108
|
var g = D();
|
|
109
109
|
if (k(g))
|
|
110
110
|
return I(g);
|
|
111
|
-
c = setTimeout(
|
|
111
|
+
c = setTimeout(v, S(g));
|
|
112
112
|
}
|
|
113
113
|
function I(g) {
|
|
114
114
|
return c = void 0, m && n ? p(g) : (n = r = void 0, i);
|
|
@@ -125,9 +125,9 @@ function Re(e, t, o) {
|
|
|
125
125
|
if (c === void 0)
|
|
126
126
|
return N(a);
|
|
127
127
|
if (d)
|
|
128
|
-
return clearTimeout(c), c = setTimeout(
|
|
128
|
+
return clearTimeout(c), c = setTimeout(v, t), p(a);
|
|
129
129
|
}
|
|
130
|
-
return c === void 0 && (c = setTimeout(
|
|
130
|
+
return c === void 0 && (c = setTimeout(v, t)), i;
|
|
131
131
|
}
|
|
132
132
|
return R.cancel = O, R.flush = ee, R;
|
|
133
133
|
}
|
|
@@ -138,7 +138,7 @@ const je = () => {
|
|
|
138
138
|
), S = Math.floor(N / 5) * 5;
|
|
139
139
|
if (S <= o)
|
|
140
140
|
return;
|
|
141
|
-
const k = Date.now(),
|
|
141
|
+
const k = Date.now(), v = (k - i) / 1e3, O = Math.abs(d - r) / v;
|
|
142
142
|
u(O > 300 ? "scan" : "read"), s(d), c(k), n(S), t(S);
|
|
143
143
|
}, 250);
|
|
144
144
|
return f(() => (window.addEventListener("scroll", l), () => window.removeEventListener("scroll", l)), []), { depth: e, speedCategory: a };
|
|
@@ -210,6 +210,7 @@ function Be(e) {
|
|
|
210
210
|
case "string":
|
|
211
211
|
t = e == null ? void 0 : e.className;
|
|
212
212
|
break;
|
|
213
|
+
// TODO: when is this ever used?
|
|
213
214
|
case "object":
|
|
214
215
|
t = (e != null && e.className && "baseVal" in (e == null ? void 0 : e.className) ? (e == null ? void 0 : e.className).baseVal : null) || (e == null ? void 0 : e.getAttribute("class")) || "";
|
|
215
216
|
break;
|
|
@@ -218,12 +219,12 @@ function Be(e) {
|
|
|
218
219
|
}
|
|
219
220
|
return Ue(t);
|
|
220
221
|
}
|
|
221
|
-
const
|
|
222
|
+
const y = (e, t = 255) => J(e) ? "" : x(e).split(/(\s+)/).filter((o) => P(o)).join("").replace(/[\r\n]/g, " ").replace(/[ ]+/g, " ").substring(0, t), $ = (e) => {
|
|
222
223
|
let t = "";
|
|
223
224
|
if (Ye(e) && // !isSensitiveElement(el) &&
|
|
224
225
|
(e != null && e.childNodes) && (e != null && e.childNodes.length))
|
|
225
226
|
for (const o of e == null ? void 0 : e.childNodes)
|
|
226
|
-
z(o) && o.textContent && (t +=
|
|
227
|
+
z(o) && o.textContent && (t += y(o.textContent) ?? "");
|
|
227
228
|
return x(t);
|
|
228
229
|
}, He = (e) => {
|
|
229
230
|
var t, o;
|
|
@@ -290,7 +291,7 @@ const qe = ["input", "textarea", "select"], Q = (e) => {
|
|
|
290
291
|
if (P(u.value) && !ze(u.name)) {
|
|
291
292
|
if (u.name === "class")
|
|
292
293
|
return a;
|
|
293
|
-
a[u.name] = typeof (u == null ? void 0 : u.value) == "string" ?
|
|
294
|
+
a[u.name] = typeof (u == null ? void 0 : u.value) == "string" ? y(u.value) : u.value;
|
|
294
295
|
}
|
|
295
296
|
return a;
|
|
296
297
|
},
|
|
@@ -298,13 +299,13 @@ const qe = ["input", "textarea", "select"], Q = (e) => {
|
|
|
298
299
|
);
|
|
299
300
|
if (o.attributes = n, qe.includes(t) || (e == null ? void 0 : e.getAttribute("contenteditable")) === "true") {
|
|
300
301
|
let a;
|
|
301
|
-
e.matches('input[type="checkbox"], input[type="radio"]') ? a = e.checked : e.matches("input, select, textarea") && !e.matches('input[type="password"]') && (a = e.value), a !== void 0 && (o.value = typeof a == "string" || a === null ?
|
|
302
|
+
e.matches('input[type="checkbox"], input[type="radio"]') ? a = e.checked : e.matches("input, select, textarea") && !e.matches('input[type="password"]') && (a = e.value), a !== void 0 && (o.value = typeof a == "string" || a === null ? y(a, 1024) : a);
|
|
302
303
|
let u = "";
|
|
303
|
-
o != null && o.attributes.id && (u =
|
|
304
|
+
o != null && o.attributes.id && (u = y(
|
|
304
305
|
((i = (s = document.querySelector(`label[for="${o == null ? void 0 : o.attributes.id}"]`)) == null ? void 0 : s.textContent) == null ? void 0 : i.trim()) || ""
|
|
305
306
|
));
|
|
306
307
|
const l = e.closest("label");
|
|
307
|
-
u || (u =
|
|
308
|
+
u || (u = y(((c = l == null ? void 0 : l.textContent) == null ? void 0 : c.trim()) || "")), u && (o.label = u);
|
|
308
309
|
}
|
|
309
310
|
return o;
|
|
310
311
|
}, Ze = (e, t) => {
|
|
@@ -315,8 +316,8 @@ const qe = ["input", "textarea", "select"], Q = (e) => {
|
|
|
315
316
|
if (o && (n || We(o, e))) {
|
|
316
317
|
const s = Q(o);
|
|
317
318
|
if (n) {
|
|
318
|
-
const i =
|
|
319
|
-
s.copy_text = i ?? "", s.copy_type = c
|
|
319
|
+
const i = y((r = window == null ? void 0 : window.getSelection()) == null ? void 0 : r.toString()), c = (e == null ? void 0 : e.type) || "clipboard";
|
|
320
|
+
s.copy_text = i ?? "", s.copy_type = c;
|
|
320
321
|
}
|
|
321
322
|
return s;
|
|
322
323
|
}
|
|
@@ -450,7 +451,7 @@ const M = new nt(), ot = () => {
|
|
|
450
451
|
if (n && (n == null ? void 0 : n.rangeCount) > 0) {
|
|
451
452
|
const r = n == null ? void 0 : n.toString();
|
|
452
453
|
r && (e == null || e.track("page.selection", {
|
|
453
|
-
text:
|
|
454
|
+
text: y(r)
|
|
454
455
|
}));
|
|
455
456
|
}
|
|
456
457
|
}, 1e3);
|
|
@@ -562,7 +563,7 @@ const M = new nt(), ot = () => {
|
|
|
562
563
|
state: o
|
|
563
564
|
}));
|
|
564
565
|
}, [o, t == null ? void 0 : t.audience, e]);
|
|
565
|
-
},
|
|
566
|
+
}, yt = ({ id: e, properties: t = {} }) => {
|
|
566
567
|
var i;
|
|
567
568
|
const o = typeof window < "u" ? window.location.href : "", n = b();
|
|
568
569
|
f(() => {
|
|
@@ -622,5 +623,5 @@ const M = new nt(), ot = () => {
|
|
|
622
623
|
export {
|
|
623
624
|
bt as L,
|
|
624
625
|
wt as a,
|
|
625
|
-
|
|
626
|
+
yt as b
|
|
626
627
|
};
|
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as r } from "../jsx-runtime-
|
|
2
|
+
import { j as r } from "../jsx-runtime-D0AQ1Mn7.js";
|
|
3
3
|
import { createContext as n, useContext as s } from "react";
|
|
4
4
|
const o = n(null), v = ({ children: e, client: t }) => /* @__PURE__ */ r.jsx(o.Provider, { value: t, children: e }), x = () => {
|
|
5
5
|
const e = s(o);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byteToSize.d.ts","sourceRoot":"","sources":["../../src/utils/byteToSize.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"byteToSize.d.ts","sourceRoot":"","sources":["../../src/utils/byteToSize.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,iBAAY,WAQrD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/dist/utils/cn.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,eAAO,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,eAAO,MAAM,EAAE,GAAI,GAAG,QAAQ,UAAU,EAAE,WAEzC,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../src/utils/errorHandler.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../src/utils/errorHandler.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,GAAI,OAAO,GAAG,sCAMtC,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
import {
|
|
3
|
-
import { c as i } from "../cn-C9QoOYNG.js";
|
|
4
|
-
import { i as c, a as p, b as f, d as m, c as O } from "../isEmptyObject-C5s4GzLE.js";
|
|
1
|
+
import { b as a, e as r, i as t, a as i, c, f as b, d as o } from "../isEmptyObject-B9yh0nbg.js";
|
|
2
|
+
import { c as d } from "../Sonner-5IAqCkBs.js";
|
|
5
3
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
a as byteToSize,
|
|
5
|
+
d as cn,
|
|
6
|
+
r as errorHandler,
|
|
7
|
+
t as isDateObject,
|
|
8
|
+
i as isEmptyObject,
|
|
9
|
+
c as isNullOrUndefined,
|
|
10
|
+
b as isObject,
|
|
11
|
+
o as isObjectType
|
|
14
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isDateObject.d.ts","sourceRoot":"","sources":["../../src/utils/isDateObject.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"isDateObject.d.ts","sourceRoot":"","sources":["../../src/utils/isDateObject.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,IAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEmptyObject.d.ts","sourceRoot":"","sources":["../../src/utils/isEmptyObject.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG;KAAG,CAAC,IAAI,MAAM,GAAG,MAAM,GAAG,KAAK;CAAE,CAAC;AAE5D,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"isEmptyObject.d.ts","sourceRoot":"","sources":["../../src/utils/isEmptyObject.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG;KAAG,CAAC,IAAI,MAAM,GAAG,MAAM,GAAG,KAAK;CAAE,CAAC;AAE5D,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,WACT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isNullOrUndefined.d.ts","sourceRoot":"","sources":["../../src/utils/isNullOrUndefined.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"isNullOrUndefined.d.ts","sourceRoot":"","sources":["../../src/utils/isNullOrUndefined.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,IAAI,GAAG,SACpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isObject.d.ts","sourceRoot":"","sources":["../../src/utils/isObject.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"isObject.d.ts","sourceRoot":"","sources":["../../src/utils/isObject.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAC5B,CAAC;AAE5B,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,MAAM,EAAE,OAAO,OAAO,KAAG,KAAK,IAAI,CAI/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
4
4
|
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
5
5
|
"description": "Levo suite for React based applications",
|
|
6
6
|
"type": "module",
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
"@types/google-libphonenumber": "7.4.30",
|
|
75
75
|
"@types/google.maps": "3.58.0",
|
|
76
76
|
"@types/lodash-es": "4.17.12",
|
|
77
|
-
"@types/react": "18.3.
|
|
78
|
-
"@types/react-dom": "18.3.
|
|
77
|
+
"@types/react": "18.3.18",
|
|
78
|
+
"@types/react-dom": "18.3.5",
|
|
79
79
|
"@types/validator": "13.12.0",
|
|
80
80
|
"@types/validatorjs": "3.15.5",
|
|
81
|
-
"@vitejs/plugin-react": "4.3.
|
|
81
|
+
"@vitejs/plugin-react": "4.3.4",
|
|
82
82
|
"autoprefixer": "10.4.16",
|
|
83
83
|
"clsx": "2.1.1",
|
|
84
84
|
"postcss": "8.4.41",
|
|
@@ -87,19 +87,18 @@
|
|
|
87
87
|
"tailwind-merge": "2.4.0",
|
|
88
88
|
"tailwindcss": "3.4.1",
|
|
89
89
|
"tailwindcss-animate": "1.0.7",
|
|
90
|
-
"typescript": "5.
|
|
91
|
-
"vite": "
|
|
90
|
+
"typescript": "5.8.2",
|
|
91
|
+
"vite": "6.0.5",
|
|
92
92
|
"vite-plugin-dts": "4.1.0",
|
|
93
|
-
"@levo/
|
|
93
|
+
"@levo/eslint-config": "0.0.0",
|
|
94
94
|
"@levo/tw-config": "0.0.0",
|
|
95
|
-
"@levo/
|
|
95
|
+
"@levo/ts-config": "0.0.0"
|
|
96
96
|
},
|
|
97
97
|
"main": "./dist/index.js",
|
|
98
98
|
"module": "./dist/index.js",
|
|
99
99
|
"types": "./dist/index.d.ts",
|
|
100
100
|
"exports": {
|
|
101
101
|
"./index.css": "./dist/index.css",
|
|
102
|
-
"./libs.css": "./dist/libs.css",
|
|
103
102
|
".": {
|
|
104
103
|
"types": "./dist/index.d.ts",
|
|
105
104
|
"default": "./dist/index.js"
|
|
@@ -116,10 +115,6 @@
|
|
|
116
115
|
"types": "./dist/membership/index.d.ts",
|
|
117
116
|
"default": "./dist/membership/index.js"
|
|
118
117
|
},
|
|
119
|
-
"./collection": {
|
|
120
|
-
"types": "./dist/collection/index.d.ts",
|
|
121
|
-
"default": "./dist/collection/index.js"
|
|
122
|
-
},
|
|
123
118
|
"./utils": {
|
|
124
119
|
"types": "./dist/utils/index.d.ts",
|
|
125
120
|
"default": "./dist/utils/index.js"
|
package/dist/Checbox-sq-atGlJ.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
-
import * as r from "@radix-ui/react-checkbox";
|
|
4
|
-
import { Check as a } from "lucide-react";
|
|
5
|
-
import * as c from "react";
|
|
6
|
-
import { c as o } from "./cn-C9QoOYNG.js";
|
|
7
|
-
const n = c.forwardRef(({ className: s, ...i }, t) => /* @__PURE__ */ e.jsx(
|
|
8
|
-
r.Root,
|
|
9
|
-
{
|
|
10
|
-
ref: t,
|
|
11
|
-
className: o(
|
|
12
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
13
|
-
s
|
|
14
|
-
),
|
|
15
|
-
...i,
|
|
16
|
-
children: /* @__PURE__ */ e.jsx(
|
|
17
|
-
r.Indicator,
|
|
18
|
-
{
|
|
19
|
-
className: o("flex items-center justify-center text-current"),
|
|
20
|
-
children: /* @__PURE__ */ e.jsx(a, { className: "h-4 w-4" })
|
|
21
|
-
}
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
));
|
|
25
|
-
n.displayName = r.Root.displayName;
|
|
26
|
-
export {
|
|
27
|
-
n as C
|
|
28
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
-
import { useState as w, useEffect as B } from "react";
|
|
4
|
-
import { useController as E } from "react-hook-form";
|
|
5
|
-
import { c as C } from "./cn-C9QoOYNG.js";
|
|
6
|
-
import { z as O, A as I, B as x } from "./CollectionFormBuilder-KNHR7ngy.js";
|
|
7
|
-
import { C as g } from "./Checbox-sq-atGlJ.js";
|
|
8
|
-
import { I as S } from "./Input-Vv7mKQFt.js";
|
|
9
|
-
const L = ({ field: i }) => {
|
|
10
|
-
const [o, p] = w(""), [j, m] = w(!1), {
|
|
11
|
-
key: k = "",
|
|
12
|
-
label: b = "",
|
|
13
|
-
helper_text: F = "",
|
|
14
|
-
readonly: y = !1,
|
|
15
|
-
values: n = [],
|
|
16
|
-
options: f = {}
|
|
17
|
-
} = i, {
|
|
18
|
-
field: { name: t, onBlur: d, onChange: l, value: s, ref: N, disabled: u },
|
|
19
|
-
fieldState: { error: h }
|
|
20
|
-
} = E({
|
|
21
|
-
name: k,
|
|
22
|
-
rules: O(i)
|
|
23
|
-
}), A = (r) => {
|
|
24
|
-
let e = Array.isArray(s || null) ? [...s] : [];
|
|
25
|
-
e.includes(r) ? e = e == null ? void 0 : e.filter((c) => c !== r) : e.push(r), l(e);
|
|
26
|
-
}, $ = !!(f != null && f.custom_input);
|
|
27
|
-
return B(() => {
|
|
28
|
-
if ($) {
|
|
29
|
-
let r = !1;
|
|
30
|
-
(s ?? []).forEach((e) => {
|
|
31
|
-
n.includes(e) || (r = !0, p(e));
|
|
32
|
-
}), m(!!r);
|
|
33
|
-
}
|
|
34
|
-
}, [s, n]), /* @__PURE__ */ a.jsxs(
|
|
35
|
-
I,
|
|
36
|
-
{
|
|
37
|
-
error: h == null ? void 0 : h.message,
|
|
38
|
-
helperText: F,
|
|
39
|
-
readOnly: y,
|
|
40
|
-
ref: N,
|
|
41
|
-
children: [
|
|
42
|
-
b && /* @__PURE__ */ a.jsx(x, { htmlFor: t, isRequired: i == null ? void 0 : i.required, children: b }),
|
|
43
|
-
/* @__PURE__ */ a.jsx(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: C(
|
|
47
|
-
"flex w-full flex-col flex-wrap gap-4 pt-1",
|
|
48
|
-
y && "pointer-events-none cursor-not-allowed"
|
|
49
|
-
),
|
|
50
|
-
children: n == null ? void 0 : n.map((r, e) => /* @__PURE__ */ a.jsxs(
|
|
51
|
-
"div",
|
|
52
|
-
{
|
|
53
|
-
className: "flex w-full flex-nowrap items-start gap-2",
|
|
54
|
-
children: [
|
|
55
|
-
/* @__PURE__ */ a.jsx(
|
|
56
|
-
g,
|
|
57
|
-
{
|
|
58
|
-
id: `${r}-${e}`,
|
|
59
|
-
name: t,
|
|
60
|
-
checked: s == null ? void 0 : s.includes(r),
|
|
61
|
-
onCheckedChange: () => A(r),
|
|
62
|
-
onBlur: () => {
|
|
63
|
-
d();
|
|
64
|
-
},
|
|
65
|
-
disabled: u
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ a.jsx(x, { htmlFor: `${r}-${e}`, className: "!mb-0", children: r })
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
`${r}-${e}`
|
|
72
|
-
))
|
|
73
|
-
}
|
|
74
|
-
),
|
|
75
|
-
$ && /* @__PURE__ */ a.jsxs("div", { className: "my-4 flex w-full flex-wrap items-center gap-2", children: [
|
|
76
|
-
/* @__PURE__ */ a.jsxs("div", { className: "flex shrink-0 flex-nowrap gap-2", children: [
|
|
77
|
-
/* @__PURE__ */ a.jsx(
|
|
78
|
-
g,
|
|
79
|
-
{
|
|
80
|
-
name: `${t}-other`,
|
|
81
|
-
id: `${t}-other`,
|
|
82
|
-
disabled: u,
|
|
83
|
-
checked: j,
|
|
84
|
-
onCheckedChange: (r) => {
|
|
85
|
-
var e;
|
|
86
|
-
m(!!r), r ? Array.isArray(s) ? l == null || l([...s, o]) : l == null || l([o]) : l == null || l(
|
|
87
|
-
(e = s ?? []) == null ? void 0 : e.filter((c) => c !== o)
|
|
88
|
-
);
|
|
89
|
-
},
|
|
90
|
-
onBlur: () => {
|
|
91
|
-
d && d();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ a.jsxs(x, { htmlFor: `${t}-other`, className: "!mb-0", children: [
|
|
96
|
-
"Other:",
|
|
97
|
-
" "
|
|
98
|
-
] })
|
|
99
|
-
] }),
|
|
100
|
-
/* @__PURE__ */ a.jsx(
|
|
101
|
-
S,
|
|
102
|
-
{
|
|
103
|
-
name: `other-checkbox-${t}`,
|
|
104
|
-
containerStyles: "max-w-[300px] ml-3",
|
|
105
|
-
value: o,
|
|
106
|
-
onChange: (r) => {
|
|
107
|
-
let e = 0;
|
|
108
|
-
l == null || l(
|
|
109
|
-
s == null ? void 0 : s.map((c) => c === o && !e ? (e = 1, r.target.value) : c)
|
|
110
|
-
), p(r.target.value);
|
|
111
|
-
},
|
|
112
|
-
disabled: !j || u,
|
|
113
|
-
placeholder: "Please specify"
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
] })
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
);
|
|
120
|
-
};
|
|
121
|
-
export {
|
|
122
|
-
L as CheckboxWidget,
|
|
123
|
-
L as default
|
|
124
|
-
};
|