@apolitical/component-library 6.0.3-ac.3 → 6.0.3-ac.5
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/form/components/rich-text-editor/rich-text-editor.types.d.ts +2 -1
- package/index.js +11 -11
- package/index.mjs +82 -77
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -372,10 +372,10 @@ function Rh() {
|
|
|
372
372
|
var Yn = M ? M.displayName || M.name : "", Xo = Yn ? H(Yn) : "";
|
|
373
373
|
return typeof M == "function" && ee.set(M, Xo), Xo;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function ge(M, oe, fe) {
|
|
376
376
|
return G(M, !1);
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function ve(M) {
|
|
379
379
|
var oe = M.prototype;
|
|
380
380
|
return !!(oe && oe.isReactComponent);
|
|
381
381
|
}
|
|
@@ -383,7 +383,7 @@ function Rh() {
|
|
|
383
383
|
if (M == null)
|
|
384
384
|
return "";
|
|
385
385
|
if (typeof M == "function")
|
|
386
|
-
return G(M,
|
|
386
|
+
return G(M, ve(M));
|
|
387
387
|
if (typeof M == "string")
|
|
388
388
|
return H(M);
|
|
389
389
|
switch (M) {
|
|
@@ -395,7 +395,7 @@ function Rh() {
|
|
|
395
395
|
if (typeof M == "object")
|
|
396
396
|
switch (M.$$typeof) {
|
|
397
397
|
case l:
|
|
398
|
-
return
|
|
398
|
+
return ge(M.render);
|
|
399
399
|
case h:
|
|
400
400
|
return Be(M.type, oe, fe);
|
|
401
401
|
case m: {
|
|
@@ -3240,20 +3240,20 @@ function Hm() {
|
|
|
3240
3240
|
}
|
|
3241
3241
|
function A(G) {
|
|
3242
3242
|
if (typeof G == "object" && G !== null) {
|
|
3243
|
-
var
|
|
3244
|
-
switch (
|
|
3243
|
+
var ge = G.$$typeof;
|
|
3244
|
+
switch (ge) {
|
|
3245
3245
|
case t:
|
|
3246
|
-
var
|
|
3247
|
-
switch (
|
|
3246
|
+
var ve = G.type;
|
|
3247
|
+
switch (ve) {
|
|
3248
3248
|
case l:
|
|
3249
3249
|
case u:
|
|
3250
3250
|
case r:
|
|
3251
3251
|
case a:
|
|
3252
3252
|
case i:
|
|
3253
3253
|
case h:
|
|
3254
|
-
return
|
|
3254
|
+
return ve;
|
|
3255
3255
|
default:
|
|
3256
|
-
var Be =
|
|
3256
|
+
var Be = ve && ve.$$typeof;
|
|
3257
3257
|
switch (Be) {
|
|
3258
3258
|
case o:
|
|
3259
3259
|
case d:
|
|
@@ -3262,11 +3262,11 @@ function Hm() {
|
|
|
3262
3262
|
case s:
|
|
3263
3263
|
return Be;
|
|
3264
3264
|
default:
|
|
3265
|
-
return
|
|
3265
|
+
return ge;
|
|
3266
3266
|
}
|
|
3267
3267
|
}
|
|
3268
3268
|
case n:
|
|
3269
|
-
return
|
|
3269
|
+
return ge;
|
|
3270
3270
|
}
|
|
3271
3271
|
}
|
|
3272
3272
|
}
|
|
@@ -3495,11 +3495,11 @@ function Zm() {
|
|
|
3495
3495
|
);
|
|
3496
3496
|
throw G.name = "Invariant Violation", G;
|
|
3497
3497
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
3498
|
-
var
|
|
3499
|
-
!J[
|
|
3498
|
+
var ge = H + ":" + N;
|
|
3499
|
+
!J[ge] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
3500
3500
|
re < 3 && (a(
|
|
3501
3501
|
"You are manually calling a React.PropTypes validation function for the `" + ee + "` prop on `" + H + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
3502
|
-
), J[
|
|
3502
|
+
), J[ge] = !0, re++);
|
|
3503
3503
|
}
|
|
3504
3504
|
}
|
|
3505
3505
|
return S[N] == null ? I ? S[N] === null ? new f("The " + Y + " `" + ee + "` is marked as required " + ("in `" + H + "`, but its value is `null`.")) : new f("The " + Y + " `" + ee + "` is marked as required in " + ("`" + H + "`, but its value is `undefined`.")) : null : x(S, N, H, Y, ee);
|
|
@@ -3584,8 +3584,8 @@ function Zm() {
|
|
|
3584
3584
|
if (g(N, x[H]))
|
|
3585
3585
|
return null;
|
|
3586
3586
|
var Y = JSON.stringify(x, function(se, G) {
|
|
3587
|
-
var
|
|
3588
|
-
return
|
|
3587
|
+
var ge = U(G);
|
|
3588
|
+
return ge === "symbol" ? String(G) : G;
|
|
3589
3589
|
});
|
|
3590
3590
|
return new f("Invalid " + I + " `" + S + "` of value `" + String(N) + "` " + ("supplied to `" + B + "`, expected one of " + Y + "."));
|
|
3591
3591
|
}
|
|
@@ -3625,8 +3625,8 @@ function Zm() {
|
|
|
3625
3625
|
return null;
|
|
3626
3626
|
G.data && r(G.data, "expectedType") && Y.push(G.data.expectedType);
|
|
3627
3627
|
}
|
|
3628
|
-
var
|
|
3629
|
-
return new f("Invalid " + N + " `" + H + "` supplied to " + ("`" + S + "`" +
|
|
3628
|
+
var ge = Y.length > 0 ? ", expected one of type [" + Y.join(", ") + "]" : "";
|
|
3629
|
+
return new f("Invalid " + N + " `" + H + "` supplied to " + ("`" + S + "`" + ge + "."));
|
|
3630
3630
|
}
|
|
3631
3631
|
return v(_);
|
|
3632
3632
|
}
|
|
@@ -6033,10 +6033,10 @@ const tk = ({
|
|
|
6033
6033
|
total_replies: re,
|
|
6034
6034
|
additional_data: _
|
|
6035
6035
|
} = O, B = (((H = ne == null ? void 0 : ne.like) == null ? void 0 : H.length) || 0) > 0, I = (((Y = ae == null ? void 0 : ae.like) == null ? void 0 : Y.length) || 0) > 0, S = I ? ae == null ? void 0 : ae.like[0].id : "", N = B ? (ee = ne == null ? void 0 : ne.like) == null ? void 0 : ee.map((se) => {
|
|
6036
|
-
var G,
|
|
6036
|
+
var G, ge, ve;
|
|
6037
6037
|
return {
|
|
6038
6038
|
id: (G = se == null ? void 0 : se.user) == null ? void 0 : G.id,
|
|
6039
|
-
name: (
|
|
6039
|
+
name: (ve = (ge = se == null ? void 0 : se.user) == null ? void 0 : ge.data) == null ? void 0 : ve.name
|
|
6040
6040
|
};
|
|
6041
6041
|
}) : !1;
|
|
6042
6042
|
return (O == null ? void 0 : O.verb) !== "post" ? /* @__PURE__ */ c.jsx(c.Fragment, { children: " " }) : /* @__PURE__ */ c.jsx(Wr, { children: /* @__PURE__ */ c.jsx(
|
|
@@ -7048,10 +7048,10 @@ const Cg = ({
|
|
|
7048
7048
|
var G;
|
|
7049
7049
|
return ((G = se == null ? void 0 : se.user) == null ? void 0 : G.id) === (D == null ? void 0 : D.id);
|
|
7050
7050
|
}) : !1, ne = ae ? ae == null ? void 0 : ae.id : "", x = !!ae, re = (((S = k == null ? void 0 : k.like) == null ? void 0 : S.length) || 0) > 0 ? (N = k == null ? void 0 : k.like) == null ? void 0 : N.map((se) => {
|
|
7051
|
-
var G,
|
|
7051
|
+
var G, ge, ve;
|
|
7052
7052
|
return {
|
|
7053
7053
|
id: (G = se == null ? void 0 : se.user) == null ? void 0 : G.id,
|
|
7054
|
-
name: (
|
|
7054
|
+
name: (ve = (ge = se == null ? void 0 : se.user) == null ? void 0 : ge.data) == null ? void 0 : ve.name
|
|
7055
7055
|
};
|
|
7056
7056
|
}) : !1, _ = typeof P.data.content == "string" ? (H = P == null ? void 0 : P.data) == null ? void 0 : H.content : (
|
|
7057
7057
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -9516,13 +9516,13 @@ const f0 = /* @__PURE__ */ qn(d0), qu = (e) => typeof e == "object" && e != null
|
|
|
9516
9516
|
return O;
|
|
9517
9517
|
const B = getComputedStyle(U), I = parseInt(B.borderLeftWidth, 10), S = parseInt(B.borderTopWidth, 10), N = parseInt(B.borderRightWidth, 10), H = parseInt(B.borderBottomWidth, 10);
|
|
9518
9518
|
let Y = 0, ee = 0;
|
|
9519
|
-
const se = "offsetWidth" in U ? U.offsetWidth - U.clientWidth - I - N : 0, G = "offsetHeight" in U ? U.offsetHeight - U.clientHeight - S - H : 0,
|
|
9519
|
+
const se = "offsetWidth" in U ? U.offsetWidth - U.clientWidth - I - N : 0, G = "offsetHeight" in U ? U.offsetHeight - U.clientHeight - S - H : 0, ge = "offsetWidth" in U ? U.offsetWidth === 0 ? 0 : ne / U.offsetWidth : 0, ve = "offsetHeight" in U ? U.offsetHeight === 0 ? 0 : ae / U.offsetHeight : 0;
|
|
9520
9520
|
if (m === U)
|
|
9521
9521
|
Y = o === "start" ? k : o === "end" ? k - v : o === "nearest" ? gi(w, w + v, v, S, H, w + k, w + k + E, E) : k - v / 2, ee = l === "start" ? j : l === "center" ? j - f / 2 : l === "end" ? j - f : gi(b, b + f, f, I, N, b + j, b + j + A, A), Y = Math.max(0, Y + w), ee = Math.max(0, ee + b);
|
|
9522
9522
|
else {
|
|
9523
9523
|
Y = o === "start" ? k - x - S : o === "end" ? k - re + H + G : o === "nearest" ? gi(x, re, ae, S, H + G, k, k + E, E) : k - (x + ae / 2) + G / 2, ee = l === "start" ? j - _ - I : l === "center" ? j - (_ + ne / 2) + se / 2 : l === "end" ? j - J + N + se : gi(_, J, ne, I, N + se, j, j + A, A);
|
|
9524
9524
|
const { scrollLeft: Be, scrollTop: Oe } = U;
|
|
9525
|
-
Y =
|
|
9525
|
+
Y = ve === 0 ? 0 : Math.max(0, Math.min(Oe + Y / ve, U.scrollHeight - ae / ve + G)), ee = ge === 0 ? 0 : Math.max(0, Math.min(Be + ee / ge, U.scrollWidth - ne / ge + se)), k += Oe - Y, j += Be - ee;
|
|
9526
9526
|
}
|
|
9527
9527
|
O.push({ el: U, top: Y, left: ee });
|
|
9528
9528
|
}
|
|
@@ -10389,8 +10389,8 @@ var j0 = (e, t, n) => {
|
|
|
10389
10389
|
} = n;
|
|
10390
10390
|
if (G.length === 0)
|
|
10391
10391
|
break;
|
|
10392
|
-
var
|
|
10393
|
-
if (
|
|
10392
|
+
var ge = ue.leaf(e, ee), ve = ge.text.slice(0, se), Be = ge.text.slice(se + G.length);
|
|
10393
|
+
if (ge.text = ve + Be, t)
|
|
10394
10394
|
for (var [Oe, je] of Z.points(t))
|
|
10395
10395
|
t[je] = Fe.transform(Oe, n);
|
|
10396
10396
|
break;
|
|
@@ -12650,11 +12650,11 @@ var yy = (e, t) => {
|
|
|
12650
12650
|
}));
|
|
12651
12651
|
}
|
|
12652
12652
|
var [w, E] = Z.edges(u), A = y.above(t, {
|
|
12653
|
-
match: (
|
|
12653
|
+
match: (ve) => he.isElement(ve) && y.isBlock(t, ve),
|
|
12654
12654
|
at: w,
|
|
12655
12655
|
voids: l
|
|
12656
12656
|
}), D = y.above(t, {
|
|
12657
|
-
match: (
|
|
12657
|
+
match: (ve) => he.isElement(ve) && y.isBlock(t, ve),
|
|
12658
12658
|
at: E,
|
|
12659
12659
|
voids: l
|
|
12660
12660
|
}), C = A && D && !R.equals(A[1], D[1]), T = R.equals(w.path, E.path), L = l ? null : (r = y.void(t, {
|
|
@@ -12686,8 +12686,8 @@ var yy = (e, t) => {
|
|
|
12686
12686
|
var [O, q] = j;
|
|
12687
12687
|
k && R.compare(q, k) === 0 || (!l && he.isElement(O) && (y.isVoid(t, O) || y.isElementReadOnly(t, O)) || !R.isCommon(q, w.path) && !R.isCommon(q, E.path)) && (F.push(j), k = q);
|
|
12688
12688
|
}
|
|
12689
|
-
var U = Array.from(F, (
|
|
12690
|
-
var [, Be] =
|
|
12689
|
+
var U = Array.from(F, (ve) => {
|
|
12690
|
+
var [, Be] = ve;
|
|
12691
12691
|
return y.pathRef(t, Be);
|
|
12692
12692
|
}), ae = y.pointRef(t, w), ne = y.pointRef(t, E), x = "";
|
|
12693
12693
|
if (!T && !L) {
|
|
@@ -12703,8 +12703,8 @@ var yy = (e, t) => {
|
|
|
12703
12703
|
text: I
|
|
12704
12704
|
}), x = I);
|
|
12705
12705
|
}
|
|
12706
|
-
if (U.reverse().map((
|
|
12707
|
-
at:
|
|
12706
|
+
if (U.reverse().map((ve) => ve.unref()).filter((ve) => ve !== null).forEach((ve) => Q.removeNodes(t, {
|
|
12707
|
+
at: ve,
|
|
12708
12708
|
voids: l
|
|
12709
12709
|
})), !P) {
|
|
12710
12710
|
var S = ne.current, [N] = y.leaf(t, S), {
|
|
@@ -12722,8 +12722,8 @@ var yy = (e, t) => {
|
|
|
12722
12722
|
hanging: !0,
|
|
12723
12723
|
voids: l
|
|
12724
12724
|
}), h && a && s === "character" && x.length > 1 && x.match(/[\u0E00-\u0E7F]+/) && Q.insertText(t, x.slice(0, x.length - o));
|
|
12725
|
-
var se = ae.unref(), G = ne.unref(),
|
|
12726
|
-
n.at == null &&
|
|
12725
|
+
var se = ae.unref(), G = ne.unref(), ge = a ? se || G : G || se;
|
|
12726
|
+
n.at == null && ge && Q.select(t, ge);
|
|
12727
12727
|
}
|
|
12728
12728
|
}
|
|
12729
12729
|
});
|
|
@@ -15281,8 +15281,8 @@ function Z1(e) {
|
|
|
15281
15281
|
text: "",
|
|
15282
15282
|
start: S.offset,
|
|
15283
15283
|
end: N.offset
|
|
15284
|
-
}, se = _t.get(t), G = se == null ? void 0 : se.find((be) => R.equals(be.path, Y)),
|
|
15285
|
-
if (
|
|
15284
|
+
}, se = _t.get(t), G = se == null ? void 0 : se.find((be) => R.equals(be.path, Y)), ge = G ? [G.diff, ee] : [ee], ve = bf(H.text, ...ge);
|
|
15285
|
+
if (ve.length === 0 && (x = !1), Z.isExpanded(O)) {
|
|
15286
15286
|
if (x && R.equals(O.anchor.path, O.focus.path)) {
|
|
15287
15287
|
var Be = {
|
|
15288
15288
|
path: O.anchor.path,
|
|
@@ -16089,11 +16089,11 @@ var Sx = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, Ef(e)), jx =
|
|
|
16089
16089
|
focusNode: ee
|
|
16090
16090
|
} = H, se = X.hasEditableTarget(f, Y) || X.isTargetInsideNonReadonlyVoid(f, Y), G = X.hasEditableTarget(f, ee) || X.isTargetInsideNonReadonlyVoid(f, ee);
|
|
16091
16091
|
if (se && G) {
|
|
16092
|
-
var
|
|
16092
|
+
var ge = X.toSlateRange(f, H, {
|
|
16093
16093
|
exactMatch: !1,
|
|
16094
16094
|
suppressThrow: !0
|
|
16095
16095
|
});
|
|
16096
|
-
|
|
16096
|
+
ge && (!X.isComposing(f) && !(B != null && B.hasPendingChanges()) && !(B != null && B.isFlushing()) ? Q.select(f, ge) : B == null || B.handleUserSelect(ge));
|
|
16097
16097
|
}
|
|
16098
16098
|
s && (!se || !G) && Q.deselect(f);
|
|
16099
16099
|
}
|
|
@@ -16109,7 +16109,7 @@ var Sx = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, Ef(e)), jx =
|
|
|
16109
16109
|
selection: N
|
|
16110
16110
|
} = f, H = X.findDocumentOrShadowRoot(f), Y = H.getSelection();
|
|
16111
16111
|
if (!(!Y || !X.isFocused(f) || (B = z.current) !== null && B !== void 0 && B.hasPendingAction())) {
|
|
16112
|
-
var ee = (
|
|
16112
|
+
var ee = (ve) => {
|
|
16113
16113
|
var Be = Y.type !== "None";
|
|
16114
16114
|
if (!(!N && !Be)) {
|
|
16115
16115
|
var Oe = Y.focusNode, je;
|
|
@@ -16119,7 +16119,7 @@ var Sx = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, Ef(e)), jx =
|
|
|
16119
16119
|
} else
|
|
16120
16120
|
je = Y.anchorNode;
|
|
16121
16121
|
var Le = Mi.get(f), tt = !1;
|
|
16122
|
-
if (Le.contains(je) && Le.contains(Oe) && (tt = !0), Be && tt && N && !
|
|
16122
|
+
if (Le.contains(je) && Le.contains(Oe) && (tt = !0), Be && tt && N && !ve) {
|
|
16123
16123
|
var Te = X.toSlateRange(f, Y, {
|
|
16124
16124
|
exactMatch: !0,
|
|
16125
16125
|
// domSelection is not necessarily a valid Slate range
|
|
@@ -16152,22 +16152,22 @@ var Sx = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, Ef(e)), jx =
|
|
|
16152
16152
|
});
|
|
16153
16153
|
return;
|
|
16154
16154
|
}
|
|
16155
|
-
var G = null,
|
|
16155
|
+
var G = null, ge = requestAnimationFrame(() => {
|
|
16156
16156
|
if (se) {
|
|
16157
|
-
var
|
|
16157
|
+
var ve = (Be) => {
|
|
16158
16158
|
try {
|
|
16159
16159
|
var Oe = X.toDOMNode(f, f);
|
|
16160
16160
|
Oe.focus(), ee(Be);
|
|
16161
16161
|
} catch {
|
|
16162
16162
|
}
|
|
16163
16163
|
};
|
|
16164
|
-
|
|
16165
|
-
|
|
16164
|
+
ve(), G = setTimeout(() => {
|
|
16165
|
+
ve(!0), P.isUpdatingSelection = !1;
|
|
16166
16166
|
});
|
|
16167
16167
|
}
|
|
16168
16168
|
});
|
|
16169
16169
|
return () => {
|
|
16170
|
-
cancelAnimationFrame(
|
|
16170
|
+
cancelAnimationFrame(ge), G && clearTimeout(G);
|
|
16171
16171
|
};
|
|
16172
16172
|
}
|
|
16173
16173
|
});
|
|
@@ -16195,15 +16195,15 @@ var Sx = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, Ef(e)), jx =
|
|
|
16195
16195
|
var se, G;
|
|
16196
16196
|
ee = !0, f.marks && (ee = !1);
|
|
16197
16197
|
var {
|
|
16198
|
-
anchor:
|
|
16199
|
-
} = S, [
|
|
16198
|
+
anchor: ge
|
|
16199
|
+
} = S, [ve, Be] = X.toDOMPoint(f, ge), Oe = (se = ve.parentElement) === null || se === void 0 ? void 0 : se.closest("a"), je = X.getWindow(f);
|
|
16200
16200
|
if (ee && Oe && X.hasDOMNode(f, Oe)) {
|
|
16201
16201
|
var Qe, He = je == null ? void 0 : je.document.createTreeWalker(Oe, NodeFilter.SHOW_TEXT).lastChild();
|
|
16202
|
-
He ===
|
|
16202
|
+
He === ve && ((Qe = He.textContent) === null || Qe === void 0 ? void 0 : Qe.length) === Be && (ee = !1);
|
|
16203
16203
|
}
|
|
16204
|
-
if (ee &&
|
|
16204
|
+
if (ee && ve.parentElement && (je == null || (G = je.getComputedStyle(ve.parentElement)) === null || G === void 0 ? void 0 : G.whiteSpace) === "pre") {
|
|
16205
16205
|
var Le = y.above(f, {
|
|
16206
|
-
at:
|
|
16206
|
+
at: ge.path,
|
|
16207
16207
|
match: (ie) => he.isElement(ie) && y.isBlock(f, ie)
|
|
16208
16208
|
});
|
|
16209
16209
|
Le && ue.string(Le[0]).includes(" ") && (ee = !1);
|
|
@@ -16474,12 +16474,12 @@ var Sx = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, Ef(e)), jx =
|
|
|
16474
16474
|
}
|
|
16475
16475
|
if (s)
|
|
16476
16476
|
return;
|
|
16477
|
-
var se = y.start(f, S), G = y.end(f, S),
|
|
16477
|
+
var se = y.start(f, S), G = y.end(f, S), ge = y.void(f, {
|
|
16478
16478
|
at: se
|
|
16479
|
-
}),
|
|
16479
|
+
}), ve = y.void(f, {
|
|
16480
16480
|
at: G
|
|
16481
16481
|
});
|
|
16482
|
-
if (
|
|
16482
|
+
if (ge && ve && R.equals(ge[1], ve[1])) {
|
|
16483
16483
|
var Be = y.range(f, se);
|
|
16484
16484
|
Q.select(f, Be);
|
|
16485
16485
|
}
|
|
@@ -20695,7 +20695,7 @@ function pC(e) {
|
|
|
20695
20695
|
autolink: a(Qe),
|
|
20696
20696
|
autolinkProtocol: P,
|
|
20697
20697
|
autolinkEmail: P,
|
|
20698
|
-
atxHeading: a(
|
|
20698
|
+
atxHeading: a(ve),
|
|
20699
20699
|
blockQuote: a(Y),
|
|
20700
20700
|
characterEscape: P,
|
|
20701
20701
|
characterReference: P,
|
|
@@ -20711,7 +20711,7 @@ function pC(e) {
|
|
|
20711
20711
|
definitionDestinationString: s,
|
|
20712
20712
|
definitionLabelString: s,
|
|
20713
20713
|
definitionTitleString: s,
|
|
20714
|
-
emphasis: a(
|
|
20714
|
+
emphasis: a(ge),
|
|
20715
20715
|
hardBreakEscape: a(Be),
|
|
20716
20716
|
hardBreakTrailing: a(Be),
|
|
20717
20717
|
htmlFlow: a(Oe, s),
|
|
@@ -20730,7 +20730,7 @@ function pC(e) {
|
|
|
20730
20730
|
referenceString: s,
|
|
20731
20731
|
resourceDestinationString: s,
|
|
20732
20732
|
resourceTitleString: s,
|
|
20733
|
-
setextHeading: a(
|
|
20733
|
+
setextHeading: a(ve),
|
|
20734
20734
|
strong: a(Te),
|
|
20735
20735
|
thematicBreak: a(xe)
|
|
20736
20736
|
},
|
|
@@ -21141,13 +21141,13 @@ function pC(e) {
|
|
|
21141
21141
|
url: ""
|
|
21142
21142
|
};
|
|
21143
21143
|
}
|
|
21144
|
-
function
|
|
21144
|
+
function ge() {
|
|
21145
21145
|
return {
|
|
21146
21146
|
type: "emphasis",
|
|
21147
21147
|
children: []
|
|
21148
21148
|
};
|
|
21149
21149
|
}
|
|
21150
|
-
function
|
|
21150
|
+
function ve() {
|
|
21151
21151
|
return {
|
|
21152
21152
|
type: "heading",
|
|
21153
21153
|
// @ts-expect-error `depth` will be set later.
|
|
@@ -23310,19 +23310,19 @@ const ah = ({
|
|
|
23310
23310
|
if (N) {
|
|
23311
23311
|
const H = Z.isCollapsed(N), [Y, ee] = y.node(_, N, { depth: 1 });
|
|
23312
23312
|
let se = Y, G = se.type;
|
|
23313
|
-
const
|
|
23314
|
-
if (
|
|
23313
|
+
const ge = se.children[0];
|
|
23314
|
+
if (ge && (ge == null ? void 0 : ge[V.h3]) === !0 && Q.insertNodes(_, A), ge && [V.ol, V.ul].includes(ge.type) && (se = ge, G = ge.type), se && he.isElement(se) && G !== V.paragraph) {
|
|
23315
23315
|
if (G === V.blockquote && !S.shiftKey) {
|
|
23316
23316
|
S.stopPropagation(), S.preventDefault(), Q.insertNodes(_, A);
|
|
23317
23317
|
return;
|
|
23318
23318
|
}
|
|
23319
23319
|
if (H) {
|
|
23320
|
-
const [
|
|
23320
|
+
const [ve, Be] = y.parent(_, N, {
|
|
23321
23321
|
edge: "end"
|
|
23322
|
-
}), je =
|
|
23322
|
+
}), je = ve.type;
|
|
23323
23323
|
if ([V.ul, V.ol].includes(G))
|
|
23324
23324
|
if (S.stopPropagation(), S.preventDefault(), je === V.li && k === "Enter") {
|
|
23325
|
-
|
|
23325
|
+
ve.children.length === 1 && "text" in ve.children[0] && ve.children[0].text === "" && Q.removeNodes(_, { at: Be }), Q.insertNodes(_, A, {
|
|
23326
23326
|
at: R.next(ee)
|
|
23327
23327
|
}), Q.select(
|
|
23328
23328
|
_,
|
|
@@ -24047,6 +24047,11 @@ const ut = "publishArticleForm_", Oc = {}, Pc = 10, dk = ({
|
|
|
24047
24047
|
g(L), E();
|
|
24048
24048
|
}
|
|
24049
24049
|
},
|
|
24050
|
+
styling: {
|
|
24051
|
+
toolbar: {
|
|
24052
|
+
showHeadingOption: !0
|
|
24053
|
+
}
|
|
24054
|
+
},
|
|
24050
24055
|
"aria-invalid": !!f,
|
|
24051
24056
|
"aria-errormessage": "error-message"
|
|
24052
24057
|
}
|
|
@@ -26132,7 +26137,7 @@ const rt = "discussion_form_", Da = ({
|
|
|
26132
26137
|
qt(p.formatMessage, `${rt}success`, n.type, "action")
|
|
26133
26138
|
);
|
|
26134
26139
|
const ie = new Event(ot.DISCUSSION_FORM_SUBMITTED);
|
|
26135
|
-
document.dispatchEvent(ie),
|
|
26140
|
+
document.dispatchEvent(ie), ge();
|
|
26136
26141
|
}, 500);
|
|
26137
26142
|
} catch (W) {
|
|
26138
26143
|
const ie = W;
|
|
@@ -26147,13 +26152,13 @@ const rt = "discussion_form_", Da = ({
|
|
|
26147
26152
|
`${rt}error_tooMany`,
|
|
26148
26153
|
n.type,
|
|
26149
26154
|
"action"
|
|
26150
|
-
) : ie != null && ie.message.includes("400") && (pe = `${rt}error`), N(pe),
|
|
26155
|
+
) : ie != null && ie.message.includes("400") && (pe = `${rt}error`), N(pe), ge();
|
|
26151
26156
|
}
|
|
26152
|
-
},
|
|
26157
|
+
}, ge = () => {
|
|
26153
26158
|
_i = setTimeout(() => {
|
|
26154
26159
|
N(!1), Y(!1), v("");
|
|
26155
26160
|
}, 5e3);
|
|
26156
|
-
},
|
|
26161
|
+
}, ve = (xe) => {
|
|
26157
26162
|
I((W) => ({ ...W, data: xe }));
|
|
26158
26163
|
}, Be = !B.title || !Ui(B.title), Oe = !B.body || !Ui(B.body);
|
|
26159
26164
|
let je = Oe;
|
|
@@ -26183,7 +26188,7 @@ const rt = "discussion_form_", Da = ({
|
|
|
26183
26188
|
meta: { isInOverlay: E },
|
|
26184
26189
|
functions: {
|
|
26185
26190
|
onChange: ee,
|
|
26186
|
-
onChangeData:
|
|
26191
|
+
onChangeData: ve,
|
|
26187
26192
|
onMention: ne,
|
|
26188
26193
|
listMembers: x,
|
|
26189
26194
|
clickMentionFallback: J,
|
|
@@ -26429,7 +26434,7 @@ const wa = ({
|
|
|
26429
26434
|
}), [Y, ee] = le(!1), [se, G] = le(
|
|
26430
26435
|
I ? "highlighted" : "default"
|
|
26431
26436
|
/* Default */
|
|
26432
|
-
), [
|
|
26437
|
+
), [ge, ve] = le("");
|
|
26433
26438
|
de(() => {
|
|
26434
26439
|
const De = S.current;
|
|
26435
26440
|
if (!(!De || se === "default"))
|
|
@@ -26478,7 +26483,7 @@ const wa = ({
|
|
|
26478
26483
|
body: Re,
|
|
26479
26484
|
data: gt
|
|
26480
26485
|
}) => {
|
|
26481
|
-
De || (De = ""), Re || (Re = ""),
|
|
26486
|
+
De || (De = ""), Re || (Re = ""), ve("");
|
|
26482
26487
|
try {
|
|
26483
26488
|
if (!Ii(De, N.title) || !Ii(Re, N.body)) {
|
|
26484
26489
|
const St = t.type === "question" ? { title: Re } : { title: De, body: Re, data: gt };
|
|
@@ -26493,7 +26498,7 @@ const wa = ({
|
|
|
26493
26498
|
didEdit: !0
|
|
26494
26499
|
}));
|
|
26495
26500
|
} catch {
|
|
26496
|
-
|
|
26501
|
+
ve(`${ki}form_error`);
|
|
26497
26502
|
}
|
|
26498
26503
|
}, Qe = () => {
|
|
26499
26504
|
if (A && A.updateConversation) {
|
|
@@ -26510,7 +26515,7 @@ const wa = ({
|
|
|
26510
26515
|
try {
|
|
26511
26516
|
await T(Tu(t.slugs));
|
|
26512
26517
|
} catch {
|
|
26513
|
-
|
|
26518
|
+
ve("delete-error");
|
|
26514
26519
|
}
|
|
26515
26520
|
}, Le = [];
|
|
26516
26521
|
return n && _ && Le.push(
|
|
@@ -26610,8 +26615,8 @@ const wa = ({
|
|
|
26610
26615
|
isCommunity: g,
|
|
26611
26616
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
26612
26617
|
forceShow: {
|
|
26613
|
-
error:
|
|
26614
|
-
{ id:
|
|
26618
|
+
error: ge !== "" && ge !== "delete-error" ? E.formatMessage(
|
|
26619
|
+
{ id: ge },
|
|
26615
26620
|
{
|
|
26616
26621
|
action: E.formatMessage({
|
|
26617
26622
|
id: `discussion_action_${t.type}`
|
|
@@ -26623,7 +26628,7 @@ const wa = ({
|
|
|
26623
26628
|
create: C,
|
|
26624
26629
|
handleSaveEdit: je,
|
|
26625
26630
|
handleCancel: () => {
|
|
26626
|
-
|
|
26631
|
+
ve(""), H((De) => ({ ...De, isEditing: !1 }));
|
|
26627
26632
|
},
|
|
26628
26633
|
listMembers: k,
|
|
26629
26634
|
clickMentionFallback: j
|
|
@@ -26732,7 +26737,7 @@ const wa = ({
|
|
|
26732
26737
|
functions: { onOpen: () => {
|
|
26733
26738
|
}, onClose: () => ee(!1) },
|
|
26734
26739
|
forceShow: {
|
|
26735
|
-
error:
|
|
26740
|
+
error: ge === "delete-error" ? E.formatMessage(
|
|
26736
26741
|
{ id: "discussion_delete_error" },
|
|
26737
26742
|
{
|
|
26738
26743
|
action: E.formatMessage({
|