@levo-so/studio 0.1.102 → 0.1.103
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/{AuthProvider-56TywIOB.js → AuthProvider-C6bvedwF.js} +16 -16
- package/{BillingStep-BTRobf00.js → BillingStep-BA3H9BVu.js} +1 -1
- package/{Button-DTrN8kki.js → Button-CZycqusY.js} +240 -143
- package/Button-lUfKisu8.js +116 -0
- package/CollectionField-xa-jed3_.js +232 -0
- package/{CollectionInput-lHOvWWav.js → CollectionInput-CpNGIXJx.js} +32 -32
- package/DateTimeWidget-DP_nMhqe.js +256 -0
- package/Dialog-IrII0ugb.js +130 -0
- package/{EntryCard-CqZlbw1Z.js → EntryCard-CQpKNX7G.js} +6 -6
- package/{LoginCard-DWLnYJJU.js → LoginCard-Cyvm-y_q.js} +3 -3
- package/{LoginForm-CEUbBeE3.js → LoginForm-_44FtvWg.js} +200 -200
- package/{LoginModal-AWNLO49X.js → LoginModal-Cyw_XKvz.js} +4 -4
- package/{MessageCard-C5ULcfuw.js → MessageCard-C2lNTxFx.js} +2 -2
- package/{MessageFooter-CATwNJJU.js → MessageFooter-59Pziq3i.js} +2 -2
- package/{ModalManager-DQXhkmyC.js → ModalManager-DHkd0Zdb.js} +1 -1
- package/{PendingApprovalCard-BowwZMBu.js → PendingApprovalCard-C8iZjo06.js} +3 -3
- package/PhoneWidget-CxxxDXkz.js +100 -0
- package/{Popover-Du4iigVw.js → Popover-DOvRAGzc.js} +19 -20
- package/PopupRenderer-C7OHYphU-Ct5T6tWM.js +2668 -0
- package/{RichTextWidget-iYdVRBGB.js → RichTextWidget-BqlcssWt.js} +13 -12
- package/RteThemeProvider-Cfepkyer.js +20 -0
- package/{StripePaymentModal-DC-ySB_o.js → StripePaymentModal-DrLMN18M.js} +17 -17
- package/{Toolbar-BHi_B-nE.js → Toolbar-BwxoYWO_.js} +251 -250
- package/Tooltip-NEMQqPyr.js +67 -0
- package/VerifyButton-TNkt-SDu.js +177 -0
- package/bookingCard-BDyuBC6X.js +636 -0
- package/collection.js +8 -8
- package/{dialog-CCWrvmHd.js → dialog-C8-iHixJ.js} +32 -32
- package/dist-CG-pwDW0.js +3188 -0
- package/generateRadiusScale-BpcgkGtN.js +71 -0
- package/getFieldValidations-CSkSV2hW.js +90 -0
- package/index.d.ts +53 -2
- package/index.js +5869 -7655
- package/inlineRteTheme-Ajq9PNpQ.js +9 -0
- package/{nodeAlignment-DoVbjk29.js → nodeAlignment-DKCIjzlR.js} +3 -3
- package/package.json +37 -39
- package/studio.css +1 -1
- package/{useLogin-D2VCOHYI.js → useLogin-B2qE8710.js} +23 -23
- package/{utils-Bh9uGjo1.js → utils-CZLafTgN.js} +1 -1
- package/{widgets-CG5Z_dk7.js → widgets-eu5zXTf-.js} +38 -105
- package/CollectionField-7uXvhxYK.js +0 -274
- package/DateTimeWidget-BHCP5osb.js +0 -255
- package/PhoneWidget-C6uZmrk8.js +0 -100
- package/Tooltip-K_gFzjOa.js +0 -68
- package/VerifyButton-D21AOIX3.js +0 -273
- package/bookingCard--NlgtcJs.js +0 -577
- package/dist-x5VFEnQl.js +0 -3185
- package/getFieldValidations-DZnDgNI0.js +0 -159
- package/inlineRteTheme-Cn_Vqgsm.js +0 -23
- /package/{Beams-DkcjMVZl.js → Beams-DboMUgCv.js} +0 -0
- /package/{Dots-BrEPvoj3.js → Dots-a8xSboDv.js} +0 -0
- /package/{Gradient-B4Er9hym.js → Gradient-NacpoDCM.js} +0 -0
- /package/{Grid-B4XWU9eL.js → Grid-BJQvxnks.js} +0 -0
- /package/{Waves-kW-EBDdJ.js → Waves-DUuT_IFr.js} +0 -0
- /package/{authentication-fXmNYss1.js → authentication-hnV1BI8s.js} +0 -0
- /package/{card-BwNr7kQS.js → card-E2LKF9nT.js} +0 -0
- /package/{theme.cssm-2YTdd8Yh.js → theme.cssm-BXDp-ojp.js} +0 -0
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { createContext as e, useContext as t, useEffect as n, useMemo as r, useRef as i } from "react";
|
|
2
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { FieldInterfaces as o } from "@levo-so/core";
|
|
4
|
-
import { c as s } from "react/compiler-runtime";
|
|
5
|
-
import c from "clsx";
|
|
6
|
-
import { isValidPhoneNumber as l } from "react-phone-number-input";
|
|
7
|
-
import * as u from "yup";
|
|
8
|
-
//#region ../../libraries/levocn/dist/styles/reset.cssm.js
|
|
9
|
-
var d = "_1er5g5a0", f = /* @__PURE__ */ new Set(), p = {}, m = e(null), h = () => {
|
|
10
|
-
let e = s(1), n = t(m);
|
|
11
|
-
if (!n) {
|
|
12
|
-
let t;
|
|
13
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
14
|
-
portalRef: { current: null },
|
|
15
|
-
classes: f,
|
|
16
|
-
overrides: p
|
|
17
|
-
}, e[0] = t) : t = e[0], t;
|
|
18
|
-
}
|
|
19
|
-
return n;
|
|
20
|
-
}, g = ({ children: e, cssReset: o, className: s, style: l, portalToThemeRoot: u, ...h }) => {
|
|
21
|
-
let g = t(m), _ = i(null), v = !g && o !== !1 ? d : "", y = g?.classes ?? f, b = g?.overrides ?? p, x = r(() => {
|
|
22
|
-
let e = s ? s.split(/\s+/).filter(Boolean) : [], t = new Set(y);
|
|
23
|
-
for (let n of e) t.add(n);
|
|
24
|
-
return {
|
|
25
|
-
portalRef: _,
|
|
26
|
-
classes: t,
|
|
27
|
-
overrides: {
|
|
28
|
-
...b,
|
|
29
|
-
...l
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}, [
|
|
33
|
-
y,
|
|
34
|
-
s,
|
|
35
|
-
b,
|
|
36
|
-
l
|
|
37
|
-
]);
|
|
38
|
-
n(() => {
|
|
39
|
-
if (u) return;
|
|
40
|
-
let e = document.createElement("div");
|
|
41
|
-
return document.body.appendChild(e), _.current = e, () => {
|
|
42
|
-
document.body.removeChild(e), _.current = null;
|
|
43
|
-
};
|
|
44
|
-
}, [u]), n(() => {
|
|
45
|
-
if (u) return;
|
|
46
|
-
let e = _.current;
|
|
47
|
-
if (!e) return;
|
|
48
|
-
e.className = c(v, ...x.classes), e.style.cssText = "";
|
|
49
|
-
let t = {
|
|
50
|
-
display: "contents",
|
|
51
|
-
...x.overrides
|
|
52
|
-
};
|
|
53
|
-
for (let [n, r] of Object.entries(t)) r != null && e.style.setProperty(n, String(r));
|
|
54
|
-
}, [
|
|
55
|
-
x.classes,
|
|
56
|
-
x.overrides,
|
|
57
|
-
v,
|
|
58
|
-
u
|
|
59
|
-
]);
|
|
60
|
-
let S = c(v, ...s ? s.split(/\s+/).filter((e) => e && !y.has(e)) : []);
|
|
61
|
-
return /* @__PURE__ */ a(m.Provider, {
|
|
62
|
-
value: x,
|
|
63
|
-
children: /* @__PURE__ */ a("div", {
|
|
64
|
-
...u ? { ref: _ } : {},
|
|
65
|
-
...S ? { className: S } : {},
|
|
66
|
-
style: {
|
|
67
|
-
display: "contents",
|
|
68
|
-
...l
|
|
69
|
-
},
|
|
70
|
-
...h,
|
|
71
|
-
children: e
|
|
72
|
-
})
|
|
73
|
-
});
|
|
74
|
-
}, _ = (e, t) => {
|
|
75
|
-
let n = (e?.label || e?.key || "")?.replace(/_/g, " ");
|
|
76
|
-
if (n?.endsWith("Id") && (n = n?.replace("Id", "")), n.includes(".")) {
|
|
77
|
-
let [e] = n.split(".");
|
|
78
|
-
e && (n = e);
|
|
79
|
-
}
|
|
80
|
-
let r = (t) => {
|
|
81
|
-
let r = t;
|
|
82
|
-
return e.max !== void 0 && e.max !== null && e.max !== "" && (r = r.max(Number(e.max), `The ${n} value is too large (max ${e.max})`)), e.min !== void 0 && e.min !== null && e.min !== "" && (r = r.min(Number(e.min), `The ${n} value is too small (min ${e.min})`)), r;
|
|
83
|
-
}, i;
|
|
84
|
-
switch (e.field_interface) {
|
|
85
|
-
case o.NumberWidget:
|
|
86
|
-
i = r(u.number());
|
|
87
|
-
break;
|
|
88
|
-
case o.ArrayWidget:
|
|
89
|
-
i = r(u.array().typeError("The field must be an array"));
|
|
90
|
-
break;
|
|
91
|
-
case o.RecordWidget:
|
|
92
|
-
i = u.object();
|
|
93
|
-
break;
|
|
94
|
-
case o.EmailWidget:
|
|
95
|
-
i = r(u.string().email("The email address is not valid"));
|
|
96
|
-
break;
|
|
97
|
-
case o.PhoneWidget:
|
|
98
|
-
i = r(u.string().test("phone", "The phone number has incorrect format", (e) => {
|
|
99
|
-
if (e) try {
|
|
100
|
-
return l(e);
|
|
101
|
-
} catch {
|
|
102
|
-
return !1;
|
|
103
|
-
}
|
|
104
|
-
return !0;
|
|
105
|
-
}));
|
|
106
|
-
break;
|
|
107
|
-
case o.URLWidget:
|
|
108
|
-
i = r(u.string().matches(/^(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+(?:\.[a-zA-Z]{2,})+(?:\/[^\s?#]*)?(?:\?[^\s]*)?$/, "The URL is not valid"));
|
|
109
|
-
break;
|
|
110
|
-
case o.ImageUploadWidget:
|
|
111
|
-
case o.FileUploadWidget:
|
|
112
|
-
case o.GeocoderWidget:
|
|
113
|
-
i = u.object();
|
|
114
|
-
break;
|
|
115
|
-
case o.MultiImageUploadWidget:
|
|
116
|
-
case o.MultiFileUploadWidget:
|
|
117
|
-
case o.MultiGeocoderWidget:
|
|
118
|
-
i = u.array().of(u.object());
|
|
119
|
-
break;
|
|
120
|
-
case o.JSONWidget:
|
|
121
|
-
case o.DropdownWidget:
|
|
122
|
-
i = u.string();
|
|
123
|
-
break;
|
|
124
|
-
case o.MultiTextWidget:
|
|
125
|
-
case o.MultiDropdownWidget:
|
|
126
|
-
case o.CheckboxWidget:
|
|
127
|
-
i = u.array().of(u.string());
|
|
128
|
-
break;
|
|
129
|
-
case o.ToggleCheckboxWidget:
|
|
130
|
-
i = u.boolean();
|
|
131
|
-
break;
|
|
132
|
-
case o.CollectionWidget:
|
|
133
|
-
i = e.options.current_have_many_connected ? u.array() : u.object();
|
|
134
|
-
break;
|
|
135
|
-
default:
|
|
136
|
-
i = r(u.string());
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
if (e.options?.validationsPresets && Array.isArray(e.options.validationsPresets)) {
|
|
140
|
-
let t = e.options.validationsPresets;
|
|
141
|
-
(e.field_interface === o.TextWidget || e.field_interface === o.TextareaWidget) && (t.includes("exclude_special_chars") && (i = i.matches(/^[a-zA-Z0-9\s]*$/, "Special characters are not allowed")), t.includes("exclude_numbers") && (i = i.matches(/^[^0-9]*$/, "Numbers are not allowed")));
|
|
142
|
-
}
|
|
143
|
-
return {
|
|
144
|
-
required: {
|
|
145
|
-
value: !!e?.required,
|
|
146
|
-
message: `The ${n} field is required`
|
|
147
|
-
},
|
|
148
|
-
validate: (n) => {
|
|
149
|
-
if (e?.options?.disableValidation || n === "" || n == null) return !0;
|
|
150
|
-
try {
|
|
151
|
-
return i.validateSync(n), t ? t(n) : !0;
|
|
152
|
-
} catch (e) {
|
|
153
|
-
return e instanceof u.ValidationError ? e.message : !0;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
//#endregion
|
|
159
|
-
export { h as n, g as r, _ as t };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./getFieldValidations-DZnDgNI0.js";
|
|
2
|
-
import { n as t, t as n } from "./theme.cssm-2YTdd8Yh.js";
|
|
3
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
import { c as i } from "react/compiler-runtime";
|
|
5
|
-
import a from "clsx";
|
|
6
|
-
//#region ../../libraries/rich-text/dist/styles/content.cssm.js
|
|
7
|
-
var o = "_1b7up5r0", s = "jfprpn0", c = {
|
|
8
|
-
baseSpacing: "var(--oox3jg0)",
|
|
9
|
-
highlight: "var(--oox3jg1)",
|
|
10
|
-
highlightForeground: "var(--oox3jg2)"
|
|
11
|
-
}, l = (t) => {
|
|
12
|
-
let o = i(7), { children: c, theme: l } = t, u = l?.className, d;
|
|
13
|
-
o[0] === u ? d = o[1] : (d = a(n, s, u), o[0] = u, o[1] = d);
|
|
14
|
-
let f = l?.style, p = l?.portalToThemeRoot, m;
|
|
15
|
-
return o[2] !== c || o[3] !== d || o[4] !== f || o[5] !== p ? (m = /* @__PURE__ */ r(e, {
|
|
16
|
-
className: d,
|
|
17
|
-
style: f,
|
|
18
|
-
portalToThemeRoot: p,
|
|
19
|
-
children: c
|
|
20
|
-
}), o[2] = c, o[3] = d, o[4] = f, o[5] = p, o[6] = m) : m = o[6], m;
|
|
21
|
-
}, u = t(c);
|
|
22
|
-
//#endregion
|
|
23
|
-
export { l as n, o as r, u as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|