@tempots/beatui 1.7.5 → 1.9.0
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/{ar-Wr6gMs-M.cjs → ar-CEzAem0F.cjs} +1 -1
- package/dist/{ar-fdUqbCvM.js → ar-CQieaqsq.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/auth-divider-B8yr-E_b.cjs +1 -0
- package/dist/{auth-divider-D9KnNeyF.js → auth-divider-Byh5BWLc.js} +91 -88
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +27 -26
- package/dist/card-BkA7Wvbh.cjs +1 -0
- package/dist/card-DX1DwGbL.js +62 -0
- package/dist/{colors-C2sgnzFH.js → colors-CyMhfbJi.js} +64 -58
- package/dist/{colors-DPCHjRMj.cjs → colors-IXZF9U-s.cjs} +1 -1
- package/dist/control-hqEuMzyI.js +343 -0
- package/dist/control-muup9GF1.cjs +1 -0
- package/dist/custom-validation-BA9iJWl_.cjs +1 -0
- package/dist/custom-validation-BOBoUwHY.js +181 -0
- package/dist/{de-C5-k5Eov.js → de-CBIwvkAH.js} +1 -1
- package/dist/{de-DZqdSEta.cjs → de-DdfxrlT3.cjs} +1 -1
- package/dist/deep-merge-8fwp1z4X.js +1346 -0
- package/dist/deep-merge-VDGE_HQD.cjs +1 -0
- package/dist/duration-input-DmsljXl3.cjs +1 -0
- package/dist/{duration-input-D4V_PHIg.js → duration-input-ZQlcqdXU.js} +32 -31
- package/dist/{editor-toolbar-group-FpOHrmtx.js → editor-toolbar-group-BNTBMJCe.js} +2 -2
- package/dist/{editor-toolbar-group-C_ft_T8D.cjs → editor-toolbar-group-DiMzqYgz.cjs} +1 -1
- package/dist/{es-h6jmoF4X.js → es--9HaEj2D.js} +1 -1
- package/dist/{es-CJgYfRap.cjs → es-DSdljxFJ.cjs} +1 -1
- package/dist/{fa-BuxK837l.js → fa-1Z-akcW7.js} +1 -1
- package/dist/{fa-BQ5PzwNY.cjs → fa-BolmeWRT.cjs} +1 -1
- package/dist/flyout-CuKFh_T7.js +151 -0
- package/dist/flyout-DC_tKaTG.cjs +1 -0
- package/dist/{fr-Bv3TG44U.cjs → fr-CODgUuoZ.cjs} +1 -1
- package/dist/{fr-BwILQ9G2.js → fr-DhHM9rou.js} +1 -1
- package/dist/{he-yC9Sc7JD.js → he-CBamXbGJ.js} +1 -1
- package/dist/{he-5LbvgMCC.cjs → he-Juw-dr28.cjs} +1 -1
- package/dist/{hi-Da7rcCpP.js → hi-DvvcX-Ra.js} +1 -1
- package/dist/{hi-YWhWcG_L.cjs → hi-R749jeg-.cjs} +1 -1
- package/dist/{index-CvU9E9wd.js → index-BfQaT5Jy.js} +104 -104
- package/dist/{index-XogEKwdt.cjs → index-Dv7nPuwA.cjs} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +6713 -9831
- package/dist/{input-container-CyOgiiQD.cjs → input-container-BaWQLWB6.cjs} +1 -1
- package/dist/{input-container-8JFB11xN.js → input-container-DCS5oJ4S.js} +4 -4
- package/dist/{it-BxOIJE45.cjs → it-DT5oRZDH.cjs} +1 -1
- package/dist/{it-Yeklau78.js → it-aV6i8Qxz.js} +1 -1
- package/dist/{ja-Dxj9Q5Yd.js → ja-CuLhGnJX.js} +1 -1
- package/dist/{ja-CNhjK06P.cjs → ja-CwKaCYLB.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +83 -79
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +2 -2
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +74 -72
- package/dist/{ko-DgkqcXTs.cjs → ko-Bucro9ID.cjs} +1 -1
- package/dist/{ko-gn_MsegK.js → ko-D-66BsEX.js} +1 -1
- package/dist/lexical/index.cjs.js +1 -1
- package/dist/lexical/index.es.js +5 -5
- package/dist/menu-BFLFKceF.cjs +1 -0
- package/dist/menu-BO6zqyfq.js +220 -0
- package/dist/modal-6Mq3vS5r.js +309 -0
- package/dist/modal-d77-TMc4.cjs +1 -0
- package/dist/{nl-vHNFtXXb.js → nl-CAny6wvm.js} +1 -1
- package/dist/{nl-Dy9lmbBO.cjs → nl-D7vHpehb.cjs} +1 -1
- package/dist/notice-BNGx86Yg.js +110 -0
- package/dist/notice-iF6zBMq9.cjs +1 -0
- package/dist/{oneof-branch-detection-Q_jxvJIA.js → oneof-branch-detection-Bm17RhC2.js} +27 -26
- package/dist/oneof-branch-detection-DZ4MrfBp.cjs +1 -0
- package/dist/openui/index.cjs.js +9 -0
- package/dist/openui/index.es.js +2174 -0
- package/dist/password-input-Bipt7Wsu.cjs +1 -0
- package/dist/password-input-mkRmrEPq.js +105 -0
- package/dist/{pl-BtYbtsmG.cjs → pl-CSiXoOKT.cjs} +1 -1
- package/dist/{pl-C0UdHla0.js → pl-rmZLgQ_V.js} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +4 -4
- package/dist/{pt-CtNmqQ1X.cjs → pt-CJT-iq4y.cjs} +1 -1
- package/dist/{pt-DGKtfN0d.js → pt-DHnajqAi.js} +1 -1
- package/dist/{ru-CpXYLt-v.js → ru-C_E8OZNE.js} +1 -1
- package/dist/{ru-BaL_NPRU.cjs → ru-G3sr_ctV.cjs} +1 -1
- package/dist/slider-input-SLguFA0d.cjs +1 -0
- package/dist/slider-input-VYAMm7pE.js +285 -0
- package/dist/stepper-24p16Zsv.cjs +1 -0
- package/dist/stepper-TlzbfYWa.js +3222 -0
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +38 -40
- package/dist/tailwind/vite-plugin.cjs.js +14 -12
- package/dist/tailwind/vite-plugin.es.js +317 -246
- package/dist/text-area-BdemKQ_w.cjs +1 -0
- package/dist/text-area-Br83-_PQ.js +431 -0
- package/dist/{text-input-NJypZSnE.js → text-input-ByuxdX8w.js} +5 -5
- package/dist/{text-input-DS5zlXb2.cjs → text-input-MjlUC_9u.cjs} +1 -1
- package/dist/{toolbar-BF2L6WKC.js → toolbar-CEBTTjHh.js} +1 -1
- package/dist/{toolbar-BBwfe8U9.cjs → toolbar-DWawYFFX.cjs} +1 -1
- package/dist/{tr-DwOd87oB.cjs → tr-DcxLHHTC.cjs} +1 -1
- package/dist/{tr-DIFZDFW_.js → tr-bVXwloKC.js} +1 -1
- package/dist/{translations-EwEmHe3v.cjs → translations-D3xqZUTA.cjs} +1 -1
- package/dist/{translations-BCMP-h52.js → translations-DU9wTV1y.js} +20 -19
- package/dist/{translations-5cXBrENb.js → translations-RT_UN8ny.js} +1 -1
- package/dist/{translations-BqWc0ZHz.cjs → translations-qljG2Chq.cjs} +1 -1
- package/dist/types/components/navigation/stepper.d.ts +4 -4
- package/dist/types/openui/index.d.ts +28 -0
- package/dist/types/openui/library/define-component.d.ts +15 -0
- package/dist/types/openui/library/library.d.ts +7 -0
- package/dist/types/openui/library/prompt-generator.d.ts +5 -0
- package/dist/types/openui/library/types.d.ts +33 -0
- package/dist/types/openui/parser/parser.d.ts +8 -0
- package/dist/types/openui/parser/streaming-parser.d.ts +14 -0
- package/dist/types/openui/parser/tokenizer.d.ts +9 -0
- package/dist/types/openui/parser/types.d.ts +46 -0
- package/dist/types/openui/registry/button.d.ts +148 -0
- package/dist/types/openui/registry/data.d.ts +177 -0
- package/dist/types/openui/registry/form.d.ts +65 -0
- package/dist/types/openui/registry/format.d.ts +67 -0
- package/dist/types/openui/registry/index.d.ts +9 -0
- package/dist/types/openui/registry/layout.d.ts +45 -0
- package/dist/types/openui/registry/navigation.d.ts +149 -0
- package/dist/types/openui/registry/overlay.d.ts +56 -0
- package/dist/types/openui/registry/typography.d.ts +17 -0
- package/dist/types/openui/renderer/action-context.d.ts +24 -0
- package/dist/types/openui/renderer/node-resolver.d.ts +9 -0
- package/dist/types/openui/renderer/openui-renderer.d.ts +32 -0
- package/dist/types/openui/renderer/skeleton.d.ts +2 -0
- package/dist/types/openui/streaming/from-fetch.d.ts +7 -0
- package/dist/types/openui/streaming/from-sse.d.ts +7 -0
- package/dist/types/openui/streaming/from-websocket.d.ts +10 -0
- package/dist/types/openui/streaming/types.d.ts +5 -0
- package/dist/types/tailwind/preset.d.ts +25 -4
- package/dist/types/tailwind/vite-plugin.d.ts +17 -5
- package/dist/types/tokens/colors.d.ts +87 -9
- package/dist/types/tokens/index.d.ts +7 -6
- package/dist/{ur-DBst-TXc.js → ur-Dls2qb4V.js} +1 -1
- package/dist/{ur-D9nLchps.cjs → ur-IRQoHh1E.cjs} +1 -1
- package/dist/use-form-BZ8vDYOv.cjs +2 -0
- package/dist/use-form-DsCzINfm.js +750 -0
- package/dist/utils-D3-NApSw.cjs +1 -0
- package/dist/utils-Nbh7yQ73.js +105 -0
- package/dist/{vi-Dg1aiMr5.cjs → vi-Bi9SvVCP.cjs} +1 -1
- package/dist/{vi-DQOJp32U.js → vi-C3mTzj50.js} +1 -1
- package/dist/widget-customization-BV6XB2v_.cjs +1 -0
- package/dist/widget-customization-Bso45ONQ.js +1198 -0
- package/dist/{zh-DPK4HXl2.js → zh-B4JRJBt2.js} +1 -1
- package/dist/{zh-tbwSTbmn.cjs → zh-BMU5rYu1.cjs} +1 -1
- package/package.json +31 -20
- package/dist/auth-divider-CjcrgXmq.cjs +0 -1
- package/dist/custom-validation-7por5nJN.js +0 -488
- package/dist/custom-validation-CLscGHY4.cjs +0 -1
- package/dist/deep-merge-D90SW1Ci.cjs +0 -1
- package/dist/deep-merge-DT2H9AGq.js +0 -1765
- package/dist/duration-input-4AQnQpyo.cjs +0 -1
- package/dist/menu-B60Q9j3-.cjs +0 -1
- package/dist/menu-BkqFGcXg.js +0 -366
- package/dist/notice-CQGJyZ8o.js +0 -211
- package/dist/notice-p2IqXS5-.cjs +0 -1
- package/dist/oneof-branch-detection-xDDDdYRk.cjs +0 -1
- package/dist/use-form-8NnZ-KHk.js +0 -1090
- package/dist/use-form-Dcra7GeE.cjs +0 -2
- package/dist/utils-DmEuG3Np.cjs +0 -1
- package/dist/utils-vUtP6iPG.js +0 -165
- package/dist/widget-customization-BIBva3f-.js +0 -1458
- package/dist/widget-customization-pqmtsraC.cjs +0 -1
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { ProviderNotFoundError as N, makeProviderMark as R, Provide as K, Use as D, html as u, attr as a, computedOf as h, Value as p, Empty as m, When as C, dataAttr as w, aria as x, coalesce as Y, on as z, TextNode as G } from "@tempots/dom";
|
|
2
|
+
import { B as J, I as j } from "./translations-DU9wTV1y.js";
|
|
3
|
+
import { B as Q, a as X } from "./input-container-DCS5oJ4S.js";
|
|
4
|
+
import { L as Z, M as ee } from "./stack-BLMteGTn.js";
|
|
5
|
+
import { s as B } from "./session-id-3KiilioY.js";
|
|
6
|
+
const le = {
|
|
7
|
+
layout: "vertical",
|
|
8
|
+
labelWidth: "7.5rem",
|
|
9
|
+
size: "md",
|
|
10
|
+
gap: "md",
|
|
11
|
+
columns: 1,
|
|
12
|
+
minFieldWidth: "15rem",
|
|
13
|
+
compact: !1
|
|
14
|
+
}, M = {
|
|
15
|
+
mark: R("FieldLayout"),
|
|
16
|
+
create: (l = {}, t) => {
|
|
17
|
+
let e = le;
|
|
18
|
+
try {
|
|
19
|
+
e = t.getProvider(M.mark).value;
|
|
20
|
+
} catch (o) {
|
|
21
|
+
if (!(o instanceof N))
|
|
22
|
+
throw o;
|
|
23
|
+
}
|
|
24
|
+
return { value: {
|
|
25
|
+
layout: l.layout ?? e.layout,
|
|
26
|
+
labelWidth: l.labelWidth ?? e.labelWidth,
|
|
27
|
+
size: l.size ?? e.size,
|
|
28
|
+
gap: l.gap ?? e.gap,
|
|
29
|
+
columns: l.columns ?? e.columns,
|
|
30
|
+
minFieldWidth: l.minFieldWidth ?? e.minFieldWidth,
|
|
31
|
+
compact: l.compact ?? e.compact
|
|
32
|
+
}, dispose: () => {
|
|
33
|
+
} };
|
|
34
|
+
}
|
|
35
|
+
}, te = u.span(a.class("bc-field__required"), " *");
|
|
36
|
+
function ae(l, t) {
|
|
37
|
+
const e = ["bc-field"];
|
|
38
|
+
return l !== "vertical" && e.push(`bc-field--${l}`), t && e.push("bc-field--compact"), e.join(" ");
|
|
39
|
+
}
|
|
40
|
+
function ce(l, t) {
|
|
41
|
+
const e = ["bc-field__label-text"];
|
|
42
|
+
return l ? e.push("bc-field__label-text--error") : t ? e.push("bc-field__label-text--disabled") : e.push("bc-field__label-text--default"), e.join(" ");
|
|
43
|
+
}
|
|
44
|
+
function re(l, t, e) {
|
|
45
|
+
const c = [];
|
|
46
|
+
return (l === "horizontal-fixed" || l === "horizontal-end" || l === "responsive") && t != null && c.push(`--field-label-width: ${t}`), e != null && e > 0 && c.push(`grid-column: span ${e}`), c.length > 0 ? c.join("; ") : void 0;
|
|
47
|
+
}
|
|
48
|
+
function oe(l, t, e) {
|
|
49
|
+
const {
|
|
50
|
+
fullWidth: c = !1,
|
|
51
|
+
required: o,
|
|
52
|
+
label: r,
|
|
53
|
+
labelChildren: i,
|
|
54
|
+
context: d,
|
|
55
|
+
description: b,
|
|
56
|
+
content: _,
|
|
57
|
+
error: k,
|
|
58
|
+
labelFor: v,
|
|
59
|
+
hasError: y,
|
|
60
|
+
disabled: F,
|
|
61
|
+
span: W
|
|
62
|
+
} = t, n = y ?? k != null, L = F ?? !1, g = t.layout ?? l.layout, P = t.labelWidth ?? l.labelWidth, S = t.compact ?? l.compact, $ = B("input-wrapper"), I = b ? `${$}-description` : void 0, E = k != null ? `${$}-error` : void 0, O = h(g)(
|
|
63
|
+
(s) => s !== "vertical" && s !== "responsive"
|
|
64
|
+
), U = h(
|
|
65
|
+
g,
|
|
66
|
+
P,
|
|
67
|
+
W ?? void 0
|
|
68
|
+
)(
|
|
69
|
+
(s, f, A) => re(s, p.get(f), A)
|
|
70
|
+
), V = h(
|
|
71
|
+
g,
|
|
72
|
+
S
|
|
73
|
+
)((s, f) => ae(s, f ?? !1));
|
|
74
|
+
return u.div(
|
|
75
|
+
a.class(V),
|
|
76
|
+
a.class(
|
|
77
|
+
p.map(c, (s) => s ? "bc-field--full-width" : "")
|
|
78
|
+
),
|
|
79
|
+
a.style(U),
|
|
80
|
+
r != null || d != null ? u.div(
|
|
81
|
+
a.class("bc-field__header"),
|
|
82
|
+
u.div(
|
|
83
|
+
a.class("bc-field__label-section"),
|
|
84
|
+
u.label(
|
|
85
|
+
a.class("bc-field__label"),
|
|
86
|
+
v != null ? a.for(v) : m,
|
|
87
|
+
u.span(
|
|
88
|
+
a.class(
|
|
89
|
+
h(
|
|
90
|
+
n,
|
|
91
|
+
L
|
|
92
|
+
)(
|
|
93
|
+
(s, f) => ce(
|
|
94
|
+
s ?? !1,
|
|
95
|
+
f ?? !1
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
),
|
|
99
|
+
r
|
|
100
|
+
),
|
|
101
|
+
r != null && o ? te : m
|
|
102
|
+
),
|
|
103
|
+
// Show description under label when horizontal
|
|
104
|
+
C(
|
|
105
|
+
h(
|
|
106
|
+
O,
|
|
107
|
+
b
|
|
108
|
+
)((s, f) => s && f != null),
|
|
109
|
+
() => u.div(
|
|
110
|
+
a.class(
|
|
111
|
+
"bc-field__description bc-field__description--under-label"
|
|
112
|
+
),
|
|
113
|
+
a.id(I),
|
|
114
|
+
b
|
|
115
|
+
)
|
|
116
|
+
)
|
|
117
|
+
),
|
|
118
|
+
d != null ? Z(d) : m,
|
|
119
|
+
i
|
|
120
|
+
) : m,
|
|
121
|
+
u.div(
|
|
122
|
+
a.class("bc-field__content"),
|
|
123
|
+
// Add data attributes to help inputs inherit accessibility information
|
|
124
|
+
[I, E].filter(Boolean).length > 0 ? w(
|
|
125
|
+
"describedby",
|
|
126
|
+
[I, E].filter(Boolean).join(" ")
|
|
127
|
+
) : m,
|
|
128
|
+
o ? w("required", "true") : m,
|
|
129
|
+
C(n, () => w("invalid", "true")),
|
|
130
|
+
_
|
|
131
|
+
),
|
|
132
|
+
// Show description at bottom only when not horizontal
|
|
133
|
+
C(
|
|
134
|
+
h(O, b)((s, f) => !s && f != null),
|
|
135
|
+
() => u.div(
|
|
136
|
+
a.class("bc-field__description"),
|
|
137
|
+
a.id(I),
|
|
138
|
+
b
|
|
139
|
+
)
|
|
140
|
+
),
|
|
141
|
+
C(
|
|
142
|
+
n,
|
|
143
|
+
() => u.div(
|
|
144
|
+
a.class("bc-field__error"),
|
|
145
|
+
a.id(E),
|
|
146
|
+
x.live("polite"),
|
|
147
|
+
// Announce errors to screen readers
|
|
148
|
+
a.role("alert"),
|
|
149
|
+
// Mark as alert for immediate attention
|
|
150
|
+
k
|
|
151
|
+
)
|
|
152
|
+
),
|
|
153
|
+
...e
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
const q = (l, ...t) => {
|
|
157
|
+
const e = {};
|
|
158
|
+
return l.layout !== void 0 && (e.layout = l.layout), l.labelWidth !== void 0 && (e.labelWidth = l.labelWidth), l.compact !== void 0 && (e.compact = l.compact), K(
|
|
159
|
+
M,
|
|
160
|
+
e,
|
|
161
|
+
() => D(M, (c) => oe(c, l, t))
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
function me({
|
|
165
|
+
size: l = "sm",
|
|
166
|
+
icon: t = "line-md:close",
|
|
167
|
+
disabled: e,
|
|
168
|
+
roundedness: c = "full",
|
|
169
|
+
color: o = "base",
|
|
170
|
+
onClick: r,
|
|
171
|
+
label: i
|
|
172
|
+
}, ...d) {
|
|
173
|
+
return D(J, (b) => {
|
|
174
|
+
const _ = Y(i, b.$.closeModal);
|
|
175
|
+
return Q(
|
|
176
|
+
{
|
|
177
|
+
variant: "text",
|
|
178
|
+
size: l,
|
|
179
|
+
roundedness: c,
|
|
180
|
+
disabled: e,
|
|
181
|
+
color: o,
|
|
182
|
+
onClick: r
|
|
183
|
+
},
|
|
184
|
+
a.title(_),
|
|
185
|
+
x.label(_),
|
|
186
|
+
...d,
|
|
187
|
+
j({ icon: t, size: l ?? "sm" })
|
|
188
|
+
);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
const pe = (l) => {
|
|
192
|
+
const {
|
|
193
|
+
value: t,
|
|
194
|
+
onBlur: e,
|
|
195
|
+
onChange: c,
|
|
196
|
+
onInput: o,
|
|
197
|
+
placeholder: r,
|
|
198
|
+
disabled: i,
|
|
199
|
+
id: d,
|
|
200
|
+
activeIcon: b,
|
|
201
|
+
inactiveIcon: _,
|
|
202
|
+
size: k = "md"
|
|
203
|
+
} = l, v = d ?? B("checkbox"), y = `${v}-label`, F = () => {
|
|
204
|
+
if (p.get(i ?? !1)) return;
|
|
205
|
+
const n = p.get(t);
|
|
206
|
+
c?.(!n), o?.(!n);
|
|
207
|
+
}, W = (n) => {
|
|
208
|
+
p.get(i ?? !1) || (n.key === " " || n.key === "Enter") && (n.preventDefault(), F());
|
|
209
|
+
};
|
|
210
|
+
return X(
|
|
211
|
+
{
|
|
212
|
+
baseContainer: !0,
|
|
213
|
+
growInput: !1,
|
|
214
|
+
...l,
|
|
215
|
+
input: u.span(
|
|
216
|
+
a.class("bc-checkbox-input"),
|
|
217
|
+
u.span(
|
|
218
|
+
a.class("bc-checkbox-input__checkbox"),
|
|
219
|
+
a.class(
|
|
220
|
+
p.map(
|
|
221
|
+
t,
|
|
222
|
+
(n) => n ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
|
|
223
|
+
)
|
|
224
|
+
),
|
|
225
|
+
a.class(
|
|
226
|
+
p.map(
|
|
227
|
+
i ?? !1,
|
|
228
|
+
(n) => n ? "bc-checkbox-input__checkbox--disabled" : ""
|
|
229
|
+
)
|
|
230
|
+
),
|
|
231
|
+
a.id(v),
|
|
232
|
+
a.role("checkbox"),
|
|
233
|
+
a.tabindex(
|
|
234
|
+
p.map(
|
|
235
|
+
i ?? !1,
|
|
236
|
+
(n) => n ? -1 : 0
|
|
237
|
+
)
|
|
238
|
+
),
|
|
239
|
+
x.checked(t),
|
|
240
|
+
x.disabled(i),
|
|
241
|
+
r != null ? x.labelledby(y) : m,
|
|
242
|
+
z.keydown(W),
|
|
243
|
+
e != null ? z.blur(e) : m,
|
|
244
|
+
j({
|
|
245
|
+
icon: h(
|
|
246
|
+
t,
|
|
247
|
+
b,
|
|
248
|
+
_
|
|
249
|
+
)(
|
|
250
|
+
(n, L, g) => n ? L ?? "ri:checkbox-fill" : g ?? "mdi:checkbox-blank-outline"
|
|
251
|
+
),
|
|
252
|
+
accessibility: "decorative",
|
|
253
|
+
size: k
|
|
254
|
+
})
|
|
255
|
+
),
|
|
256
|
+
r != null ? u.label(
|
|
257
|
+
a.class("bc-checkbox-input__label"),
|
|
258
|
+
a.id(y),
|
|
259
|
+
a.for(v),
|
|
260
|
+
ee(r)
|
|
261
|
+
) : m
|
|
262
|
+
)
|
|
263
|
+
},
|
|
264
|
+
z.click(F)
|
|
265
|
+
);
|
|
266
|
+
}, ne = (
|
|
267
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
268
|
+
((l, t) => () => {
|
|
269
|
+
l.markTouched(), t?.();
|
|
270
|
+
})
|
|
271
|
+
), T = (l, t) => (e) => {
|
|
272
|
+
l.change(e), t?.(e);
|
|
273
|
+
};
|
|
274
|
+
function H(l, t) {
|
|
275
|
+
const { controller: e, onBlur: c, onChange: o, id: r, triggerOn: i, ...d } = t;
|
|
276
|
+
return l({
|
|
277
|
+
id: r ?? e.name,
|
|
278
|
+
disabled: e.disabled,
|
|
279
|
+
value: e.signal,
|
|
280
|
+
hasError: e.errorVisible,
|
|
281
|
+
name: e.name,
|
|
282
|
+
...d,
|
|
283
|
+
onInput: i === "input" ? T(e, o) : void 0,
|
|
284
|
+
onChange: i !== "input" ? T(e, o) : void 0,
|
|
285
|
+
onBlur: ne(e, c)
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
function he(l, { id: t, labelFor: e, ...c }, ...o) {
|
|
289
|
+
const r = t ?? c.controller.name ?? B("control"), i = e ?? r;
|
|
290
|
+
return q(
|
|
291
|
+
{
|
|
292
|
+
...c,
|
|
293
|
+
hasError: c.controller.errorVisible,
|
|
294
|
+
// TODO: Remove Primitive annotation once @tempots/dom TextNode is generic
|
|
295
|
+
error: G(c.controller.error.map((d) => d ?? "")),
|
|
296
|
+
labelFor: i,
|
|
297
|
+
content: H(
|
|
298
|
+
(d) => l({ ...d, id: r }),
|
|
299
|
+
c
|
|
300
|
+
)
|
|
301
|
+
},
|
|
302
|
+
...o
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
function ie(l, t) {
|
|
306
|
+
const { toInput: e, fromInput: c, controller: o, ...r } = t, i = o.transform(e, c);
|
|
307
|
+
return H(l, {
|
|
308
|
+
...r,
|
|
309
|
+
controller: i
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
function _e(l, {
|
|
313
|
+
id: t,
|
|
314
|
+
labelFor: e,
|
|
315
|
+
...c
|
|
316
|
+
}, ...o) {
|
|
317
|
+
const r = t ?? c.controller.name ?? B("control");
|
|
318
|
+
return q(
|
|
319
|
+
{
|
|
320
|
+
...c,
|
|
321
|
+
labelFor: e ?? r,
|
|
322
|
+
content: ie(l, {
|
|
323
|
+
...c,
|
|
324
|
+
id: r
|
|
325
|
+
})
|
|
326
|
+
},
|
|
327
|
+
...o
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
export {
|
|
331
|
+
H as B,
|
|
332
|
+
me as C,
|
|
333
|
+
q as F,
|
|
334
|
+
_e as M,
|
|
335
|
+
te as R,
|
|
336
|
+
T as a,
|
|
337
|
+
pe as b,
|
|
338
|
+
he as c,
|
|
339
|
+
M as d,
|
|
340
|
+
ie as e,
|
|
341
|
+
le as f,
|
|
342
|
+
ne as m
|
|
343
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("@tempots/dom"),F=require("./translations-D3xqZUTA.cjs"),V=require("./input-container-BaWQLWB6.cjs"),q=require("./stack-dwLevGa2.cjs"),g=require("./session-id-B5lJMzbB.cjs"),w={layout:"vertical",labelWidth:"7.5rem",size:"md",gap:"md",columns:1,minFieldWidth:"15rem",compact:!1},y={mark:e.makeProviderMark("FieldLayout"),create:(l={},a)=>{let t=w;try{t=a.getProvider(y.mark).value}catch(o){if(!(o instanceof e.ProviderNotFoundError))throw o}return{value:{layout:l.layout??t.layout,labelWidth:l.labelWidth??t.labelWidth,size:l.size??t.size,gap:l.gap??t.gap,columns:l.columns??t.columns,minFieldWidth:l.minFieldWidth??t.minFieldWidth,compact:l.compact??t.compact},dispose:()=>{}}}},z=e.html.span(e.attr.class("bc-field__required")," *");function S(l,a){const t=["bc-field"];return l!=="vertical"&&t.push(`bc-field--${l}`),a&&t.push("bc-field--compact"),t.join(" ")}function j(l,a){const t=["bc-field__label-text"];return l?t.push("bc-field__label-text--error"):a?t.push("bc-field__label-text--disabled"):t.push("bc-field__label-text--default"),t.join(" ")}function P(l,a,t){const r=[];return(l==="horizontal-fixed"||l==="horizontal-end"||l==="responsive")&&a!=null&&r.push(`--field-label-width: ${a}`),t!=null&&t>0&&r.push(`grid-column: span ${t}`),r.length>0?r.join("; "):void 0}function N(l,a,t){const{fullWidth:r=!1,required:o,label:n,labelChildren:i,context:d,description:u,content:m,error:p,labelFor:h,hasError:_,disabled:k,span:C}=a,c=_??p!=null,I=k??!1,f=a.layout??l.layout,D=a.labelWidth??l.labelWidth,M=a.compact??l.compact,O=g.sessionId("input-wrapper"),v=u?`${O}-description`:void 0,x=p!=null?`${O}-error`:void 0,L=e.computedOf(f)(s=>s!=="vertical"&&s!=="responsive"),U=e.computedOf(f,D,C??void 0)((s,b,H)=>P(s,e.Value.get(b),H)),$=e.computedOf(f,M)((s,b)=>S(s,b??!1));return e.html.div(e.attr.class($),e.attr.class(e.Value.map(r,s=>s?"bc-field--full-width":"")),e.attr.style(U),n!=null||d!=null?e.html.div(e.attr.class("bc-field__header"),e.html.div(e.attr.class("bc-field__label-section"),e.html.label(e.attr.class("bc-field__label"),h!=null?e.attr.for(h):e.Empty,e.html.span(e.attr.class(e.computedOf(c,I)((s,b)=>j(s??!1,b??!1))),n),n!=null&&o?z:e.Empty),e.When(e.computedOf(L,u)((s,b)=>s&&b!=null),()=>e.html.div(e.attr.class("bc-field__description bc-field__description--under-label"),e.attr.id(v),u))),d!=null?q.Label(d):e.Empty,i):e.Empty,e.html.div(e.attr.class("bc-field__content"),[v,x].filter(Boolean).length>0?e.dataAttr("describedby",[v,x].filter(Boolean).join(" ")):e.Empty,o?e.dataAttr("required","true"):e.Empty,e.When(c,()=>e.dataAttr("invalid","true")),m),e.When(e.computedOf(L,u)((s,b)=>!s&&b!=null),()=>e.html.div(e.attr.class("bc-field__description"),e.attr.id(v),u)),e.When(c,()=>e.html.div(e.attr.class("bc-field__error"),e.attr.id(x),e.aria.live("polite"),e.attr.role("alert"),p)),...t)}const W=(l,...a)=>{const t={};return l.layout!==void 0&&(t.layout=l.layout),l.labelWidth!==void 0&&(t.labelWidth=l.labelWidth),l.compact!==void 0&&(t.compact=l.compact),e.Provide(y,t,()=>e.Use(y,r=>N(r,l,a)))};function R({size:l="sm",icon:a="line-md:close",disabled:t,roundedness:r="full",color:o="base",onClick:n,label:i},...d){return e.Use(F.BeatUII18n,u=>{const m=e.coalesce(i,u.$.closeModal);return V.Button({variant:"text",size:l,roundedness:r,disabled:t,color:o,onClick:n},e.attr.title(m),e.aria.label(m),...d,F.Icon({icon:a,size:l??"sm"}))})}const Y=l=>{const{value:a,onBlur:t,onChange:r,onInput:o,placeholder:n,disabled:i,id:d,activeIcon:u,inactiveIcon:m,size:p="md"}=l,h=d??g.sessionId("checkbox"),_=`${h}-label`,k=()=>{if(e.Value.get(i??!1))return;const c=e.Value.get(a);r?.(!c),o?.(!c)},C=c=>{e.Value.get(i??!1)||(c.key===" "||c.key==="Enter")&&(c.preventDefault(),k())};return V.InputContainer({baseContainer:!0,growInput:!1,...l,input:e.html.span(e.attr.class("bc-checkbox-input"),e.html.span(e.attr.class("bc-checkbox-input__checkbox"),e.attr.class(e.Value.map(a,c=>c?"bc-checkbox-input__checkbox--checked":"bc-checkbox-input__checkbox--unchecked")),e.attr.class(e.Value.map(i??!1,c=>c?"bc-checkbox-input__checkbox--disabled":"")),e.attr.id(h),e.attr.role("checkbox"),e.attr.tabindex(e.Value.map(i??!1,c=>c?-1:0)),e.aria.checked(a),e.aria.disabled(i),n!=null?e.aria.labelledby(_):e.Empty,e.on.keydown(C),t!=null?e.on.blur(t):e.Empty,F.Icon({icon:e.computedOf(a,u,m)((c,I,f)=>c?I??"ri:checkbox-fill":f??"mdi:checkbox-blank-outline"),accessibility:"decorative",size:p})),n!=null?e.html.label(e.attr.class("bc-checkbox-input__label"),e.attr.id(_),e.attr.for(h),q.MutedLabel(n)):e.Empty)},e.on.click(k))},T=((l,a)=>()=>{l.markTouched(),a?.()}),E=(l,a)=>t=>{l.change(t),a?.(t)};function B(l,a){const{controller:t,onBlur:r,onChange:o,id:n,triggerOn:i,...d}=a;return l({id:n??t.name,disabled:t.disabled,value:t.signal,hasError:t.errorVisible,name:t.name,...d,onInput:i==="input"?E(t,o):void 0,onChange:i!=="input"?E(t,o):void 0,onBlur:T(t,r)})}function K(l,{id:a,labelFor:t,...r},...o){const n=a??r.controller.name??g.sessionId("control"),i=t??n;return W({...r,hasError:r.controller.errorVisible,error:e.TextNode(r.controller.error.map(d=>d??"")),labelFor:i,content:B(d=>l({...d,id:n}),r)},...o)}function A(l,a){const{toInput:t,fromInput:r,controller:o,...n}=a,i=o.transform(t,r);return B(l,{...n,controller:i})}function G(l,{id:a,labelFor:t,...r},...o){const n=a??r.controller.name??g.sessionId("control");return W({...r,labelFor:t??n,content:A(l,{...r,id:n})},...o)}exports.BaseControl=B;exports.BaseMappedControl=A;exports.CheckboxInput=Y;exports.CloseButton=R;exports.Control=K;exports.FIELD_LAYOUT_DEFAULTS=w;exports.Field=W;exports.FieldLayout=y;exports.MappedControl=G;exports.RequiredSymbol=z;exports.makeOnBlurHandler=T;exports.makeOnChangeHandler=E;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function m(o){return{"~standard":{version:1,vendor:"beatui-custom",validate:s=>{const t=o.validate(s);return t.success?{value:t.data}:{issues:t.errors.map(a=>({message:a.message,path:a.path}))}},types:void 0},safeParse:s=>{const t=o.validate(s);return t.success?{success:!0,data:t.data}:{success:!1,error:{errors:t.errors.map(a=>({message:a.message,path:a.path?.map(r=>typeof r=="object"&&"key"in r?r.key.toString():r.toString())||[]}))}}}}}class h{optional(){return new f(this)}default(e){return new g(this,e)}schema(){return m(this)}}class i extends h{minLength;maxLength;pattern;customValidations=[];validate(e){if(typeof e!="string")return{success:!1,errors:[{message:"Expected string"}]};const s=[];this.minLength!==void 0&&e.length<this.minLength&&s.push({message:`Must be at least ${this.minLength} characters`}),this.maxLength!==void 0&&e.length>this.maxLength&&s.push({message:`Must be at most ${this.maxLength} characters`}),this.pattern&&!this.pattern.test(e)&&s.push({message:"Invalid format"});for(const t of this.customValidations){const a=t(e);a&&s.push({message:a})}return s.length>0?{success:!1,errors:s}:{success:!0,data:e}}min(e,s){const t=new i;return t.minLength=e,t.maxLength=this.maxLength,t.pattern=this.pattern,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>a.length<e?s:null),t}max(e,s){const t=new i;return t.minLength=this.minLength,t.maxLength=e,t.pattern=this.pattern,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>a.length>e?s:null),t}regex(e,s){const t=new i;return t.minLength=this.minLength,t.maxLength=this.maxLength,t.pattern=e,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>e.test(a)?null:s),t}email(e="Please enter a valid email address"){const s=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,t=new i;return t.minLength=this.minLength,t.maxLength=this.maxLength,t.pattern=this.pattern,t.customValidations=[...this.customValidations,a=>s.test(a)?null:e],t}refine(e){const s=new i;return s.minLength=this.minLength,s.maxLength=this.maxLength,s.pattern=this.pattern,s.customValidations=[...this.customValidations,e],s}}class c extends h{mustBeTrue=!1;trueMessage;validate(e){return typeof e!="boolean"?{success:!1,errors:[{message:"Expected boolean"}]}:this.mustBeTrue&&e!==!0?{success:!1,errors:[{message:this.trueMessage||"Must be true"}]}:{success:!0,data:e}}refine(e,s){const t=new c;t.mustBeTrue=this.mustBeTrue,t.trueMessage=this.trueMessage;const a=t.validate.bind(t);return t.validate=r=>{const n=a(r);return n.success?e(n.data)?n:{success:!1,errors:[{message:s}]}:n},t}literal(e,s){const t=new c;return t.mustBeTrue=!0,t.trueMessage=s,t}}class f extends h{constructor(e){super(),this.inner=e}validate(e){if(e===void 0)return{success:!0,data:void 0};const s=this.inner.validate(e);return s.success?{success:!0,data:s.data}:{success:!1,errors:s.errors}}}class g extends h{constructor(e,s){super(),this.inner=e,this.defaultValue=s}validate(e){return e===void 0?{success:!0,data:this.defaultValue}:this.inner.validate(e)}}class l extends h{constructor(e){super(),this.shape=e}validate(e){if(typeof e!="object"||e===null||Array.isArray(e))return{success:!1,errors:[{message:"Expected object"}]};const s=e,t={},a=[];for(const[r,n]of Object.entries(this.shape)){const u=n.validate(s[r]);if(u.success)t[r]=u.data;else for(const d of u.errors)a.push({message:d.message,path:[r,...d.path||[]]})}return a.length>0?{success:!1,errors:a}:{success:!0,data:t}}refine(e,s){const t=new l(this.shape),a=t.validate.bind(t);return t.validate=r=>{const n=a(r);if(!n.success)return n;const u=e(n.data);return u?{success:!1,errors:[{message:u,path:s?.path}]}:{success:!0,data:n.data}},t}}const p=()=>new i,L=()=>new c,x=o=>new l(o);exports.BooleanValidator=c;exports.ObjectValidator=l;exports.StringValidator=i;exports.boolean=L;exports.createStandardSchema=m;exports.object=x;exports.string=p;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
function m(i) {
|
|
2
|
+
return {
|
|
3
|
+
"~standard": {
|
|
4
|
+
version: 1,
|
|
5
|
+
vendor: "beatui-custom",
|
|
6
|
+
validate: (e) => {
|
|
7
|
+
const s = i.validate(e);
|
|
8
|
+
return s.success ? { value: s.data } : {
|
|
9
|
+
issues: s.errors.map((a) => ({
|
|
10
|
+
message: a.message,
|
|
11
|
+
path: a.path
|
|
12
|
+
}))
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
types: void 0
|
|
16
|
+
},
|
|
17
|
+
safeParse: (e) => {
|
|
18
|
+
const s = i.validate(e);
|
|
19
|
+
return s.success ? { success: !0, data: s.data } : {
|
|
20
|
+
success: !1,
|
|
21
|
+
error: {
|
|
22
|
+
errors: s.errors.map((a) => ({
|
|
23
|
+
message: a.message,
|
|
24
|
+
path: a.path?.map(
|
|
25
|
+
(r) => typeof r == "object" && "key" in r ? r.key.toString() : r.toString()
|
|
26
|
+
) || []
|
|
27
|
+
}))
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
class c {
|
|
34
|
+
optional() {
|
|
35
|
+
return new f(this);
|
|
36
|
+
}
|
|
37
|
+
default(t) {
|
|
38
|
+
return new g(this, t);
|
|
39
|
+
}
|
|
40
|
+
schema() {
|
|
41
|
+
return m(this);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
class u extends c {
|
|
45
|
+
minLength;
|
|
46
|
+
maxLength;
|
|
47
|
+
pattern;
|
|
48
|
+
customValidations = [];
|
|
49
|
+
validate(t) {
|
|
50
|
+
if (typeof t != "string")
|
|
51
|
+
return { success: !1, errors: [{ message: "Expected string" }] };
|
|
52
|
+
const e = [];
|
|
53
|
+
this.minLength !== void 0 && t.length < this.minLength && e.push({ message: `Must be at least ${this.minLength} characters` }), this.maxLength !== void 0 && t.length > this.maxLength && e.push({ message: `Must be at most ${this.maxLength} characters` }), this.pattern && !this.pattern.test(t) && e.push({ message: "Invalid format" });
|
|
54
|
+
for (const s of this.customValidations) {
|
|
55
|
+
const a = s(t);
|
|
56
|
+
a && e.push({ message: a });
|
|
57
|
+
}
|
|
58
|
+
return e.length > 0 ? { success: !1, errors: e } : { success: !0, data: t };
|
|
59
|
+
}
|
|
60
|
+
min(t, e) {
|
|
61
|
+
const s = new u();
|
|
62
|
+
return s.minLength = t, s.maxLength = this.maxLength, s.pattern = this.pattern, s.customValidations = [...this.customValidations], e && s.customValidations.push(
|
|
63
|
+
(a) => a.length < t ? e : null
|
|
64
|
+
), s;
|
|
65
|
+
}
|
|
66
|
+
max(t, e) {
|
|
67
|
+
const s = new u();
|
|
68
|
+
return s.minLength = this.minLength, s.maxLength = t, s.pattern = this.pattern, s.customValidations = [...this.customValidations], e && s.customValidations.push(
|
|
69
|
+
(a) => a.length > t ? e : null
|
|
70
|
+
), s;
|
|
71
|
+
}
|
|
72
|
+
regex(t, e) {
|
|
73
|
+
const s = new u();
|
|
74
|
+
return s.minLength = this.minLength, s.maxLength = this.maxLength, s.pattern = t, s.customValidations = [...this.customValidations], e && s.customValidations.push(
|
|
75
|
+
(a) => t.test(a) ? null : e
|
|
76
|
+
), s;
|
|
77
|
+
}
|
|
78
|
+
email(t = "Please enter a valid email address") {
|
|
79
|
+
const e = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, s = new u();
|
|
80
|
+
return s.minLength = this.minLength, s.maxLength = this.maxLength, s.pattern = this.pattern, s.customValidations = [
|
|
81
|
+
...this.customValidations,
|
|
82
|
+
(a) => e.test(a) ? null : t
|
|
83
|
+
], s;
|
|
84
|
+
}
|
|
85
|
+
refine(t) {
|
|
86
|
+
const e = new u();
|
|
87
|
+
return e.minLength = this.minLength, e.maxLength = this.maxLength, e.pattern = this.pattern, e.customValidations = [...this.customValidations, t], e;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
class h extends c {
|
|
91
|
+
mustBeTrue = !1;
|
|
92
|
+
trueMessage;
|
|
93
|
+
validate(t) {
|
|
94
|
+
return typeof t != "boolean" ? { success: !1, errors: [{ message: "Expected boolean" }] } : this.mustBeTrue && t !== !0 ? {
|
|
95
|
+
success: !1,
|
|
96
|
+
errors: [{ message: this.trueMessage || "Must be true" }]
|
|
97
|
+
} : { success: !0, data: t };
|
|
98
|
+
}
|
|
99
|
+
refine(t, e) {
|
|
100
|
+
const s = new h();
|
|
101
|
+
s.mustBeTrue = this.mustBeTrue, s.trueMessage = this.trueMessage;
|
|
102
|
+
const a = s.validate.bind(s);
|
|
103
|
+
return s.validate = (r) => {
|
|
104
|
+
const n = a(r);
|
|
105
|
+
return n.success ? t(n.data) ? n : { success: !1, errors: [{ message: e }] } : n;
|
|
106
|
+
}, s;
|
|
107
|
+
}
|
|
108
|
+
literal(t, e) {
|
|
109
|
+
const s = new h();
|
|
110
|
+
return s.mustBeTrue = !0, s.trueMessage = e, s;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
class f extends c {
|
|
114
|
+
constructor(t) {
|
|
115
|
+
super(), this.inner = t;
|
|
116
|
+
}
|
|
117
|
+
validate(t) {
|
|
118
|
+
if (t === void 0)
|
|
119
|
+
return { success: !0, data: void 0 };
|
|
120
|
+
const e = this.inner.validate(t);
|
|
121
|
+
return e.success ? { success: !0, data: e.data } : { success: !1, errors: e.errors };
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
class g extends c {
|
|
125
|
+
constructor(t, e) {
|
|
126
|
+
super(), this.inner = t, this.defaultValue = e;
|
|
127
|
+
}
|
|
128
|
+
validate(t) {
|
|
129
|
+
return t === void 0 ? { success: !0, data: this.defaultValue } : this.inner.validate(t);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
class l extends c {
|
|
133
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
134
|
+
constructor(t) {
|
|
135
|
+
super(), this.shape = t;
|
|
136
|
+
}
|
|
137
|
+
validate(t) {
|
|
138
|
+
if (typeof t != "object" || t === null || Array.isArray(t))
|
|
139
|
+
return { success: !1, errors: [{ message: "Expected object" }] };
|
|
140
|
+
const e = t, s = {}, a = [];
|
|
141
|
+
for (const [r, n] of Object.entries(this.shape)) {
|
|
142
|
+
const o = n.validate(e[r]);
|
|
143
|
+
if (o.success)
|
|
144
|
+
s[r] = o.data;
|
|
145
|
+
else
|
|
146
|
+
for (const d of o.errors)
|
|
147
|
+
a.push({
|
|
148
|
+
message: d.message,
|
|
149
|
+
path: [r, ...d.path || []]
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
return a.length > 0 ? { success: !1, errors: a } : { success: !0, data: s };
|
|
153
|
+
}
|
|
154
|
+
refine(t, e) {
|
|
155
|
+
const s = new l(this.shape), a = s.validate.bind(s);
|
|
156
|
+
return s.validate = (r) => {
|
|
157
|
+
const n = a(r);
|
|
158
|
+
if (!n.success) return n;
|
|
159
|
+
const o = t(n.data);
|
|
160
|
+
return o ? {
|
|
161
|
+
success: !1,
|
|
162
|
+
errors: [
|
|
163
|
+
{
|
|
164
|
+
message: o,
|
|
165
|
+
path: e?.path
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
} : { success: !0, data: n.data };
|
|
169
|
+
}, s;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const p = () => new u(), L = () => new h(), x = (i) => new l(i);
|
|
173
|
+
export {
|
|
174
|
+
h as B,
|
|
175
|
+
l as O,
|
|
176
|
+
u as S,
|
|
177
|
+
L as b,
|
|
178
|
+
m as c,
|
|
179
|
+
x as o,
|
|
180
|
+
p as s
|
|
181
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-D3xqZUTA.cjs"),s={loadingExtended:"Lädt, bitte warten",loadingShort:"Lädt...",iconDescription:"Symbol",loadingIcon:"Ladesymbol",locale:"Landesvariante",failedToLoadIcon:"Symbol konnte nicht geladen werden",editLabel:"Bearbeiten",selectOne:"Eines auswählen",selectNone:"Keines",selectMany:"Mehrere auswählen",noResults:"Keine Ergebnisse",passwordPlaceholderText:"Geheimes Passwort",togglePasswordVisibility:"Passwort-Sichtbarkeit umschalten",toggleMenu:"Menü umschalten",toggleAside:"Seitenleiste umschalten",mainNavigation:"Hauptnavigation",sidebar:"Seitenleiste",closeDrawer:"Schublade schließen",closeModal:"Modal schließen",confirm:"Bestätigen",cancel:"Abbrechen",addLabel:"Hinzufügen",removeItem:"Element entfernen",currentLocale:"Deutsch",ar:"Arabisch",de:"Deutsch",en:"Englisch",es:"Spanisch",fr:"Französisch",hi:"Hindi",it:"Italienisch",ja:"Japanisch",ko:"Koreanisch",nl:"Niederländisch",pl:"Polnisch",pt:"Portugiesisch",ru:"Russisch",tr:"Türkisch",vi:"Vietnamesisch",zh:"Chinesisch",he:"Hebräisch",fa:"Persisch",ur:"Urdu",emailPlaceholderText:"E-Mail eingeben",incrementValue:"Wert erhöhen",decrementValue:"Wert verringern",dropZoneInstructions:e=>e?"Klicken zum Auswählen oder Dateien hierher ziehen, oder Enter oder Leertaste drücken, um Dateiauswahl zu öffnen":"Dateien hierher ziehen",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Datei entfernen",clearAllFiles:"Alle Dateien löschen",clearValue:"Wert löschen",dateRangeStart:"Start",dateRangeEnd:"End",dateRangeNoLimit:"No limit",dateRangeSelectDate:"Select date",unknownType:"Unbekannter Typ",filesInputInstructions:(e,n,t)=>{let i=e==null||e>1?"Klicken zum Auswählen oder Dateien hierher ziehen":"Klicken zum Auswählen oder Datei hierher ziehen";if(e||n){const l=[];if(e!=null&&e>1&&l.push(`bis zu ${e} Dateien`),n&&t){const r=a.formatFileSize(n,{units:t});l.push(`max ${r} je Datei`)}l.length>0&&(i+=` (${l.join(", ")})`)}return i},paginationLabel:"Seitennavigation",paginationRange:(e,n,t,i)=>i>t?`Zeilen ${e} bis ${n} von ${t} von ${i}`:`Zeilen ${e} bis ${n} von ${t}`,firstPage:"Erste Seite",previousPage:"Vorherige Seite",nextPage:"Nächste Seite",lastPage:"Letzte Seite",breadcrumbs:"Brotkrümelnavigation",commandPalette:"Befehlspalette",typeACommand:"Befehl eingeben...",noResultsFound:"Keine Ergebnisse gefunden",noMatchingCommands:"Keine passenden Befehle",appearanceSystem:"System",appearanceLight:"Hell",appearanceDark:"Dunkel",ok:"OK",changeTypeConfirmation:"Typänderung löscht den aktuellen Wert. Fortfahren?",notifications:"Benachrichtigungen",markAllAsRead:"Alle als gelesen markieren",noNotifications:"Keine Benachrichtigungen",schemaConflictsDetected:"Schemakonflikte erkannt",schemaViolationsDetected:"Schemaverletzungen erkannt",properties:"Eigenschaften",uploading:"Wird hochgeladen...",dropFilesOrBrowse:"Dateien hierher ziehen oder klicken zum Durchsuchen",acceptedTypes:e=>`Akzeptierte Typen: ${e}`,enterUrlPrompt:"URL eingeben:",exceeded:"(überschritten)",pdfPreview:"PDF-Vorschau",lexical:{fontFamily:"Schriftart",fontSize:"Schriftgröße",lineHeight:"Zeilenhöhe",fontColor:"Schriftfarbe",highlightColor:"Hervorhebungsfarbe",backgroundColor:"Hintergrundfarbe",bold:"Fett",italic:"Kursiv",underline:"Unterstrichen",strikethrough:"Durchgestrichen",code:"Code",clearFormatting:"Formatierung löschen",normal:"Normal",heading:e=>`Überschrift ${e}`,bulletList:"Aufzählung",orderedList:"Nummerierte Liste",checkList:"Checkliste",indent:"Einzug vergrößern",outdent:"Einzug verkleinern",blockquote:"Zitat",codeBlock:"Code-Block",horizontalRule:"Horizontale Linie",insertTable:"Tabelle einfügen",link:"Link",undo:"Rückgängig",redo:"Wiederholen",cut:"Ausschneiden",copy:"Kopieren",paste:"Einfügen",defaultOption:"Standard",slashCommands:"Schrägstrich-Befehle",noCommandsFound:"Keine Befehle gefunden",changeBlockType:"Blocktyp ändern",blockTypes:"Blocktypen",enterUrl:"URL eingeben:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Aufsteigend sortieren",sortDescending:"Absteigend sortieren",clearSort:"Sortierung aufheben",filterPlaceholder:"Filtern...",clearFilter:"Filter löschen",selectAll:"Alle auswählen",deselectAll:"Alle abwählen",selectedCount:e=>`${e} ausgewählt`,resetAll:"Alles zurücksetzen",noResults:"Keine Ergebnisse gefunden",loading:"Wird geladen...",filterPanelAddCondition:"Bedingung hinzufügen",filterPanelApply:"Anwenden",filterPanelClear:"Filter löschen",filterPanelAnd:"UND",filterPanelOr:"ODER",filterPanelContains:"Enthält",filterPanelNotContains:"Enthält nicht",filterPanelEquals:"Gleich",filterPanelNotEquals:"Ungleich",filterPanelStartsWith:"Beginnt mit",filterPanelEndsWith:"Endet mit",filterPanelIsNull:"Ist leer",filterPanelIsNotNull:"Ist nicht leer",filterPanelGt:"Größer als",filterPanelGte:"Größer oder gleich",filterPanelLt:"Kleiner als",filterPanelLte:"Kleiner oder gleich",filterPanelBetween:"Zwischen",filterPanelValuePlaceholder:"Wert...",sortMultiHint:"Shift gedrückt halten, um mehrere Spalten zu sortieren",columnVisibility:"Spalten",showAllColumns:"Alle anzeigen",menuSortAsc:"Aufsteigend sortieren",menuSortDesc:"Absteigend sortieren",menuClearSort:"Sortierung aufheben",menuHideColumn:"Spalte ausblenden",menuChooseColumns:"Spalten auswählen",menuResetColumns:"Spalten zurücksetzen",menuFilter:"Filtern",rowCount:(e,n)=>`Zeilen: ${e} Zeilen gesamt: ${n}`,filterTagsPlaceholder:"Werte auswählen...",groupCount:e=>`${e} Einträge`,collapseGroup:"Gruppe einklappen",expandGroup:"Gruppe ausklappen",describeFilter:{textContains:(e,n)=>`${e} enthält "${n}"`,textNotContains:(e,n)=>`${e} enthält nicht "${n}"`,textEquals:(e,n)=>`${e} ist gleich "${n}"`,textNotEquals:(e,n)=>`${e} ist ungleich "${n}"`,textStartsWith:(e,n)=>`${e} beginnt mit "${n}"`,textEndsWith:(e,n)=>`${e} endet mit "${n}"`,compareEq:(e,n)=>`${e} = ${n}`,compareNeq:(e,n)=>`${e} ≠ ${n}`,compareGt:(e,n)=>`${e} > ${n}`,compareGte:(e,n)=>`${e} ≥ ${n}`,compareLt:(e,n)=>`${e} < ${n}`,compareLte:(e,n)=>`${e} ≤ ${n}`,rangeBetween:(e,n,t)=>`${e} zwischen ${n} und ${t}`,rangeGte:(e,n)=>`${e} ≥ ${n}`,rangeLte:(e,n)=>`${e} ≤ ${n}`,setIn:(e,n)=>`${e} in [${n}]`,setNotIn:(e,n)=>`${e} nicht in [${n}]`,booleanIs:(e,n)=>`${e} ist ${n}`,isNull:e=>`${e} ist leer`,isNotNull:e=>`${e} ist nicht leer`,compositeAnd:e=>e.join(" UND "),compositeOr:e=>e.join(" ODER ")}},prosemirror:{bold:"Fett",italic:"Kursiv",code:"Inline-Code",link:"Link einfügen",removeLink:"Link entfernen",heading:e=>`Überschrift ${e}`,bulletList:"Aufzählung",orderedList:"Nummerierte Liste",blockquote:"Zitat",codeBlock:"Code-Block",horizontalRule:"Horizontale Linie",linkUrlPlaceholder:"https://beispiel.com"},carousel:{label:"Karussell",previousSlide:"Vorherige Folie",nextSlide:"Nächste Folie",slideNavigation:"Foliennavigation",slideOfTotal:(e,n)=>`Folie ${e} von ${n}`,goToSlide:e=>`Zu Folie ${e}`},datePicker:{label:"Datumsauswahl",previousYear:"Vorheriges Jahr",previousMonth:"Vorheriger Monat",selectMonth:"Monat auswählen",selectYear:"Jahr auswählen",nextMonth:"Nächster Monat",nextYear:"Nächstes Jahr",previousYears:e=>`Vorherige ${e} Jahre`,nextYears:e=>`Nächste ${e} Jahre`,dateRangePickerLabel:"Datumsbereichsauswahl",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["So","Mo","Di","Mi","Do","Fr","Sa"]},timePicker:{label:"Zeitauswahl",hoursLabel:"HH",minutesLabel:"MM",secondsLabel:"SS",selectHours:"Stunden auswählen",selectMinutes:"Minuten auswählen",selectSeconds:"Sekunden auswählen",selectPeriod:"AM/PM auswählen",nowLabel:"Jetzt"},timeSelectTime:"Zeit auswählen",dateTimeSelectDateTime:"Datum und Uhrzeit auswählen",colorPicker:{hue:"Farbton",saturation:"Sättigung",lightness:"Helligkeit",alpha:"Alpha",red:"Rot",green:"Grün",blue:"Blau",hex:"Hex",whiteness:"Weißanteil",blackness:"Schwarzanteil",chroma:"Chroma"},spotlight:{placeholder:"Suchen...",noResults:"Keine Ergebnisse gefunden",recentItems:"Zuletzt verwendet",close:"Schließen"},virtualList:{listLabel:"Scrollbare Liste"},stepper:{step:"Schritt",stepOfTotal:(e,n)=>`Schritt ${e} von ${n}`,completed:"Abgeschlossen",next:"Weiter",previous:"Zurück",complete:"Abschließen"},sortableList:{dragHandle:"Zum Neuordnen ziehen"},transferList:{available:"Verfügbar",selected:"Ausgewählt",moveRight:"Zu ausgewählt verschieben",moveLeft:"Zu verfügbar verschieben",moveAllRight:"Alle zu ausgewählt",moveAllLeft:"Alle zu verfügbar",searchAvailable:"Verfügbare Elemente durchsuchen…",searchSelected:"Ausgewählte Elemente durchsuchen…"},copyButton:{copied:"Kopiert!",copyToClipboard:"In Zwischenablage kopieren"},numberStepper:{increment:"Erhöhen",decrement:"Verringern",value:"Wert"},statCard:{trendUp:"Steigend",trendDown:"Fallend",trendFlat:"Keine Änderung"},otpInputLabel:"Einmalpasswort-Eingabe",otpDigitLabel:(e,n)=>`Ziffer ${e} von ${n}`,scrollableGridView:"Scrollbare Rasteransicht",onboardingTour:{label:"Geführte Tour",stepIndicator:(e,n)=>`Schritt ${e} von ${n}`,skip:"Überspringen",previous:"Zurück",next:"Weiter",finish:"Fertig"},searchPlaceholder:"Suchen",pdfPageViewer:{loading:"PDF wird geladen...",loadFailed:"PDF konnte nicht geladen werden",invalidPdf:"Ungültige PDF-Datei",pageOutOfRange:(e,n)=>`Seite ${e} liegt außerhalb des Bereichs (1-${n})`,renderFailed:"PDF-Seite konnte nicht gerendert werden"}};exports.default=s;
|