@levo-so/studio 0.1.115 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{BillingStep-DjNmSVkY.js → BillingStep-mq3o5Hrf.js} +1 -1
- package/Button-DIDhszPV.js +505 -0
- package/{CollectionField-DrJuHNsg.js → CollectionField-CD6ok1A3.js} +29 -77
- package/{DateTimeWidget-CzBq92zC.js → DateTimeWidget-DHUmirf1.js} +9 -9
- package/{EntryCard-C2KA5HMX.js → EntryCard-DiMic9hv.js} +4 -4
- package/{KBChatWidget-CPrg_etS.js → KBChatWidget-hquzCtvm.js} +388 -360
- package/{LoginCard-S_2jls6v.js → LoginCard-Cs9X8LC8.js} +3 -3
- package/{LoginForm-DeYsk4kd.js → LoginForm-CLUpD3qG.js} +1 -1
- package/{LoginModal-BbDfB4S9.js → LoginModal-D9jhZlJr.js} +4 -4
- package/{MessageCard-x6jPClGi.js → MessageCard-CJltLT2a.js} +2 -2
- package/{MessageFooter-CHuPnL_D.js → MessageFooter-CrhrI-su.js} +2 -2
- package/{ModalManager-DQVNPEuG.js → ModalManager-7Nhr8gTs.js} +1 -1
- package/{PendingApprovalCard-C06B_Tg-.js → PendingApprovalCard-wW8Ko-w8.js} +3 -3
- package/{PhoneWidget-DdX8_-2v.js → PhoneWidget-BQEfbyV4.js} +5 -5
- package/{PopupRenderer-Bncp54gB-DysCmUdR.js → PopupRenderer-Bncp54gB-CQloeJYR.js} +15 -16
- package/{ProfileCard-DGanb4BY.js → ProfileCard-BhnTmQaE.js} +9 -8
- package/RichTextWidget-CStx2PMn.js +748 -0
- package/{RteThemeProvider-LFGzAYi1.js → RteThemeProvider-DxYOzcck.js} +1 -1
- package/Spinner-HCqR1eGW.js +7 -0
- package/{StripePaymentModal-BsYNQ4MB.js → StripePaymentModal-Cw-AlxTS.js} +1 -1
- package/{VerifyButton-6BIXAEGp.js → VerifyButton-kdxRhJWI.js} +1 -1
- package/{bookingCard-CUv7WgqT.js → bookingCard-BSRCH57N.js} +74 -73
- package/cn-BL52QQS4.js +6 -0
- package/{dialog-LRLdr3kq.js → dialog-RrTP-MGm.js} +1 -1
- package/{dist-D-y51gmU.js → dist-D3lGqLBP.js} +1106 -1264
- package/index.d.ts +0 -2
- package/index.js +1969 -1519
- package/kbChat-g2bupQqp.js +163 -0
- package/{nodeAlignment-BC_Uferw.js → nodeAlignment-DS9_DLGB.js} +31 -23
- package/package.json +6 -9
- package/pillChrome-Cx8qlbsn.js +16 -0
- package/studio.css +1 -1
- package/{useLogin-B2HHZxTi.js → useLogin-BhysESLW.js} +1 -1
- package/Button-Uwxgkriw.js +0 -1657
- package/RichTextWidget-BfZ3sCcx.js +0 -113
- package/Toolbar-6IXR9qAh.js +0 -645
- package/collection.d.ts +0 -500
- package/collection.js +0 -30
- package/inlineRteTheme-abXxag3B.js +0 -9
- package/kbChat-DCrdcXir.js +0 -166
- package/pillChrome-CQoJfFk3.js +0 -16
- package/utils-NDllPDUz.js +0 -5
- /package/{AuthProvider-C6bvedwF.js → AuthProvider-CFQqiIf1.js} +0 -0
- /package/{Beams-DboMUgCv.js → Beams-DVEhileN.js} +0 -0
- /package/{CollectionInput-CG-Pu_51.js → CollectionInput-DyNbxIZ8.js} +0 -0
- /package/{Dots-a8xSboDv.js → Dots-vp0H1Md3.js} +0 -0
- /package/{Gradient-NacpoDCM.js → Gradient-_5G8Qm5s.js} +0 -0
- /package/{Grid-BJQvxnks.js → Grid-D694XUrO.js} +0 -0
- /package/{Popover-C_IQMM8H.js → Popover-V2O1gz6N.js} +0 -0
- /package/{Tooltip-DreKXbTO.js → Tooltip-DTnCNEcE.js} +0 -0
- /package/{Waves-DUuT_IFr.js → Waves-DeNoq6Bo.js} +0 -0
- /package/{card-D5fPArfa.js → card-Cb4m0p4i.js} +0 -0
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./Button-lUfKisu8.js";
|
|
3
|
+
import { i as t, o as n, t as r } from "./nodeAlignment-DS9_DLGB.js";
|
|
4
|
+
import { t as i } from "./RteThemeProvider-DxYOzcck.js";
|
|
5
|
+
import { n as a, r as o, t as s } from "./CollectionField-CD6ok1A3.js";
|
|
6
|
+
import { i as c, n as l, r as u, t as d } from "./Tooltip-DTnCNEcE.js";
|
|
7
|
+
import { a as f, i as p, n as m, o as h, r as g } from "./Popover-V2O1gz6N.js";
|
|
8
|
+
import { c as _ } from "react/compiler-runtime";
|
|
9
|
+
import { forwardRef as v, useEffect as y, useState as b } from "react";
|
|
10
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
11
|
+
import w from "clsx";
|
|
12
|
+
import { IconAlignCenter as T, IconAlignJustified as E, IconAlignLeft as D, IconAlignRight as ee, IconArrowBackUp as te, IconArrowForwardUp as O, IconBold as k, IconChevronDown as A, IconCode as j, IconCornerDownLeft as ne, IconExternalLink as M, IconH1 as N, IconH2 as re, IconH3 as P, IconH4 as F, IconH5 as I, IconH6 as L, IconItalic as R, IconLink as ie, IconList as z, IconListNumbers as B, IconPencil as V, IconPilcrow as H, IconRotate2 as U, IconStrikethrough as W, IconSubscript as G, IconSuperscript as K, IconTrash as q, IconUnderline as J } from "@tabler/icons-react";
|
|
13
|
+
import { Subscript as Y } from "@tiptap/extension-subscript";
|
|
14
|
+
import { Superscript as X } from "@tiptap/extension-superscript";
|
|
15
|
+
import { Typography as Z } from "@tiptap/extension-typography";
|
|
16
|
+
import { UniqueID as Q } from "@tiptap/extension-unique-id";
|
|
17
|
+
import { AllSelection as ae, NodeSelection as oe, TextSelection as se } from "@tiptap/pm/state";
|
|
18
|
+
import { useController as ce } from "react-hook-form";
|
|
19
|
+
import { Placeholder as le, Selection as ue } from "@tiptap/extensions";
|
|
20
|
+
import { StarterKit as de } from "@tiptap/starter-kit";
|
|
21
|
+
import { EditorContent as fe, EditorContext as pe, useCurrentEditor as me, useEditor as he, useEditorState as ge } from "@tiptap/react";
|
|
22
|
+
//#region ../../libraries/react-collection/dist/components/editor/extensionKit.js
|
|
23
|
+
var _e = (e = { placeholder: "Write something ..." }) => [
|
|
24
|
+
de.configure({
|
|
25
|
+
blockquote: !1,
|
|
26
|
+
codeBlock: !1,
|
|
27
|
+
horizontalRule: !1,
|
|
28
|
+
dropcursor: { width: 2 },
|
|
29
|
+
link: {
|
|
30
|
+
openOnClick: !1,
|
|
31
|
+
HTMLAttributes: { target: "_blank" }
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
le.configure({ placeholder: e?.placeholder }),
|
|
35
|
+
Z,
|
|
36
|
+
ue,
|
|
37
|
+
X,
|
|
38
|
+
Y,
|
|
39
|
+
r,
|
|
40
|
+
Q.configure({ types: [
|
|
41
|
+
"paragraph",
|
|
42
|
+
"heading",
|
|
43
|
+
"bulletList",
|
|
44
|
+
"orderedList"
|
|
45
|
+
] })
|
|
46
|
+
], ve = "_261ja30", ye = "_261ja31", $ = v((t, n) => {
|
|
47
|
+
let r = _(27), i, a, o, s, c, f, p;
|
|
48
|
+
r[0] === t ? (i = r[1], a = r[2], o = r[3], s = r[4], c = r[5], f = r[6], p = r[7]) : ({label: s, Icon: i, isActive: o, iconSize: f, trailing: p, className: a, ...c} = t, r[0] = t, r[1] = i, r[2] = a, r[3] = o, r[4] = s, r[5] = c, r[6] = f, r[7] = p);
|
|
49
|
+
let m = f === void 0 ? 16 : f, h = o || void 0, g = o && "_1vaxhty0", v;
|
|
50
|
+
r[8] !== a || r[9] !== g ? (v = w(g, a), r[8] = a, r[9] = g, r[10] = v) : v = r[10];
|
|
51
|
+
let y;
|
|
52
|
+
r[11] !== i || r[12] !== m ? (y = /* @__PURE__ */ S(i, { size: m }), r[11] = i, r[12] = m, r[13] = y) : y = r[13];
|
|
53
|
+
let b;
|
|
54
|
+
r[14] !== s || r[15] !== c || r[16] !== n || r[17] !== h || r[18] !== v || r[19] !== y || r[20] !== p ? (b = /* @__PURE__ */ S(l, {
|
|
55
|
+
onPointerDown: be,
|
|
56
|
+
render: /* @__PURE__ */ C(e, {
|
|
57
|
+
ref: n,
|
|
58
|
+
type: "button",
|
|
59
|
+
variant: "ghost",
|
|
60
|
+
size: "sm",
|
|
61
|
+
tabIndex: -1,
|
|
62
|
+
"aria-label": s,
|
|
63
|
+
"aria-pressed": h,
|
|
64
|
+
className: v,
|
|
65
|
+
...c,
|
|
66
|
+
children: [y, p]
|
|
67
|
+
})
|
|
68
|
+
}), r[14] = s, r[15] = c, r[16] = n, r[17] = h, r[18] = v, r[19] = y, r[20] = p, r[21] = b) : b = r[21];
|
|
69
|
+
let x;
|
|
70
|
+
r[22] === s ? x = r[23] : (x = /* @__PURE__ */ S(u, { children: s }), r[22] = s, r[23] = x);
|
|
71
|
+
let T;
|
|
72
|
+
return r[24] !== b || r[25] !== x ? (T = /* @__PURE__ */ C(d, { children: [b, x] }), r[24] = b, r[25] = x, r[26] = T) : T = r[26], T;
|
|
73
|
+
});
|
|
74
|
+
$.displayName = "ToolbarButton";
|
|
75
|
+
function be(e) {
|
|
76
|
+
return e.preventDefault();
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region ../../libraries/react-collection/dist/components/editor/utils.js
|
|
80
|
+
var xe = [
|
|
81
|
+
"paragraph",
|
|
82
|
+
"heading",
|
|
83
|
+
"bulletList",
|
|
84
|
+
"orderedList",
|
|
85
|
+
"taskList",
|
|
86
|
+
"codeBlock"
|
|
87
|
+
], Se = [
|
|
88
|
+
"tableCell",
|
|
89
|
+
"tableHeader",
|
|
90
|
+
"quoteCaption",
|
|
91
|
+
"detailsSummary"
|
|
92
|
+
], Ce = (e) => {
|
|
93
|
+
if (!e) return !1;
|
|
94
|
+
let { $from: t } = e.state.selection;
|
|
95
|
+
for (let e = t.depth; e > 0; e--) if (Se.includes(t.node(e).type.name)) return !0;
|
|
96
|
+
return !1;
|
|
97
|
+
}, we = (e, t) => {
|
|
98
|
+
if (!e || t.length === 0) return !1;
|
|
99
|
+
let { selection: n } = e.state, r = new Set(t);
|
|
100
|
+
if (n instanceof oe) {
|
|
101
|
+
let e = n.node?.type?.name;
|
|
102
|
+
return !!e && r.has(e);
|
|
103
|
+
}
|
|
104
|
+
if (n instanceof se || n instanceof ae) {
|
|
105
|
+
let t = !0;
|
|
106
|
+
return e.state.doc.nodesBetween(n.from, n.to, (e) => e.isTextblock && !r.has(e.type.name) ? (t = !1, !1) : t), t;
|
|
107
|
+
}
|
|
108
|
+
return !1;
|
|
109
|
+
}, Te = /[\0-\x20\xA0\u1680\u180E\u2000-\u2029\u205F\u3000]/g, Ee = [
|
|
110
|
+
"http",
|
|
111
|
+
"https",
|
|
112
|
+
"ftp",
|
|
113
|
+
"ftps",
|
|
114
|
+
"mailto",
|
|
115
|
+
"tel",
|
|
116
|
+
"callto",
|
|
117
|
+
"sms"
|
|
118
|
+
], De = (e, t) => {
|
|
119
|
+
try {
|
|
120
|
+
let n = new URL(e, t), r = n.href.replace(Te, ""), i = RegExp(`^(?:(?:${Ee.join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`, "i");
|
|
121
|
+
if (r.match(i)) return n.href;
|
|
122
|
+
} catch {}
|
|
123
|
+
return "#";
|
|
124
|
+
}, Oe = (e, t = []) => {
|
|
125
|
+
let { tr: n } = e.state, { selection: r } = n;
|
|
126
|
+
return r.empty ? !1 : (r.ranges.forEach((e) => {
|
|
127
|
+
n.doc.nodesBetween(e.$from.pos, e.$to.pos, (e, r) => (e.isInline && e.marks.forEach((i) => {
|
|
128
|
+
t.includes(i.type.name) || n.removeMark(r, r + e.nodeSize, i.type);
|
|
129
|
+
}), !0));
|
|
130
|
+
}), e.view.dispatch(n), e.commands.focus(), !0);
|
|
131
|
+
}, ke = (e) => {
|
|
132
|
+
let { selection: t } = e.state;
|
|
133
|
+
if (t.empty) return !1;
|
|
134
|
+
for (let n of t.ranges) {
|
|
135
|
+
let t = !1;
|
|
136
|
+
if (e.state.doc.nodesBetween(n.$from.pos, n.$to.pos, (e) => e.isInline && e.marks.length > 0 ? (t = !0, !1) : !0), t) return !0;
|
|
137
|
+
}
|
|
138
|
+
return !1;
|
|
139
|
+
}, Ae = "j67x6z0", je = "j67x6z1", Me = "_5pk5r80", Ne = (e) => {
|
|
140
|
+
let t = _(50), { editor: n } = e, [r, i] = b(!1), { isActive: a, currentUrl: o } = ge({
|
|
141
|
+
editor: n,
|
|
142
|
+
selector: Pe
|
|
143
|
+
}) ?? {
|
|
144
|
+
isActive: !1,
|
|
145
|
+
currentUrl: ""
|
|
146
|
+
}, [s, c] = b(o), v, x;
|
|
147
|
+
t[0] !== o || t[1] !== r ? (v = () => {
|
|
148
|
+
r && c(o);
|
|
149
|
+
}, x = [r, o], t[0] = o, t[1] = r, t[2] = v, t[3] = x) : (v = t[2], x = t[3]), y(v, x);
|
|
150
|
+
let w;
|
|
151
|
+
t[4] !== n || t[5] !== s ? (w = () => {
|
|
152
|
+
s && (n.chain().focus().extendMarkRange("link").setLink({ href: s }).run(), i(!1));
|
|
153
|
+
}, t[4] = n, t[5] = s, t[6] = w) : w = t[6];
|
|
154
|
+
let T = w, E;
|
|
155
|
+
t[7] === n ? E = t[8] : (E = () => {
|
|
156
|
+
n.chain().focus().extendMarkRange("link").unsetLink().run(), c(""), i(!1);
|
|
157
|
+
}, t[7] = n, t[8] = E);
|
|
158
|
+
let D = E, ee;
|
|
159
|
+
t[9] === s ? ee = t[10] : (ee = () => {
|
|
160
|
+
let e = De(s, window.location.href);
|
|
161
|
+
e !== "#" && window.open(e, "_blank", "noopener,noreferrer");
|
|
162
|
+
}, t[9] = s, t[10] = ee);
|
|
163
|
+
let te = ee, O;
|
|
164
|
+
t[11] === Symbol.for("react.memo_cache_sentinel") ? (O = (e) => {
|
|
165
|
+
e.preventDefault(), i(!0);
|
|
166
|
+
}, t[11] = O) : O = t[11];
|
|
167
|
+
let k;
|
|
168
|
+
t[12] === a ? k = t[13] : (k = /* @__PURE__ */ S(h, {
|
|
169
|
+
onPointerDown: Fe,
|
|
170
|
+
render: /* @__PURE__ */ S($, {
|
|
171
|
+
label: "Link",
|
|
172
|
+
Icon: ie,
|
|
173
|
+
isActive: a,
|
|
174
|
+
onClick: O
|
|
175
|
+
})
|
|
176
|
+
}), t[12] = a, t[13] = k);
|
|
177
|
+
let A;
|
|
178
|
+
t[14] === Symbol.for("react.memo_cache_sentinel") ? (A = (e) => c(e.target.value), t[14] = A) : A = t[14];
|
|
179
|
+
let j;
|
|
180
|
+
t[15] === T ? j = t[16] : (j = (e) => {
|
|
181
|
+
e.key === "Enter" && (e.preventDefault(), T());
|
|
182
|
+
}, t[15] = T, t[16] = j);
|
|
183
|
+
let N;
|
|
184
|
+
t[17] !== j || t[18] !== s ? (N = /* @__PURE__ */ S("input", {
|
|
185
|
+
className: je,
|
|
186
|
+
value: s,
|
|
187
|
+
onChange: A,
|
|
188
|
+
onKeyDown: j,
|
|
189
|
+
placeholder: "Paste a link..."
|
|
190
|
+
}), t[17] = j, t[18] = s, t[19] = N) : N = t[19];
|
|
191
|
+
let re = !s && !a, P;
|
|
192
|
+
t[20] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ S(ne, { size: 16 }), t[20] = P) : P = t[20];
|
|
193
|
+
let F;
|
|
194
|
+
t[21] !== T || t[22] !== re ? (F = /* @__PURE__ */ S(l, { render: /* @__PURE__ */ S("button", {
|
|
195
|
+
type: "button",
|
|
196
|
+
className: Me,
|
|
197
|
+
onClick: T,
|
|
198
|
+
disabled: re,
|
|
199
|
+
"aria-label": "Apply link",
|
|
200
|
+
children: P
|
|
201
|
+
}) }), t[21] = T, t[22] = re, t[23] = F) : F = t[23];
|
|
202
|
+
let I;
|
|
203
|
+
t[24] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ S(u, { children: "Apply link" }), t[24] = I) : I = t[24];
|
|
204
|
+
let L;
|
|
205
|
+
t[25] === F ? L = t[26] : (L = /* @__PURE__ */ C(d, { children: [F, I] }), t[25] = F, t[26] = L);
|
|
206
|
+
let R = !s && !a, z;
|
|
207
|
+
t[27] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ S(M, { size: 16 }), t[27] = z) : z = t[27];
|
|
208
|
+
let B;
|
|
209
|
+
t[28] !== te || t[29] !== R ? (B = /* @__PURE__ */ S(l, { render: /* @__PURE__ */ S("button", {
|
|
210
|
+
type: "button",
|
|
211
|
+
className: Me,
|
|
212
|
+
onClick: te,
|
|
213
|
+
disabled: R,
|
|
214
|
+
"aria-label": "Open in new window",
|
|
215
|
+
children: z
|
|
216
|
+
}) }), t[28] = te, t[29] = R, t[30] = B) : B = t[30];
|
|
217
|
+
let V;
|
|
218
|
+
t[31] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ S(u, { children: "Open in new window" }), t[31] = V) : V = t[31];
|
|
219
|
+
let H;
|
|
220
|
+
t[32] === B ? H = t[33] : (H = /* @__PURE__ */ C(d, { children: [B, V] }), t[32] = B, t[33] = H);
|
|
221
|
+
let U = !s && !a, W;
|
|
222
|
+
t[34] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ S(q, { size: 16 }), t[34] = W) : W = t[34];
|
|
223
|
+
let G;
|
|
224
|
+
t[35] !== D || t[36] !== U ? (G = /* @__PURE__ */ S(l, { render: /* @__PURE__ */ S("button", {
|
|
225
|
+
type: "button",
|
|
226
|
+
className: Me,
|
|
227
|
+
onClick: D,
|
|
228
|
+
disabled: U,
|
|
229
|
+
"aria-label": "Remove link",
|
|
230
|
+
children: W
|
|
231
|
+
}) }), t[35] = D, t[36] = U, t[37] = G) : G = t[37];
|
|
232
|
+
let K;
|
|
233
|
+
t[38] === Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */ S(u, { children: "Remove link" }), t[38] = K) : K = t[38];
|
|
234
|
+
let J;
|
|
235
|
+
t[39] === G ? J = t[40] : (J = /* @__PURE__ */ C(d, { children: [G, K] }), t[39] = G, t[40] = J);
|
|
236
|
+
let Y;
|
|
237
|
+
t[41] !== N || t[42] !== L || t[43] !== H || t[44] !== J ? (Y = /* @__PURE__ */ S(p, { children: /* @__PURE__ */ S(g, {
|
|
238
|
+
side: "bottom",
|
|
239
|
+
align: "center",
|
|
240
|
+
children: /* @__PURE__ */ C(f.Popup, {
|
|
241
|
+
className: Ae,
|
|
242
|
+
children: [
|
|
243
|
+
N,
|
|
244
|
+
L,
|
|
245
|
+
H,
|
|
246
|
+
J
|
|
247
|
+
]
|
|
248
|
+
})
|
|
249
|
+
}) }), t[41] = N, t[42] = L, t[43] = H, t[44] = J, t[45] = Y) : Y = t[45];
|
|
250
|
+
let X;
|
|
251
|
+
return t[46] !== r || t[47] !== Y || t[48] !== k ? (X = /* @__PURE__ */ C(m, {
|
|
252
|
+
open: r,
|
|
253
|
+
onOpenChange: i,
|
|
254
|
+
children: [k, Y]
|
|
255
|
+
}), t[46] = r, t[47] = Y, t[48] = k, t[49] = X) : X = t[49], X;
|
|
256
|
+
};
|
|
257
|
+
function Pe(e) {
|
|
258
|
+
let { editor: t } = e;
|
|
259
|
+
return {
|
|
260
|
+
isActive: t.isActive("link"),
|
|
261
|
+
currentUrl: t.getAttributes("link")?.href ?? ""
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function Fe(e) {
|
|
265
|
+
return e.preventDefault();
|
|
266
|
+
}
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region ../../libraries/react-collection/dist/components/editor/menus/TurnIntoMenu.cssm.js
|
|
269
|
+
var Ie = "_1keigwl0", Le = "_1keigwl1 _5pk5r80", Re = (e) => (t) => t.chain().focus().setHeading({ level: e }).run(), ze = [
|
|
270
|
+
{
|
|
271
|
+
type: "paragraph",
|
|
272
|
+
label: "Text",
|
|
273
|
+
Icon: H,
|
|
274
|
+
isActive: (e) => e.isActive("paragraph"),
|
|
275
|
+
canApply: (e) => e.can().setParagraph() || e.can().clearNodes(),
|
|
276
|
+
apply: (e) => e.chain().focus().setParagraph().run()
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
type: "heading_1",
|
|
280
|
+
label: "Heading 1",
|
|
281
|
+
Icon: N,
|
|
282
|
+
isActive: (e) => e.isActive("heading", { level: 1 }),
|
|
283
|
+
canApply: (e) => e.can().setHeading({ level: 1 }) || e.can().clearNodes(),
|
|
284
|
+
apply: Re(1)
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
type: "heading_2",
|
|
288
|
+
label: "Heading 2",
|
|
289
|
+
Icon: re,
|
|
290
|
+
isActive: (e) => e.isActive("heading", { level: 2 }),
|
|
291
|
+
canApply: (e) => e.can().setHeading({ level: 2 }) || e.can().clearNodes(),
|
|
292
|
+
apply: Re(2)
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
type: "heading_3",
|
|
296
|
+
label: "Heading 3",
|
|
297
|
+
Icon: P,
|
|
298
|
+
isActive: (e) => e.isActive("heading", { level: 3 }),
|
|
299
|
+
canApply: (e) => e.can().setHeading({ level: 3 }) || e.can().clearNodes(),
|
|
300
|
+
apply: Re(3)
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
type: "heading_4",
|
|
304
|
+
label: "Heading 4",
|
|
305
|
+
Icon: F,
|
|
306
|
+
isActive: (e) => e.isActive("heading", { level: 4 }),
|
|
307
|
+
canApply: (e) => e.can().setHeading({ level: 4 }) || e.can().clearNodes(),
|
|
308
|
+
apply: Re(4)
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
type: "heading_5",
|
|
312
|
+
label: "Heading 5",
|
|
313
|
+
Icon: I,
|
|
314
|
+
isActive: (e) => e.isActive("heading", { level: 5 }),
|
|
315
|
+
canApply: (e) => e.can().setHeading({ level: 5 }) || e.can().clearNodes(),
|
|
316
|
+
apply: Re(5)
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
type: "heading_6",
|
|
320
|
+
label: "Heading 6",
|
|
321
|
+
Icon: L,
|
|
322
|
+
isActive: (e) => e.isActive("heading", { level: 6 }),
|
|
323
|
+
canApply: (e) => e.can().setHeading({ level: 6 }) || e.can().clearNodes(),
|
|
324
|
+
apply: Re(6)
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
type: "bulletList",
|
|
328
|
+
label: "Bullet List",
|
|
329
|
+
Icon: z,
|
|
330
|
+
isActive: (e) => e.isActive("bulletList"),
|
|
331
|
+
canApply: (e) => e.can().toggleBulletList() || e.can().clearNodes(),
|
|
332
|
+
apply: (e) => e.chain().focus().toggleBulletList().run()
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
type: "orderedList",
|
|
336
|
+
label: "Ordered List",
|
|
337
|
+
Icon: B,
|
|
338
|
+
isActive: (e) => e.isActive("orderedList"),
|
|
339
|
+
canApply: (e) => e.can().toggleOrderedList() || e.can().clearNodes(),
|
|
340
|
+
apply: (e) => e.chain().focus().toggleOrderedList().run()
|
|
341
|
+
}
|
|
342
|
+
], Be = (e) => {
|
|
343
|
+
let t = _(19), { editor: n } = e, [r, i] = b(!1), { activeBlock: a, canConvert: o, structural: s } = ge({
|
|
344
|
+
editor: n,
|
|
345
|
+
selector: Ve
|
|
346
|
+
}) ?? {
|
|
347
|
+
activeBlock: null,
|
|
348
|
+
canConvert: !1,
|
|
349
|
+
structural: !1
|
|
350
|
+
}, c = a?.Icon ?? V, l = a?.label ?? "Turn Into", u = s || !o, d, v;
|
|
351
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ S(A, { size: 12 }), v = (e) => {
|
|
352
|
+
e.preventDefault(), i(!0);
|
|
353
|
+
}, t[0] = d, t[1] = v) : (d = t[0], v = t[1]);
|
|
354
|
+
let y;
|
|
355
|
+
t[2] !== c || t[3] !== u || t[4] !== l ? (y = /* @__PURE__ */ S(h, {
|
|
356
|
+
onPointerDown: He,
|
|
357
|
+
render: /* @__PURE__ */ S($, {
|
|
358
|
+
label: l,
|
|
359
|
+
Icon: c,
|
|
360
|
+
disabled: u,
|
|
361
|
+
trailing: d,
|
|
362
|
+
onClick: v
|
|
363
|
+
})
|
|
364
|
+
}), t[2] = c, t[3] = u, t[4] = l, t[5] = y) : y = t[5];
|
|
365
|
+
let x;
|
|
366
|
+
if (t[6] !== a?.type || t[7] !== n) {
|
|
367
|
+
let e;
|
|
368
|
+
t[9] === a?.type ? e = t[10] : (e = (e) => a?.type !== e.type, t[9] = a?.type, t[10] = e);
|
|
369
|
+
let r;
|
|
370
|
+
t[11] === n ? r = t[12] : (r = (e) => /* @__PURE__ */ C("button", {
|
|
371
|
+
type: "button",
|
|
372
|
+
className: Le,
|
|
373
|
+
disabled: !e.canApply(n),
|
|
374
|
+
onClick: () => {
|
|
375
|
+
e.apply(n), i(!1);
|
|
376
|
+
},
|
|
377
|
+
children: [/* @__PURE__ */ S(e.Icon, { size: 16 }), /* @__PURE__ */ S("span", { children: e.label })]
|
|
378
|
+
}, e.type), t[11] = n, t[12] = r), x = ze.filter(e).map(r), t[6] = a?.type, t[7] = n, t[8] = x;
|
|
379
|
+
} else x = t[8];
|
|
380
|
+
let w;
|
|
381
|
+
t[13] === x ? w = t[14] : (w = /* @__PURE__ */ S(p, { children: /* @__PURE__ */ S(g, {
|
|
382
|
+
side: "bottom",
|
|
383
|
+
align: "start",
|
|
384
|
+
children: /* @__PURE__ */ S(f.Popup, {
|
|
385
|
+
className: Ie,
|
|
386
|
+
children: x
|
|
387
|
+
})
|
|
388
|
+
}) }), t[13] = x, t[14] = w);
|
|
389
|
+
let T;
|
|
390
|
+
return t[15] !== r || t[16] !== y || t[17] !== w ? (T = /* @__PURE__ */ C(m, {
|
|
391
|
+
open: r,
|
|
392
|
+
onOpenChange: i,
|
|
393
|
+
children: [y, w]
|
|
394
|
+
}), t[15] = r, t[16] = y, t[17] = w, t[18] = T) : T = t[18], T;
|
|
395
|
+
};
|
|
396
|
+
function Ve(e) {
|
|
397
|
+
let { editor: t } = e;
|
|
398
|
+
return {
|
|
399
|
+
activeBlock: ze.find((e) => e.isActive(t)) ?? null,
|
|
400
|
+
canConvert: we(t, xe),
|
|
401
|
+
structural: Ce(t)
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
function He(e) {
|
|
405
|
+
return e.preventDefault();
|
|
406
|
+
}
|
|
407
|
+
//#endregion
|
|
408
|
+
//#region ../../libraries/react-collection/dist/components/editor/Toolbar.js
|
|
409
|
+
var Ue = [
|
|
410
|
+
{
|
|
411
|
+
mark: "bold",
|
|
412
|
+
label: "Bold",
|
|
413
|
+
Icon: k
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
mark: "italic",
|
|
417
|
+
label: "Italic",
|
|
418
|
+
Icon: R
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
mark: "underline",
|
|
422
|
+
label: "Underline",
|
|
423
|
+
Icon: J
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
mark: "strike",
|
|
427
|
+
label: "Strike",
|
|
428
|
+
Icon: W
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
mark: "code",
|
|
432
|
+
label: "Code",
|
|
433
|
+
Icon: j
|
|
434
|
+
}
|
|
435
|
+
], We = [{
|
|
436
|
+
mark: "superscript",
|
|
437
|
+
label: "Superscript",
|
|
438
|
+
Icon: K
|
|
439
|
+
}, {
|
|
440
|
+
mark: "subscript",
|
|
441
|
+
label: "Subscript",
|
|
442
|
+
Icon: G
|
|
443
|
+
}], Ge = [
|
|
444
|
+
{
|
|
445
|
+
align: "left",
|
|
446
|
+
label: "Align left",
|
|
447
|
+
Icon: D
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
align: "center",
|
|
451
|
+
label: "Align center",
|
|
452
|
+
Icon: T
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
align: "right",
|
|
456
|
+
label: "Align right",
|
|
457
|
+
Icon: ee
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
align: "justify",
|
|
461
|
+
label: "Align justify",
|
|
462
|
+
Icon: E
|
|
463
|
+
}
|
|
464
|
+
], Ke = (e) => {
|
|
465
|
+
let t = _(9), { editor: n, mark: r, label: i, Icon: a } = e, { isActive: o, canExecute: s } = ge({
|
|
466
|
+
editor: n,
|
|
467
|
+
selector: (e) => {
|
|
468
|
+
let { editor: t } = e;
|
|
469
|
+
return {
|
|
470
|
+
isActive: t.isActive(r),
|
|
471
|
+
canExecute: t.isEditable && t.can().toggleMark(r)
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
}) ?? {
|
|
475
|
+
isActive: !1,
|
|
476
|
+
canExecute: !1
|
|
477
|
+
}, c = !s, l;
|
|
478
|
+
t[0] !== n || t[1] !== r ? (l = () => n.chain().focus().toggleMark(r).run(), t[0] = n, t[1] = r, t[2] = l) : l = t[2];
|
|
479
|
+
let u;
|
|
480
|
+
return t[3] !== a || t[4] !== o || t[5] !== i || t[6] !== c || t[7] !== l ? (u = /* @__PURE__ */ S($, {
|
|
481
|
+
label: i,
|
|
482
|
+
Icon: a,
|
|
483
|
+
isActive: o,
|
|
484
|
+
disabled: c,
|
|
485
|
+
onClick: l
|
|
486
|
+
}), t[3] = a, t[4] = o, t[5] = i, t[6] = c, t[7] = l, t[8] = u) : u = t[8], u;
|
|
487
|
+
}, qe = (e) => {
|
|
488
|
+
let t = _(9), { editor: n, align: r, label: i, Icon: a } = e, { isActive: o, canExecute: s } = ge({
|
|
489
|
+
editor: n,
|
|
490
|
+
selector: (e) => {
|
|
491
|
+
let { editor: t } = e;
|
|
492
|
+
return {
|
|
493
|
+
isActive: t.isActive({ textAlign: r }),
|
|
494
|
+
canExecute: t.isEditable && t.can().setNodeTextAlign(r)
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
}) ?? {
|
|
498
|
+
isActive: !1,
|
|
499
|
+
canExecute: !1
|
|
500
|
+
}, c = !s, l;
|
|
501
|
+
t[0] !== r || t[1] !== n ? (l = () => n.chain().focus().setNodeTextAlign(r).run(), t[0] = r, t[1] = n, t[2] = l) : l = t[2];
|
|
502
|
+
let u;
|
|
503
|
+
return t[3] !== a || t[4] !== o || t[5] !== i || t[6] !== c || t[7] !== l ? (u = /* @__PURE__ */ S($, {
|
|
504
|
+
label: i,
|
|
505
|
+
Icon: a,
|
|
506
|
+
isActive: o,
|
|
507
|
+
disabled: c,
|
|
508
|
+
onClick: l
|
|
509
|
+
}), t[3] = a, t[4] = o, t[5] = i, t[6] = c, t[7] = l, t[8] = u) : u = t[8], u;
|
|
510
|
+
}, Je = (e) => {
|
|
511
|
+
let t = _(5), { editor: n } = e, r = !(ge({
|
|
512
|
+
editor: n,
|
|
513
|
+
selector: Qe
|
|
514
|
+
}) ?? !1), i;
|
|
515
|
+
t[0] === n ? i = t[1] : (i = () => n.chain().focus().undo().run(), t[0] = n, t[1] = i);
|
|
516
|
+
let a;
|
|
517
|
+
return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ S($, {
|
|
518
|
+
label: "Undo",
|
|
519
|
+
Icon: te,
|
|
520
|
+
disabled: r,
|
|
521
|
+
onClick: i
|
|
522
|
+
}), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
|
|
523
|
+
}, Ye = (e) => {
|
|
524
|
+
let t = _(5), { editor: n } = e, r = !(ge({
|
|
525
|
+
editor: n,
|
|
526
|
+
selector: $e
|
|
527
|
+
}) ?? !1), i;
|
|
528
|
+
t[0] === n ? i = t[1] : (i = () => n.chain().focus().redo().run(), t[0] = n, t[1] = i);
|
|
529
|
+
let a;
|
|
530
|
+
return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ S($, {
|
|
531
|
+
label: "Redo",
|
|
532
|
+
Icon: O,
|
|
533
|
+
disabled: r,
|
|
534
|
+
onClick: i
|
|
535
|
+
}), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
|
|
536
|
+
}, Xe = (e) => {
|
|
537
|
+
let t = _(5), { editor: n } = e, r = !(ge({
|
|
538
|
+
editor: n,
|
|
539
|
+
selector: et
|
|
540
|
+
}) ?? !1), i;
|
|
541
|
+
t[0] === n ? i = t[1] : (i = () => Oe(n), t[0] = n, t[1] = i);
|
|
542
|
+
let a;
|
|
543
|
+
return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ S($, {
|
|
544
|
+
label: "Reset formatting",
|
|
545
|
+
Icon: U,
|
|
546
|
+
disabled: r,
|
|
547
|
+
onClick: i
|
|
548
|
+
}), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
|
|
549
|
+
}, Ze = (e) => {
|
|
550
|
+
let t = _(33), { children: n } = e, { editor: r } = me();
|
|
551
|
+
if (!r) return null;
|
|
552
|
+
let i;
|
|
553
|
+
t[0] === r ? i = t[1] : (i = /* @__PURE__ */ S("div", {
|
|
554
|
+
className: ye,
|
|
555
|
+
children: /* @__PURE__ */ S(Be, { editor: r })
|
|
556
|
+
}), t[0] = r, t[1] = i);
|
|
557
|
+
let o;
|
|
558
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ S(a, { orientation: "vertical" }), t[2] = o) : o = t[2];
|
|
559
|
+
let s;
|
|
560
|
+
t[3] === r ? s = t[4] : (s = Ue.map((e) => /* @__PURE__ */ S(Ke, {
|
|
561
|
+
editor: r,
|
|
562
|
+
...e
|
|
563
|
+
}, e.mark)), t[3] = r, t[4] = s);
|
|
564
|
+
let c;
|
|
565
|
+
t[5] === s ? c = t[6] : (c = /* @__PURE__ */ S("div", {
|
|
566
|
+
className: ye,
|
|
567
|
+
children: s
|
|
568
|
+
}), t[5] = s, t[6] = c);
|
|
569
|
+
let l;
|
|
570
|
+
t[7] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ S(a, { orientation: "vertical" }), t[7] = l) : l = t[7];
|
|
571
|
+
let u;
|
|
572
|
+
t[8] === r ? u = t[9] : (u = /* @__PURE__ */ S("div", {
|
|
573
|
+
className: ye,
|
|
574
|
+
children: /* @__PURE__ */ S(Ne, { editor: r })
|
|
575
|
+
}), t[8] = r, t[9] = u);
|
|
576
|
+
let d;
|
|
577
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ S(a, { orientation: "vertical" }), t[10] = d) : d = t[10];
|
|
578
|
+
let f;
|
|
579
|
+
t[11] === r ? f = t[12] : (f = Ge.map((e) => /* @__PURE__ */ S(qe, {
|
|
580
|
+
editor: r,
|
|
581
|
+
...e
|
|
582
|
+
}, e.align)), t[11] = r, t[12] = f);
|
|
583
|
+
let p;
|
|
584
|
+
t[13] === f ? p = t[14] : (p = /* @__PURE__ */ S("div", {
|
|
585
|
+
className: ye,
|
|
586
|
+
children: f
|
|
587
|
+
}), t[13] = f, t[14] = p);
|
|
588
|
+
let m;
|
|
589
|
+
t[15] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ S(a, { orientation: "vertical" }), t[15] = m) : m = t[15];
|
|
590
|
+
let h;
|
|
591
|
+
t[16] === r ? h = t[17] : (h = We.map((e) => /* @__PURE__ */ S(Ke, {
|
|
592
|
+
editor: r,
|
|
593
|
+
...e
|
|
594
|
+
}, e.mark)), t[16] = r, t[17] = h);
|
|
595
|
+
let g;
|
|
596
|
+
t[18] === h ? g = t[19] : (g = /* @__PURE__ */ S("div", {
|
|
597
|
+
className: ye,
|
|
598
|
+
children: h
|
|
599
|
+
}), t[18] = h, t[19] = g);
|
|
600
|
+
let v;
|
|
601
|
+
t[20] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ S(a, { orientation: "vertical" }), t[20] = v) : v = t[20];
|
|
602
|
+
let y;
|
|
603
|
+
t[21] === r ? y = t[22] : (y = /* @__PURE__ */ C("div", {
|
|
604
|
+
className: ye,
|
|
605
|
+
children: [
|
|
606
|
+
/* @__PURE__ */ S(Xe, { editor: r }),
|
|
607
|
+
/* @__PURE__ */ S(Je, { editor: r }),
|
|
608
|
+
/* @__PURE__ */ S(Ye, { editor: r })
|
|
609
|
+
]
|
|
610
|
+
}), t[21] = r, t[22] = y);
|
|
611
|
+
let b;
|
|
612
|
+
t[23] === n ? b = t[24] : (b = n && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(a, { orientation: "vertical" }), /* @__PURE__ */ S("div", {
|
|
613
|
+
className: "_261ja31",
|
|
614
|
+
children: n
|
|
615
|
+
})] }), t[23] = n, t[24] = b);
|
|
616
|
+
let w;
|
|
617
|
+
return t[25] !== i || t[26] !== g || t[27] !== y || t[28] !== b || t[29] !== c || t[30] !== u || t[31] !== p ? (w = /* @__PURE__ */ C("div", {
|
|
618
|
+
className: ve,
|
|
619
|
+
children: [
|
|
620
|
+
i,
|
|
621
|
+
o,
|
|
622
|
+
c,
|
|
623
|
+
l,
|
|
624
|
+
u,
|
|
625
|
+
d,
|
|
626
|
+
p,
|
|
627
|
+
m,
|
|
628
|
+
g,
|
|
629
|
+
v,
|
|
630
|
+
y,
|
|
631
|
+
b
|
|
632
|
+
]
|
|
633
|
+
}), t[25] = i, t[26] = g, t[27] = y, t[28] = b, t[29] = c, t[30] = u, t[31] = p, t[32] = w) : w = t[32], w;
|
|
634
|
+
};
|
|
635
|
+
function Qe(e) {
|
|
636
|
+
let { editor: t } = e;
|
|
637
|
+
return t.isEditable && t.can().undo();
|
|
638
|
+
}
|
|
639
|
+
function $e(e) {
|
|
640
|
+
let { editor: t } = e;
|
|
641
|
+
return t.isEditable && t.can().redo();
|
|
642
|
+
}
|
|
643
|
+
function et(e) {
|
|
644
|
+
let { editor: t } = e;
|
|
645
|
+
return t.isEditable && ke(t);
|
|
646
|
+
}
|
|
647
|
+
//#endregion
|
|
648
|
+
//#region ../../libraries/react-collection/dist/widgets/richTextWidget/RichTextWidget.cssm.js
|
|
649
|
+
var tt = "_1vx76w30", nt = "_1vx76w33", rt = "_1vx76w34", it = { style: t({ baseSpacing: ".875rem" }) }, at = (e) => {
|
|
650
|
+
let t = _(58), { field: r } = e, [l, u] = b(!1), { key: d, label: f, helper_text: p, readonly: m, placeholder: h } = r, g = d === void 0 ? "" : d, v = f === void 0 ? "" : f, x = p === void 0 ? "" : p, T = m === void 0 ? !1 : m, E;
|
|
651
|
+
t[0] === r ? E = t[1] : (E = o(r), t[0] = r, t[1] = E);
|
|
652
|
+
let D;
|
|
653
|
+
t[2] !== g || t[3] !== E ? (D = {
|
|
654
|
+
name: g,
|
|
655
|
+
rules: E
|
|
656
|
+
}, t[2] = g, t[3] = E, t[4] = D) : D = t[4];
|
|
657
|
+
let { field: ee, fieldState: te } = ce(D), { value: O, onBlur: k, onChange: A, disabled: j } = ee, ne = h || "Write something ...", M;
|
|
658
|
+
t[5] === ne ? M = t[6] : (M = _e({ placeholder: ne }), t[5] = ne, t[6] = M);
|
|
659
|
+
let N = O || "", re = !j && !T, P;
|
|
660
|
+
t[7] === Symbol.for("react.memo_cache_sentinel") ? (P = { attributes: {
|
|
661
|
+
autocomplete: "off",
|
|
662
|
+
autocorrect: "off",
|
|
663
|
+
autocapitalize: "off",
|
|
664
|
+
class: n
|
|
665
|
+
} }, t[7] = P) : P = t[7];
|
|
666
|
+
let F;
|
|
667
|
+
t[8] === A ? F = t[9] : (F = (e) => {
|
|
668
|
+
let { editor: t } = e;
|
|
669
|
+
return A(t.getHTML());
|
|
670
|
+
}, t[8] = A, t[9] = F);
|
|
671
|
+
let I;
|
|
672
|
+
t[10] !== N || t[11] !== re || t[12] !== F || t[13] !== M ? (I = {
|
|
673
|
+
extensions: M,
|
|
674
|
+
content: N,
|
|
675
|
+
editable: re,
|
|
676
|
+
editorProps: P,
|
|
677
|
+
onUpdate: F,
|
|
678
|
+
immediatelyRender: !1
|
|
679
|
+
}, t[10] = N, t[11] = re, t[12] = F, t[13] = M, t[14] = I) : I = t[14];
|
|
680
|
+
let L = he(I), R;
|
|
681
|
+
t[15] !== L || t[16] !== l || t[17] !== O ? (R = () => {
|
|
682
|
+
L?.commands && !l && (L.commands.setContent(O || "", { emitUpdate: !1 }), u(!0));
|
|
683
|
+
}, t[15] = L, t[16] = l, t[17] = O, t[18] = R) : R = t[18];
|
|
684
|
+
let ie;
|
|
685
|
+
t[19] === O ? ie = t[20] : (ie = [O], t[19] = O, t[20] = ie), y(R, ie);
|
|
686
|
+
let z, B;
|
|
687
|
+
t[21] !== j || t[22] !== L || t[23] !== T ? (z = () => {
|
|
688
|
+
L && L.setEditable(!j && !T, !1);
|
|
689
|
+
}, B = [
|
|
690
|
+
L,
|
|
691
|
+
j,
|
|
692
|
+
T
|
|
693
|
+
], t[21] = j, t[22] = L, t[23] = T, t[24] = z, t[25] = B) : (z = t[24], B = t[25]), y(z, B);
|
|
694
|
+
let V, H;
|
|
695
|
+
t[26] !== L || t[27] !== k ? (V = () => {
|
|
696
|
+
if (L) return L.on("blur", k), () => {
|
|
697
|
+
L.off("blur", k);
|
|
698
|
+
};
|
|
699
|
+
}, H = [L, k], t[26] = L, t[27] = k, t[28] = V, t[29] = H) : (V = t[28], H = t[29]), y(V, H);
|
|
700
|
+
let U = te?.error?.message, W = !!r?.required, G = j && "_1vx76w31", K = T && "_1vx76w32", q;
|
|
701
|
+
t[30] !== G || t[31] !== K ? (q = w(tt, G, K), t[30] = G, t[31] = K, t[32] = q) : q = t[32];
|
|
702
|
+
let J;
|
|
703
|
+
t[33] === L ? J = t[34] : (J = { editor: L }, t[33] = L, t[34] = J);
|
|
704
|
+
let Y, X;
|
|
705
|
+
t[35] === Symbol.for("react.memo_cache_sentinel") ? (Y = /* @__PURE__ */ S(Ze, {}), X = /* @__PURE__ */ S(a, { orientation: "horizontal" }), t[35] = Y, t[36] = X) : (Y = t[35], X = t[36]);
|
|
706
|
+
let Z;
|
|
707
|
+
t[37] === L?.commands ? Z = t[38] : (Z = () => L?.commands.focus(), t[37] = L?.commands, t[38] = Z);
|
|
708
|
+
let Q;
|
|
709
|
+
t[39] === L ? Q = t[40] : (Q = /* @__PURE__ */ S(fe, { editor: L }), t[39] = L, t[40] = Q);
|
|
710
|
+
let ae;
|
|
711
|
+
t[41] !== Z || t[42] !== Q ? (ae = /* @__PURE__ */ C("div", {
|
|
712
|
+
className: nt,
|
|
713
|
+
children: [
|
|
714
|
+
Y,
|
|
715
|
+
X,
|
|
716
|
+
/* @__PURE__ */ S("div", {
|
|
717
|
+
className: rt,
|
|
718
|
+
onClick: Z,
|
|
719
|
+
children: Q
|
|
720
|
+
})
|
|
721
|
+
]
|
|
722
|
+
}), t[41] = Z, t[42] = Q, t[43] = ae) : ae = t[43];
|
|
723
|
+
let oe;
|
|
724
|
+
t[44] !== J || t[45] !== ae ? (oe = /* @__PURE__ */ S(i, {
|
|
725
|
+
theme: it,
|
|
726
|
+
children: /* @__PURE__ */ S(c, { children: /* @__PURE__ */ S(pe.Provider, {
|
|
727
|
+
value: J,
|
|
728
|
+
children: ae
|
|
729
|
+
}) })
|
|
730
|
+
}), t[44] = J, t[45] = ae, t[46] = oe) : oe = t[46];
|
|
731
|
+
let se;
|
|
732
|
+
t[47] !== q || t[48] !== oe ? (se = /* @__PURE__ */ S("div", {
|
|
733
|
+
className: q,
|
|
734
|
+
children: oe
|
|
735
|
+
}), t[47] = q, t[48] = oe, t[49] = se) : se = t[49];
|
|
736
|
+
let le;
|
|
737
|
+
return t[50] !== x || t[51] !== g || t[52] !== v || t[53] !== T || t[54] !== U || t[55] !== W || t[56] !== se ? (le = /* @__PURE__ */ S(s, {
|
|
738
|
+
error: U,
|
|
739
|
+
helperText: x,
|
|
740
|
+
readOnly: T,
|
|
741
|
+
label: v,
|
|
742
|
+
htmlFor: g,
|
|
743
|
+
isRequired: W,
|
|
744
|
+
children: se
|
|
745
|
+
}), t[50] = x, t[51] = g, t[52] = v, t[53] = T, t[54] = U, t[55] = W, t[56] = se, t[57] = le) : le = t[57], le;
|
|
746
|
+
};
|
|
747
|
+
//#endregion
|
|
748
|
+
export { at as RichTextWidget, at as default };
|