@iclips/ui 1.0.46 → 1.0.47
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/components/ui/data-table.d.ts.map +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +111 -108
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7819,7 +7819,7 @@ class ee {
|
|
|
7819
7819
|
found.
|
|
7820
7820
|
*/
|
|
7821
7821
|
static findFrom(e, n, r = !1) {
|
|
7822
|
-
let i = e.parent.inlineContent ? new
|
|
7822
|
+
let i = e.parent.inlineContent ? new Z(e) : Kr(e.node(0), e.parent, e.pos, e.index(), n, r);
|
|
7823
7823
|
if (i)
|
|
7824
7824
|
return i;
|
|
7825
7825
|
for (let a = e.depth - 1; a >= 0; a--) {
|
|
@@ -7886,7 +7886,7 @@ class ee {
|
|
|
7886
7886
|
returns the bookmark for that.
|
|
7887
7887
|
*/
|
|
7888
7888
|
getBookmark() {
|
|
7889
|
-
return
|
|
7889
|
+
return Z.between(this.$anchor, this.$head).getBookmark();
|
|
7890
7890
|
}
|
|
7891
7891
|
}
|
|
7892
7892
|
ee.prototype.visible = !0;
|
|
@@ -7902,7 +7902,7 @@ let Xu = !1;
|
|
|
7902
7902
|
function e0(t) {
|
|
7903
7903
|
!Xu && !t.parent.inlineContent && (Xu = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
|
|
7904
7904
|
}
|
|
7905
|
-
class
|
|
7905
|
+
class Z extends ee {
|
|
7906
7906
|
/**
|
|
7907
7907
|
Construct a text selection between the given points.
|
|
7908
7908
|
*/
|
|
@@ -7921,7 +7921,7 @@ class $ extends ee {
|
|
|
7921
7921
|
if (!r.parent.inlineContent)
|
|
7922
7922
|
return ee.near(r);
|
|
7923
7923
|
let i = e.resolve(n.map(this.anchor));
|
|
7924
|
-
return new
|
|
7924
|
+
return new Z(i.parent.inlineContent ? i : r, r);
|
|
7925
7925
|
}
|
|
7926
7926
|
replace(e, n = U.empty) {
|
|
7927
7927
|
if (super.replace(e, n), n == U.empty) {
|
|
@@ -7930,7 +7930,7 @@ class $ extends ee {
|
|
|
7930
7930
|
}
|
|
7931
7931
|
}
|
|
7932
7932
|
eq(e) {
|
|
7933
|
-
return e instanceof
|
|
7933
|
+
return e instanceof Z && e.anchor == this.anchor && e.head == this.head;
|
|
7934
7934
|
}
|
|
7935
7935
|
getBookmark() {
|
|
7936
7936
|
return new pf(this.anchor, this.head);
|
|
@@ -7944,7 +7944,7 @@ class $ extends ee {
|
|
|
7944
7944
|
static fromJSON(e, n) {
|
|
7945
7945
|
if (typeof n.anchor != "number" || typeof n.head != "number")
|
|
7946
7946
|
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
7947
|
-
return new
|
|
7947
|
+
return new Z(e.resolve(n.anchor), e.resolve(n.head));
|
|
7948
7948
|
}
|
|
7949
7949
|
/**
|
|
7950
7950
|
Create a text selection from non-resolved positions.
|
|
@@ -7970,10 +7970,10 @@ class $ extends ee {
|
|
|
7970
7970
|
else
|
|
7971
7971
|
return ee.near(n, r);
|
|
7972
7972
|
}
|
|
7973
|
-
return e.parent.inlineContent || (i == 0 ? e = n : (e = (ee.findFrom(e, -r, !0) || ee.findFrom(e, r, !0)).$anchor, e.pos < n.pos != i < 0 && (e = n))), new
|
|
7973
|
+
return e.parent.inlineContent || (i == 0 ? e = n : (e = (ee.findFrom(e, -r, !0) || ee.findFrom(e, r, !0)).$anchor, e.pos < n.pos != i < 0 && (e = n))), new Z(e, n);
|
|
7974
7974
|
}
|
|
7975
7975
|
}
|
|
7976
|
-
ee.jsonID("text",
|
|
7976
|
+
ee.jsonID("text", Z);
|
|
7977
7977
|
class pf {
|
|
7978
7978
|
constructor(e, n) {
|
|
7979
7979
|
this.anchor = e, this.head = n;
|
|
@@ -7982,7 +7982,7 @@ class pf {
|
|
|
7982
7982
|
return new pf(e.map(this.anchor), e.map(this.head));
|
|
7983
7983
|
}
|
|
7984
7984
|
resolve(e) {
|
|
7985
|
-
return
|
|
7985
|
+
return Z.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
7986
7986
|
}
|
|
7987
7987
|
}
|
|
7988
7988
|
class V extends ee {
|
|
@@ -8092,7 +8092,7 @@ const g3 = {
|
|
|
8092
8092
|
};
|
|
8093
8093
|
function Kr(t, e, n, r, i, a = !1) {
|
|
8094
8094
|
if (e.inlineContent)
|
|
8095
|
-
return
|
|
8095
|
+
return Z.create(t, n);
|
|
8096
8096
|
for (let o = r - (i > 0 ? 0 : 1); i > 0 ? o < e.childCount : o >= 0; o += i) {
|
|
8097
8097
|
let s = e.child(o);
|
|
8098
8098
|
if (s.isAtom) {
|
|
@@ -8601,7 +8601,7 @@ function $p(t, e, n) {
|
|
|
8601
8601
|
return !1;
|
|
8602
8602
|
if (n) {
|
|
8603
8603
|
let d = t.tr.step(c);
|
|
8604
|
-
d.setSelection(
|
|
8604
|
+
d.setSelection(Z.create(d.doc, a)), n(d.scrollIntoView());
|
|
8605
8605
|
}
|
|
8606
8606
|
return !0;
|
|
8607
8607
|
}
|
|
@@ -8743,7 +8743,7 @@ const L3 = (t, e) => {
|
|
|
8743
8743
|
return !1;
|
|
8744
8744
|
if (e) {
|
|
8745
8745
|
let o = (!r.parentOffset && i.index() < i.parent.childCount ? r : i).pos, s = t.tr.insert(o, a.createAndFill());
|
|
8746
|
-
s.setSelection(
|
|
8746
|
+
s.setSelection(Z.create(s.doc, o + 1)), e(s.scrollIntoView());
|
|
8747
8747
|
}
|
|
8748
8748
|
return !0;
|
|
8749
8749
|
}, nm = (t, e) => {
|
|
@@ -8776,7 +8776,7 @@ function N3(t) {
|
|
|
8776
8776
|
a.unshift(null);
|
|
8777
8777
|
}
|
|
8778
8778
|
let d = e.tr;
|
|
8779
|
-
(e.selection instanceof
|
|
8779
|
+
(e.selection instanceof Z || e.selection instanceof yt) && d.deleteSelection();
|
|
8780
8780
|
let u = d.mapping.map(r.pos), p = Nn(d.doc, u, a.length, a);
|
|
8781
8781
|
if (p || (a[0] = s ? { type: s } : null, p = Nn(d.doc, u, a.length, a)), !p)
|
|
8782
8782
|
return !1;
|
|
@@ -8842,7 +8842,7 @@ function im(t) {
|
|
|
8842
8842
|
return !1;
|
|
8843
8843
|
a--;
|
|
8844
8844
|
}
|
|
8845
|
-
return i.node(a).isTextblock ? (n && n(e.tr.setSelection(
|
|
8845
|
+
return i.node(a).isTextblock ? (n && n(e.tr.setSelection(Z.create(e.doc, t < 0 ? i.start(a) : i.end(a)))), !0) : !1;
|
|
8846
8846
|
};
|
|
8847
8847
|
}
|
|
8848
8848
|
const T3 = im(-1), j3 = im(1);
|
|
@@ -9941,7 +9941,7 @@ class Qn extends Xa {
|
|
|
9941
9941
|
}
|
|
9942
9942
|
localCompositionInfo(e, n) {
|
|
9943
9943
|
let { from: r, to: i } = e.state.selection;
|
|
9944
|
-
if (!(e.state.selection instanceof
|
|
9944
|
+
if (!(e.state.selection instanceof Z) || r < n || i > n + this.node.content.size)
|
|
9945
9945
|
return null;
|
|
9946
9946
|
let a = e.input.compositionNode;
|
|
9947
9947
|
if (!a || !this.dom.contains(a.parentNode))
|
|
@@ -10500,7 +10500,7 @@ function kn(t, e = !1) {
|
|
|
10500
10500
|
vM(t);
|
|
10501
10501
|
else {
|
|
10502
10502
|
let { anchor: r, head: i } = n, a, o;
|
|
10503
|
-
g0 && !(n instanceof
|
|
10503
|
+
g0 && !(n instanceof Z) && (n.$from.parent.inlineContent || (a = b0(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (o = b0(t, n.to))), t.docView.setSelection(r, i, t, e), g0 && (a && v0(a), o && v0(o)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && bM(t));
|
|
10504
10504
|
}
|
|
10505
10505
|
t.domObserver.setCurSelection(), t.domObserver.connectSelection();
|
|
10506
10506
|
}
|
|
@@ -10551,7 +10551,7 @@ function w0(t) {
|
|
|
10551
10551
|
t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
|
|
10552
10552
|
}
|
|
10553
10553
|
function gd(t, e, n, r) {
|
|
10554
|
-
return t.someProp("createSelectionBetween", (i) => i(t, e, n)) ||
|
|
10554
|
+
return t.someProp("createSelectionBetween", (i) => i(t, e, n)) || Z.between(e, n, r);
|
|
10555
10555
|
}
|
|
10556
10556
|
function y0(t) {
|
|
10557
10557
|
return t.editable && !t.hasFocus() ? !1 : Mm(t);
|
|
@@ -10579,13 +10579,13 @@ function zn(t, e) {
|
|
|
10579
10579
|
}
|
|
10580
10580
|
function M0(t, e, n) {
|
|
10581
10581
|
let r = t.state.selection;
|
|
10582
|
-
if (r instanceof
|
|
10582
|
+
if (r instanceof Z)
|
|
10583
10583
|
if (n.indexOf("s") > -1) {
|
|
10584
10584
|
let { $head: i } = r, a = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter;
|
|
10585
10585
|
if (!a || a.isText || !a.isLeaf)
|
|
10586
10586
|
return !1;
|
|
10587
10587
|
let o = t.state.doc.resolve(i.pos + a.nodeSize * (e < 0 ? -1 : 1));
|
|
10588
|
-
return zn(t, new
|
|
10588
|
+
return zn(t, new Z(r.$anchor, o));
|
|
10589
10589
|
} else if (r.empty) {
|
|
10590
10590
|
if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
10591
10591
|
let i = sc(t.state, e);
|
|
@@ -10595,12 +10595,12 @@ function M0(t, e, n) {
|
|
|
10595
10595
|
if (!a || a.isText)
|
|
10596
10596
|
return !1;
|
|
10597
10597
|
let s = e < 0 ? i.pos - a.nodeSize : i.pos;
|
|
10598
|
-
return a.isAtom || (o = t.docView.descAt(s)) && !o.contentDOM ? V.isSelectable(a) ? zn(t, new V(e < 0 ? t.state.doc.resolve(i.pos - a.nodeSize) : i)) : Ka ? zn(t, new
|
|
10598
|
+
return a.isAtom || (o = t.docView.descAt(s)) && !o.contentDOM ? V.isSelectable(a) ? zn(t, new V(e < 0 ? t.state.doc.resolve(i.pos - a.nodeSize) : i)) : Ka ? zn(t, new Z(t.state.doc.resolve(e < 0 ? s : s + a.nodeSize))) : !1 : !1;
|
|
10599
10599
|
}
|
|
10600
10600
|
} else return !1;
|
|
10601
10601
|
else {
|
|
10602
10602
|
if (r instanceof V && r.node.isInline)
|
|
10603
|
-
return zn(t, new
|
|
10603
|
+
return zn(t, new Z(e > 0 ? r.$to : r.$from));
|
|
10604
10604
|
{
|
|
10605
10605
|
let i = sc(t.state, e);
|
|
10606
10606
|
return i ? zn(t, i) : !1;
|
|
@@ -10750,7 +10750,7 @@ function x0(t, e) {
|
|
|
10750
10750
|
}
|
|
10751
10751
|
function C0(t, e, n) {
|
|
10752
10752
|
let r = t.state.selection;
|
|
10753
|
-
if (r instanceof
|
|
10753
|
+
if (r instanceof Z && !r.empty || n.indexOf("s") > -1 || Dt && n.indexOf("m") > -1)
|
|
10754
10754
|
return !1;
|
|
10755
10755
|
let { $from: i, $to: a } = r;
|
|
10756
10756
|
if (!i.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
@@ -10765,7 +10765,7 @@ function C0(t, e, n) {
|
|
|
10765
10765
|
return !1;
|
|
10766
10766
|
}
|
|
10767
10767
|
function L0(t, e) {
|
|
10768
|
-
if (!(t.state.selection instanceof
|
|
10768
|
+
if (!(t.state.selection instanceof Z))
|
|
10769
10769
|
return !0;
|
|
10770
10770
|
let { $head: n, $anchor: r, empty: i } = t.state.selection;
|
|
10771
10771
|
if (!n.sameParent(r))
|
|
@@ -11083,7 +11083,7 @@ ft.keypress = (t, e) => {
|
|
|
11083
11083
|
return;
|
|
11084
11084
|
}
|
|
11085
11085
|
let r = t.state.selection;
|
|
11086
|
-
if (!(r instanceof
|
|
11086
|
+
if (!(r instanceof Z) || !r.$from.sameParent(r.$to)) {
|
|
11087
11087
|
let i = String.fromCharCode(n.charCode), a = () => t.state.tr.insertText(i).scrollIntoView();
|
|
11088
11088
|
!/[\r\n]/.test(i) && !t.someProp("handleTextInput", (o) => o(t, r.$from.pos, r.$to.pos, i, a)) && t.dispatch(a()), n.preventDefault();
|
|
11089
11089
|
}
|
|
@@ -11145,12 +11145,12 @@ function VM(t, e, n) {
|
|
|
11145
11145
|
return !1;
|
|
11146
11146
|
let r = t.state.doc;
|
|
11147
11147
|
if (e == -1)
|
|
11148
|
-
return r.inlineContent ? (ci(t,
|
|
11148
|
+
return r.inlineContent ? (ci(t, Z.create(r, 0, r.content.size)), !0) : !1;
|
|
11149
11149
|
let i = r.resolve(e);
|
|
11150
11150
|
for (let a = i.depth + 1; a > 0; a--) {
|
|
11151
11151
|
let o = a > i.depth ? i.nodeAfter : i.node(a), s = i.before(a);
|
|
11152
11152
|
if (o.inlineContent)
|
|
11153
|
-
ci(t,
|
|
11153
|
+
ci(t, Z.create(r, s + 1, s + 1 + o.content.size));
|
|
11154
11154
|
else if (V.isSelectable(o))
|
|
11155
11155
|
ci(t, V.create(r, s));
|
|
11156
11156
|
else
|
|
@@ -11231,7 +11231,7 @@ ft.compositionstart = ft.compositionupdate = (t) => {
|
|
|
11231
11231
|
if (!t.composing) {
|
|
11232
11232
|
t.domObserver.flush();
|
|
11233
11233
|
let { state: e } = t, n = e.selection.$to;
|
|
11234
|
-
if (e.selection instanceof
|
|
11234
|
+
if (e.selection instanceof Z && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || Pe && sm && WM(t)))
|
|
11235
11235
|
t.markCursor = t.state.storedMarks || n.marks(), fs(t, !0), t.markCursor = null;
|
|
11236
11236
|
else if (fs(t, !e.selection.empty), Rt && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
|
|
11237
11237
|
let r = t.domSelectionRange();
|
|
@@ -12230,7 +12230,7 @@ function px(t, e, n, r, i) {
|
|
|
12230
12230
|
return;
|
|
12231
12231
|
}
|
|
12232
12232
|
if (!m)
|
|
12233
|
-
if (r && f instanceof
|
|
12233
|
+
if (r && f instanceof Z && !f.empty && f.$head.sameParent(f.$anchor) && !t.composing && !(c.sel && c.sel.anchor != c.sel.head))
|
|
12234
12234
|
m = { start: f.from, endA: f.to, endB: f.to };
|
|
12235
12235
|
else {
|
|
12236
12236
|
if (c.sel) {
|
|
@@ -12242,7 +12242,7 @@ function px(t, e, n, r, i) {
|
|
|
12242
12242
|
}
|
|
12243
12243
|
return;
|
|
12244
12244
|
}
|
|
12245
|
-
t.state.selection.from < t.state.selection.to && m.start == m.endB && t.state.selection instanceof
|
|
12245
|
+
t.state.selection.from < t.state.selection.to && m.start == m.endB && t.state.selection instanceof Z && (m.start > t.state.selection.from && m.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? m.start = t.state.selection.from : m.endA < t.state.selection.to && m.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (m.endB += t.state.selection.to - m.endA, m.endA = t.state.selection.to)), ht && Yn <= 11 && m.endB == m.start + 1 && m.endA == m.start && m.start > c.from && c.doc.textBetween(m.start - c.from - 1, m.start - c.from + 1) == " " && (m.start--, m.endA--, m.endB--);
|
|
12246
12246
|
let g = c.doc.resolveNoCache(m.start - c.from), v = c.doc.resolveNoCache(m.endB - c.from), w = d.resolve(m.start), x = g.sameParent(v) && g.parent.inlineContent && w.end() >= m.endA;
|
|
12247
12247
|
if ((vi && t.input.lastIOSEnter > Date.now() - 225 && (!x || i.some((k) => k.nodeName == "DIV" || k.nodeName == "P")) || !x && g.pos < c.doc.content.size && (!g.sameParent(v) || !g.parent.inlineContent) && g.pos < v.pos && !/\S/.test(c.doc.textBetween(g.pos, v.pos, "", ""))) && t.someProp("handleKeyDown", (k) => k(t, dr(13, "Enter")))) {
|
|
12248
12248
|
t.input.lastIOSEnter = 0;
|
|
@@ -13065,7 +13065,7 @@ var Tx = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
|
13065
13065
|
const { state: i } = n, a = i.doc.slice(t.from, t.to);
|
|
13066
13066
|
r.deleteRange(t.from, t.to);
|
|
13067
13067
|
const o = r.mapping.map(e);
|
|
13068
|
-
return r.insert(o, a.content), r.setSelection(new
|
|
13068
|
+
return r.insert(o, a.content), r.setSelection(new Z(r.doc.resolve(Math.max(o - 1, 0)))), !0;
|
|
13069
13069
|
}, Ox = () => ({ tr: t, dispatch: e }) => {
|
|
13070
13070
|
const { selection: n } = t, r = n.$anchor.node();
|
|
13071
13071
|
if (r.content.size > 0)
|
|
@@ -13151,7 +13151,7 @@ var Fx = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
13151
13151
|
if (i) {
|
|
13152
13152
|
const u = Nd(f, a, e);
|
|
13153
13153
|
if (u && u.from <= c && u.to >= d) {
|
|
13154
|
-
const p =
|
|
13154
|
+
const p = Z.create(o, u.from, u.to);
|
|
13155
13155
|
n.setSelection(p);
|
|
13156
13156
|
}
|
|
13157
13157
|
}
|
|
@@ -13164,7 +13164,7 @@ var Fx = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
13164
13164
|
return !1;
|
|
13165
13165
|
};
|
|
13166
13166
|
function Ym(t) {
|
|
13167
|
-
return t instanceof
|
|
13167
|
+
return t instanceof Z;
|
|
13168
13168
|
}
|
|
13169
13169
|
function mr(t = 0, e = 0, n = 0) {
|
|
13170
13170
|
return Math.min(Math.max(t, e), n);
|
|
@@ -13178,7 +13178,7 @@ function Qm(t, e = null) {
|
|
|
13178
13178
|
if (e === "end")
|
|
13179
13179
|
return r;
|
|
13180
13180
|
const i = n.from, a = r.to;
|
|
13181
|
-
return e === "all" ?
|
|
13181
|
+
return e === "all" ? Z.create(t, mr(0, i, a), mr(t.content.size, i, a)) : Z.create(t, mr(e, i, a), mr(e, i, a));
|
|
13182
13182
|
}
|
|
13183
13183
|
function Yx() {
|
|
13184
13184
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
@@ -14112,7 +14112,7 @@ var BC = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
14112
14112
|
}), !0;
|
|
14113
14113
|
}, YC = (t) => ({ tr: e, dispatch: n }) => {
|
|
14114
14114
|
if (n) {
|
|
14115
|
-
const { doc: r } = e, { from: i, to: a } = typeof t == "number" ? { from: t, to: t } : t, o =
|
|
14115
|
+
const { doc: r } = e, { from: i, to: a } = typeof t == "number" ? { from: t, to: t } : t, o = Z.atStart(r).from, s = Z.atEnd(r).to, f = mr(i, o, s), c = mr(a, o, s), d = Z.create(r, f, c);
|
|
14116
14116
|
e.setSelection(d);
|
|
14117
14117
|
}
|
|
14118
14118
|
return !0;
|
|
@@ -14146,7 +14146,7 @@ var VC = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor
|
|
|
14146
14146
|
attrs: d
|
|
14147
14147
|
}
|
|
14148
14148
|
] : void 0), r) {
|
|
14149
|
-
if (m && (a instanceof
|
|
14149
|
+
if (m && (a instanceof Z && e.deleteSelection(), e.split(e.mapping.map(s.pos), 1, h), p && !u && !s.parentOffset && s.parent.type !== p)) {
|
|
14150
14150
|
const g = e.mapping.map(s.before()), v = e.doc.resolve(g);
|
|
14151
14151
|
s.node(-1).canReplaceWith(v.index(), v.index() + 1, p) && e.setNodeMarkup(e.mapping.map(s.before()), p);
|
|
14152
14152
|
}
|
|
@@ -14185,7 +14185,7 @@ var VC = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor
|
|
|
14185
14185
|
if (k > -1)
|
|
14186
14186
|
return !1;
|
|
14187
14187
|
S.isTextblock && S.content.size === 0 && (k = I + 1);
|
|
14188
|
-
}), k > -1 && n.setSelection(
|
|
14188
|
+
}), k > -1 && n.setSelection(Z.near(n.doc.resolve(k))), n.scrollIntoView();
|
|
14189
14189
|
}
|
|
14190
14190
|
return !0;
|
|
14191
14191
|
}
|
|
@@ -17702,7 +17702,7 @@ ${n}
|
|
|
17702
17702
|
let y = d;
|
|
17703
17703
|
for (let C = 0; C < m; C += 1)
|
|
17704
17704
|
y += h[C].length + 1;
|
|
17705
|
-
return s.delete(y, y + L), c - y <= L && s.setSelection(
|
|
17705
|
+
return s.delete(y, y + L), c - y <= L && s.setSelection(Z.create(s.doc, y)), !0;
|
|
17706
17706
|
}) : t.commands.command(({ tr: s }) => {
|
|
17707
17707
|
const { from: f, to: c } = i, p = r.doc.textBetween(f, c, `
|
|
17708
17708
|
`, `
|
|
@@ -17773,7 +17773,7 @@ ${n}
|
|
|
17773
17773
|
return !1;
|
|
17774
17774
|
const { tr: o, schema: s } = t.state, f = s.text(n.replace(/\r\n?/g, `
|
|
17775
17775
|
`));
|
|
17776
|
-
return o.replaceSelectionWith(this.type.create({ language: a }, f)), o.selection.$from.parent.type !== this.type && o.setSelection(
|
|
17776
|
+
return o.replaceSelectionWith(this.type.create({ language: a }, f)), o.selection.$from.parent.type !== this.type && o.setSelection(Z.near(o.doc.resolve(Math.max(0, o.selection.from - 2)))), o.setMeta("paste", !0), t.dispatch(o), !0;
|
|
17777
17777
|
}
|
|
17778
17778
|
}
|
|
17779
17779
|
})
|
|
@@ -17928,10 +17928,10 @@ ${n}
|
|
|
17928
17928
|
if (s) {
|
|
17929
17929
|
const { $to: f } = o.selection, c = f.end();
|
|
17930
17930
|
if (f.nodeAfter)
|
|
17931
|
-
f.nodeAfter.isTextblock ? o.setSelection(
|
|
17931
|
+
f.nodeAfter.isTextblock ? o.setSelection(Z.create(o.doc, f.pos + 1)) : f.nodeAfter.isBlock ? o.setSelection(V.create(o.doc, f.pos)) : o.setSelection(Z.create(o.doc, f.pos));
|
|
17932
17932
|
else {
|
|
17933
17933
|
const d = a.schema.nodes[this.options.nextNodeType] || f.parent.type.contentMatch.defaultType, u = d == null ? void 0 : d.create();
|
|
17934
|
-
u && (o.insert(c, u), o.setSelection(
|
|
17934
|
+
u && (o.insert(c, u), o.setSelection(Z.create(o.doc, c + 1)));
|
|
17935
17935
|
}
|
|
17936
17936
|
o.scrollIntoView();
|
|
17937
17937
|
}
|
|
@@ -20113,7 +20113,7 @@ function Eo(t, e) {
|
|
|
20113
20113
|
const n = t == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
20114
20114
|
return function(r, i, a) {
|
|
20115
20115
|
let o = r.selection, s = e > 0 ? o.$to : o.$from, f = o.empty;
|
|
20116
|
-
if (o instanceof
|
|
20116
|
+
if (o instanceof Z) {
|
|
20117
20117
|
if (!a.endOfTextblock(n) || s.depth == 0)
|
|
20118
20118
|
return !1;
|
|
20119
20119
|
f = !1, s = r.doc.resolve(e > 0 ? s.after() : s.before());
|
|
@@ -20141,7 +20141,7 @@ function GN(t, e) {
|
|
|
20141
20141
|
for (let o = r.length - 1; o >= 0; o--)
|
|
20142
20142
|
i = E.from(r[o].createAndFill(null, i));
|
|
20143
20143
|
let a = t.state.tr.replace(n.pos, n.pos, new U(i, 0, 0));
|
|
20144
|
-
return a.setSelection(
|
|
20144
|
+
return a.setSelection(Z.near(a.doc.resolve(n.pos + 1))), t.dispatch(a), !1;
|
|
20145
20145
|
}
|
|
20146
20146
|
function _N(t) {
|
|
20147
20147
|
if (!(t.selection instanceof Ne))
|
|
@@ -20975,7 +20975,7 @@ function hk({
|
|
|
20975
20975
|
const A = (S = this.key) == null ? void 0 : S.getState(k), G = (I = this.key) == null ? void 0 : I.getState(C.state), q = A.active && G.active && A.range.from !== G.range.from, fe = !A.active && G.active, Ee = A.active && !G.active, _ = !fe && !Ee && A.query !== G.query, be = fe || q && _, he = _ || q, He = Ee || q && _;
|
|
20976
20976
|
if (!be && !he && !He)
|
|
20977
20977
|
return;
|
|
20978
|
-
const R = He && !be ? A : G,
|
|
20978
|
+
const R = He && !be ? A : G, W = C.dom.querySelector(`[data-decoration-id="${R.decorationId}"]`);
|
|
20979
20979
|
v = {
|
|
20980
20980
|
editor: e,
|
|
20981
20981
|
range: R.range,
|
|
@@ -20987,8 +20987,8 @@ function hk({
|
|
|
20987
20987
|
range: R.range,
|
|
20988
20988
|
props: se
|
|
20989
20989
|
}),
|
|
20990
|
-
decorationNode:
|
|
20991
|
-
clientRect: L(C,
|
|
20990
|
+
decorationNode: W,
|
|
20991
|
+
clientRect: L(C, W)
|
|
20992
20992
|
}, be && ((D = w == null ? void 0 : w.onBeforeStart) == null || D.call(w, v)), he && ((H = w == null ? void 0 : w.onBeforeUpdate) == null || H.call(w, v)), (he || be) && (v.items = await p({
|
|
20993
20993
|
editor: e,
|
|
20994
20994
|
query: R.query
|
|
@@ -21796,15 +21796,15 @@ function Kk(t) {
|
|
|
21796
21796
|
function Xk(t) {
|
|
21797
21797
|
var e = t.state, n = t.options, r = t.name;
|
|
21798
21798
|
if (!e.modifiersData[r]._skip) {
|
|
21799
|
-
for (var i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !0 : o, f = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, p = n.altBoundary, h = n.flipVariations, m = h === void 0 ? !0 : h, g = n.allowedAutoPlacements, v = e.options.placement, w = Xt(v), x = w === v, L = f || (x || !m ? [Qo(v)] : Kk(v)), y = [v].concat(L).reduce(function(R,
|
|
21800
|
-
return R.concat(Xt(
|
|
21801
|
-
placement:
|
|
21799
|
+
for (var i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !0 : o, f = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, p = n.altBoundary, h = n.flipVariations, m = h === void 0 ? !0 : h, g = n.allowedAutoPlacements, v = e.options.placement, w = Xt(v), x = w === v, L = f || (x || !m ? [Qo(v)] : Kk(v)), y = [v].concat(L).reduce(function(R, W) {
|
|
21800
|
+
return R.concat(Xt(W) === Gd ? qk(e, {
|
|
21801
|
+
placement: W,
|
|
21802
21802
|
boundary: d,
|
|
21803
21803
|
rootBoundary: u,
|
|
21804
21804
|
padding: c,
|
|
21805
21805
|
flipVariations: m,
|
|
21806
21806
|
allowedAutoPlacements: g
|
|
21807
|
-
}) :
|
|
21807
|
+
}) : W);
|
|
21808
21808
|
}, []), N = e.rects.reference, C = e.rects.popper, k = /* @__PURE__ */ new Map(), S = !0, I = y[0], D = 0; D < y.length; D++) {
|
|
21809
21809
|
var H = y[D], J = Xt(H), P = Ni(H) === xi, F = [pt, Ut].indexOf(J) >= 0, A = F ? "width" : "height", G = Ha(e, {
|
|
21810
21810
|
placement: H,
|
|
@@ -21824,11 +21824,11 @@ function Xk(t) {
|
|
|
21824
21824
|
k.set(H, Ee);
|
|
21825
21825
|
}
|
|
21826
21826
|
if (S)
|
|
21827
|
-
for (var _ = m ? 3 : 1, be = function(
|
|
21827
|
+
for (var _ = m ? 3 : 1, be = function(W) {
|
|
21828
21828
|
var se = y.find(function(tt) {
|
|
21829
21829
|
var Nt = k.get(tt);
|
|
21830
21830
|
if (Nt)
|
|
21831
|
-
return Nt.slice(0,
|
|
21831
|
+
return Nt.slice(0, W).every(function(ln) {
|
|
21832
21832
|
return ln;
|
|
21833
21833
|
});
|
|
21834
21834
|
});
|
|
@@ -21956,7 +21956,7 @@ function l9(t) {
|
|
|
21956
21956
|
var P, F = y === "y" ? pt : mt, A = y === "y" ? Ut : Ft, G = y === "y" ? "height" : "width", q = C[y], fe = q + v[F], Ee = q - v[A], _ = h ? -S[G] / 2 : 0, be = x === xi ? k[G] : S[G], he = x === xi ? -S[G] : -k[G], He = e.elements.arrow, R = h && He ? Wd(He) : {
|
|
21957
21957
|
width: 0,
|
|
21958
21958
|
height: 0
|
|
21959
|
-
},
|
|
21959
|
+
}, W = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : o2(), se = W[F], tt = W[A], Nt = ma(0, k[G], R[G]), ln = L ? k[G] / 2 - _ - Nt - se - D.mainAxis : be - Nt - se - D.mainAxis, ze = L ? -k[G] / 2 + _ + Nt + tt + D.mainAxis : he + Nt + tt + D.mainAxis, Yt = e.elements.arrow && no(e.elements.arrow), ar = Yt ? y === "y" ? Yt.clientTop || 0 : Yt.clientLeft || 0 : 0, or = (P = H == null ? void 0 : H[y]) != null ? P : 0, fo = q + ln - or - ar, lo = q + ze - or, Pi = ma(h ? Ys(fe, fo) : fe, q, h ? Nr(Ee, lo) : Ee);
|
|
21960
21960
|
C[y] = Pi, J[y] = Pi - q;
|
|
21961
21961
|
}
|
|
21962
21962
|
if (s) {
|
|
@@ -22599,10 +22599,10 @@ function $9(t, e) {
|
|
|
22599
22599
|
function q(j) {
|
|
22600
22600
|
j === void 0 && (j = !1), C.style.pointerEvents = y.props.interactive && !j ? "" : "none", C.style.zIndex = "" + y.props.zIndex;
|
|
22601
22601
|
}
|
|
22602
|
-
function fe(j, Y,
|
|
22603
|
-
if (
|
|
22602
|
+
function fe(j, Y, $) {
|
|
22603
|
+
if ($ === void 0 && ($ = !0), S.forEach(function(ae) {
|
|
22604
22604
|
ae[j] && ae[j].apply(ae, Y);
|
|
22605
|
-
}),
|
|
22605
|
+
}), $) {
|
|
22606
22606
|
var le;
|
|
22607
22607
|
(le = y.props)[j].apply(le, Y);
|
|
22608
22608
|
}
|
|
@@ -22610,13 +22610,13 @@ function $9(t, e) {
|
|
|
22610
22610
|
function Ee() {
|
|
22611
22611
|
var j = y.props.aria;
|
|
22612
22612
|
if (j.content) {
|
|
22613
|
-
var Y = "aria-" + j.content,
|
|
22613
|
+
var Y = "aria-" + j.content, $ = C.id, le = ni(y.props.triggerTarget || t);
|
|
22614
22614
|
le.forEach(function(ae) {
|
|
22615
22615
|
var nt = ae.getAttribute(Y);
|
|
22616
22616
|
if (y.state.isVisible)
|
|
22617
|
-
ae.setAttribute(Y, nt ? nt + " " +
|
|
22617
|
+
ae.setAttribute(Y, nt ? nt + " " + $ : $);
|
|
22618
22618
|
else {
|
|
22619
|
-
var kt = nt && nt.replace(
|
|
22619
|
+
var kt = nt && nt.replace($, "").trim();
|
|
22620
22620
|
kt ? ae.setAttribute(Y, kt) : ae.removeAttribute(Y);
|
|
22621
22621
|
}
|
|
22622
22622
|
});
|
|
@@ -22639,8 +22639,8 @@ function $9(t, e) {
|
|
|
22639
22639
|
if (!(Kt.isTouch && (f || j.type === "mousedown"))) {
|
|
22640
22640
|
var Y = j.composedPath && j.composedPath()[0] || j.target;
|
|
22641
22641
|
if (!(y.props.interactive && Ah(C, Y))) {
|
|
22642
|
-
if (ni(y.props.triggerTarget || t).some(function(
|
|
22643
|
-
return Ah(
|
|
22642
|
+
if (ni(y.props.triggerTarget || t).some(function($) {
|
|
22643
|
+
return Ah($, Y);
|
|
22644
22644
|
})) {
|
|
22645
22645
|
if (Kt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
|
|
22646
22646
|
return;
|
|
@@ -22658,7 +22658,7 @@ function $9(t, e) {
|
|
|
22658
22658
|
function R() {
|
|
22659
22659
|
f = !1;
|
|
22660
22660
|
}
|
|
22661
|
-
function
|
|
22661
|
+
function W() {
|
|
22662
22662
|
var j = F();
|
|
22663
22663
|
j.addEventListener("mousedown", he, !0), j.addEventListener("touchend", he, cr), j.addEventListener("touchstart", R, cr), j.addEventListener("touchmove", He, cr);
|
|
22664
22664
|
}
|
|
@@ -22675,23 +22675,23 @@ function $9(t, e) {
|
|
|
22675
22675
|
ln(j, Y);
|
|
22676
22676
|
}
|
|
22677
22677
|
function ln(j, Y) {
|
|
22678
|
-
var
|
|
22678
|
+
var $ = A().box;
|
|
22679
22679
|
function le(ae) {
|
|
22680
|
-
ae.target ===
|
|
22680
|
+
ae.target === $ && (El($, "remove", le), Y());
|
|
22681
22681
|
}
|
|
22682
22682
|
if (j === 0)
|
|
22683
22683
|
return Y();
|
|
22684
|
-
El(
|
|
22684
|
+
El($, "remove", u), El($, "add", le), u = le;
|
|
22685
22685
|
}
|
|
22686
|
-
function ze(j, Y,
|
|
22687
|
-
|
|
22686
|
+
function ze(j, Y, $) {
|
|
22687
|
+
$ === void 0 && ($ = !1);
|
|
22688
22688
|
var le = ni(y.props.triggerTarget || t);
|
|
22689
22689
|
le.forEach(function(ae) {
|
|
22690
|
-
ae.addEventListener(j, Y,
|
|
22690
|
+
ae.addEventListener(j, Y, $), h.push({
|
|
22691
22691
|
node: ae,
|
|
22692
22692
|
eventType: j,
|
|
22693
22693
|
handler: Y,
|
|
22694
|
-
options:
|
|
22694
|
+
options: $
|
|
22695
22695
|
});
|
|
22696
22696
|
});
|
|
22697
22697
|
}
|
|
@@ -22717,22 +22717,22 @@ function $9(t, e) {
|
|
|
22717
22717
|
}
|
|
22718
22718
|
function ar() {
|
|
22719
22719
|
h.forEach(function(j) {
|
|
22720
|
-
var Y = j.node,
|
|
22721
|
-
Y.removeEventListener(
|
|
22720
|
+
var Y = j.node, $ = j.eventType, le = j.handler, ae = j.options;
|
|
22721
|
+
Y.removeEventListener($, le, ae);
|
|
22722
22722
|
}), h = [];
|
|
22723
22723
|
}
|
|
22724
22724
|
function or(j) {
|
|
22725
|
-
var Y,
|
|
22725
|
+
var Y, $ = !1;
|
|
22726
22726
|
if (!(!y.state.isEnabled || Ri(j) || s)) {
|
|
22727
22727
|
var le = ((Y = d) == null ? void 0 : Y.type) === "focus";
|
|
22728
22728
|
d = j, g = j.currentTarget, _(), !y.state.isVisible && j9(j) && zo.forEach(function(ae) {
|
|
22729
22729
|
return ae(j);
|
|
22730
|
-
}), j.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || o) && y.props.hideOnClick !== !1 && y.state.isVisible ?
|
|
22730
|
+
}), j.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || o) && y.props.hideOnClick !== !1 && y.state.isVisible ? $ = !0 : Bi(j), j.type === "click" && (o = !$), $ && !le && sr(j);
|
|
22731
22731
|
}
|
|
22732
22732
|
}
|
|
22733
22733
|
function fo(j) {
|
|
22734
|
-
var Y = j.target,
|
|
22735
|
-
if (!(j.type === "mousemove" &&
|
|
22734
|
+
var Y = j.target, $ = P().contains(Y) || C.contains(Y);
|
|
22735
|
+
if (!(j.type === "mousemove" && $)) {
|
|
22736
22736
|
var le = Dn().concat(C).map(function(ae) {
|
|
22737
22737
|
var nt, kt = ae._tippy, Vr = (nt = kt.popperInstance) == null ? void 0 : nt.state;
|
|
22738
22738
|
return Vr ? {
|
|
@@ -22762,7 +22762,7 @@ function $9(t, e) {
|
|
|
22762
22762
|
}
|
|
22763
22763
|
function co() {
|
|
22764
22764
|
uo();
|
|
22765
|
-
var j = y.props, Y = j.popperOptions,
|
|
22765
|
+
var j = y.props, Y = j.popperOptions, $ = j.placement, le = j.offset, ae = j.getReferenceClientRect, nt = j.moveTransition, kt = J() ? jc(C).arrow : null, Vr = ae ? {
|
|
22766
22766
|
getBoundingClientRect: ae,
|
|
22767
22767
|
contextElement: ae.contextElement || P()
|
|
22768
22768
|
} : t, Su = {
|
|
@@ -22812,7 +22812,7 @@ function $9(t, e) {
|
|
|
22812
22812
|
padding: 3
|
|
22813
22813
|
}
|
|
22814
22814
|
}), fr.push.apply(fr, (Y == null ? void 0 : Y.modifiers) || []), y.popperInstance = M9(Vr, C, Object.assign({}, Y, {
|
|
22815
|
-
placement:
|
|
22815
|
+
placement: $,
|
|
22816
22816
|
onFirstUpdate: p,
|
|
22817
22817
|
modifiers: fr
|
|
22818
22818
|
}));
|
|
@@ -22821,8 +22821,8 @@ function $9(t, e) {
|
|
|
22821
22821
|
y.popperInstance && (y.popperInstance.destroy(), y.popperInstance = null);
|
|
22822
22822
|
}
|
|
22823
22823
|
function cn() {
|
|
22824
|
-
var j = y.props.appendTo, Y,
|
|
22825
|
-
y.props.interactive && j === p2 || j === "parent" ? Y =
|
|
22824
|
+
var j = y.props.appendTo, Y, $ = P();
|
|
22825
|
+
y.props.interactive && j === p2 || j === "parent" ? Y = $.parentNode : Y = m2(j, [$]), Y.contains(C) || Y.appendChild(C), y.state.isMounted = !0, co(), process.env.NODE_ENV !== "production" && wn(y.props.interactive && j === bt.appendTo && $.nextElementSibling !== C, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
22826
22826
|
|
|
22827
22827
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
22828
22828
|
|
|
@@ -22834,8 +22834,8 @@ function $9(t, e) {
|
|
|
22834
22834
|
return Qs(C.querySelectorAll("[data-tippy-root]"));
|
|
22835
22835
|
}
|
|
22836
22836
|
function Bi(j) {
|
|
22837
|
-
y.clearDelayTimeouts(), j && fe("onTrigger", [y, j]),
|
|
22838
|
-
var Y = G(!0),
|
|
22837
|
+
y.clearDelayTimeouts(), j && fe("onTrigger", [y, j]), W();
|
|
22838
|
+
var Y = G(!0), $ = D(), le = $[0], ae = $[1];
|
|
22839
22839
|
Kt.isTouch && le === "hold" && ae && (Y = ae), Y ? r = setTimeout(function() {
|
|
22840
22840
|
y.show();
|
|
22841
22841
|
}, Y) : y.show();
|
|
@@ -22866,12 +22866,12 @@ function $9(t, e) {
|
|
|
22866
22866
|
function mo(j) {
|
|
22867
22867
|
if (process.env.NODE_ENV !== "production" && wn(y.state.isDestroyed, $r("setProps")), !y.state.isDestroyed) {
|
|
22868
22868
|
fe("onBeforeUpdate", [y, j]), ar();
|
|
22869
|
-
var Y = y.props,
|
|
22869
|
+
var Y = y.props, $ = Ph(t, Object.assign({}, Y, Dh(j), {
|
|
22870
22870
|
ignoreAttributes: !0
|
|
22871
22871
|
}));
|
|
22872
|
-
y.props =
|
|
22872
|
+
y.props = $, Yt(), Y.interactiveDebounce !== $.interactiveDebounce && (be(), m = Th(fo, $.interactiveDebounce)), Y.triggerTarget && !$.triggerTarget ? ni(Y.triggerTarget).forEach(function(le) {
|
|
22873
22873
|
le.removeAttribute("aria-expanded");
|
|
22874
|
-
}) :
|
|
22874
|
+
}) : $.triggerTarget && t.removeAttribute("aria-expanded"), _(), q(), k && k(Y, $), y.popperInstance && (co(), Dn().forEach(function(le) {
|
|
22875
22875
|
requestAnimationFrame(le._tippy.popperInstance.forceUpdate);
|
|
22876
22876
|
})), fe("onAfterUpdate", [y, j]);
|
|
22877
22877
|
}
|
|
@@ -22883,9 +22883,9 @@ function $9(t, e) {
|
|
|
22883
22883
|
}
|
|
22884
22884
|
function E4() {
|
|
22885
22885
|
process.env.NODE_ENV !== "production" && wn(y.state.isDestroyed, $r("show"));
|
|
22886
|
-
var j = y.state.isVisible, Y = y.state.isDestroyed,
|
|
22887
|
-
if (!(j || Y ||
|
|
22888
|
-
if (y.state.isVisible = !0, J() && (C.style.visibility = "visible"), q(),
|
|
22886
|
+
var j = y.state.isVisible, Y = y.state.isDestroyed, $ = !y.state.isEnabled, le = Kt.isTouch && !y.props.touch, ae = jl(y.props.duration, 0, bt.duration);
|
|
22887
|
+
if (!(j || Y || $ || le) && !P().hasAttribute("disabled") && (fe("onShow", [y], !1), y.props.onShow(y) !== !1)) {
|
|
22888
|
+
if (y.state.isVisible = !0, J() && (C.style.visibility = "visible"), q(), W(), y.state.isMounted || (C.style.transition = "none"), J()) {
|
|
22889
22889
|
var nt = A(), kt = nt.box, Vr = nt.content;
|
|
22890
22890
|
Dl([kt, Vr], 0);
|
|
22891
22891
|
}
|
|
@@ -22905,8 +22905,8 @@ function $9(t, e) {
|
|
|
22905
22905
|
}
|
|
22906
22906
|
function A4() {
|
|
22907
22907
|
process.env.NODE_ENV !== "production" && wn(y.state.isDestroyed, $r("hide"));
|
|
22908
|
-
var j = !y.state.isVisible, Y = y.state.isDestroyed,
|
|
22909
|
-
if (!(j || Y ||
|
|
22908
|
+
var j = !y.state.isVisible, Y = y.state.isDestroyed, $ = !y.state.isEnabled, le = jl(y.props.duration, 1, bt.duration);
|
|
22909
|
+
if (!(j || Y || $) && (fe("onHide", [y], !1), y.props.onHide(y) !== !1)) {
|
|
22910
22910
|
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, o = !1, J() && (C.style.visibility = "hidden"), be(), se(), q(!0), J()) {
|
|
22911
22911
|
var ae = A(), nt = ae.box, kt = ae.content;
|
|
22912
22912
|
y.props.animation && (Dl([nt, kt], le), Eh([nt, kt], "hidden"));
|
|
@@ -52040,33 +52040,36 @@ function nA({
|
|
|
52040
52040
|
return "contains";
|
|
52041
52041
|
}
|
|
52042
52042
|
}, J = Ye(async (R) => {
|
|
52043
|
-
g && (u != null && u.onFilterChange) ? await u.onFilterChange(R, y) : (x.clearFilters(), y && x.setFilter(D, y, "contains"), R.forEach((
|
|
52044
|
-
const se = H(
|
|
52045
|
-
x.setFilter(
|
|
52043
|
+
g && (u != null && u.onFilterChange) ? await u.onFilterChange(R, y) : (x.clearFilters(), y && x.setFilter(D, y, "contains"), R.forEach((W) => {
|
|
52044
|
+
const se = H(W.operator);
|
|
52045
|
+
x.setFilter(W.field, W.value, se);
|
|
52046
52046
|
}));
|
|
52047
52047
|
}, [g, u, y, x, D]);
|
|
52048
52048
|
ue(() => {
|
|
52049
|
-
s && (I(s), s.length > 0 &&
|
|
52050
|
-
|
|
52049
|
+
s && (I(s), s.length > 0 && (g && (u != null && u.onFilterChange) ? u.onFilterChange(s, y) : (x.clearFilters(), y && x.setFilter(D, y, "contains"), s.forEach((R) => {
|
|
52050
|
+
const W = H(R.operator);
|
|
52051
|
+
x.setFilter(R.field, R.value, W);
|
|
52052
|
+
}))));
|
|
52053
|
+
}, [JSON.stringify(s)]);
|
|
52051
52054
|
const P = Ye(async (R) => {
|
|
52052
52055
|
N(R), g && (u != null && u.onFilterChange) ? await u.onFilterChange(S, R) : x.setFilter(D, R, "contains");
|
|
52053
52056
|
}, [g, u, S, x, D]), F = (R) => {
|
|
52054
52057
|
if (/^\d{4}-\d{2}-\d{2}/.test(R)) {
|
|
52055
|
-
const
|
|
52056
|
-
if (!isNaN(
|
|
52057
|
-
return
|
|
52058
|
+
const W = /* @__PURE__ */ new Date(R + "T00:00:00");
|
|
52059
|
+
if (!isNaN(W.getTime()))
|
|
52060
|
+
return W.toLocaleDateString("pt-BR");
|
|
52058
52061
|
}
|
|
52059
52062
|
return R;
|
|
52060
52063
|
}, A = S.map((R) => {
|
|
52061
52064
|
var Nt, ln;
|
|
52062
|
-
const
|
|
52065
|
+
const W = a.find((ze) => ze.value === R.field), se = R.operator === "is" ? "" : ` ${R.operator}`;
|
|
52063
52066
|
let tt;
|
|
52064
52067
|
return Array.isArray(R.value) ? tt = R.value.map((ze) => {
|
|
52065
52068
|
var Yt, ar;
|
|
52066
|
-
return ((ar = (Yt =
|
|
52067
|
-
}).join(", ") : (
|
|
52069
|
+
return ((ar = (Yt = W == null ? void 0 : W.options) == null ? void 0 : Yt.find((or) => or.value === ze)) == null ? void 0 : ar.label) || ze;
|
|
52070
|
+
}).join(", ") : (W == null ? void 0 : W.type) === "date" ? tt = F(R.value) : tt = ((ln = (Nt = W == null ? void 0 : W.options) == null ? void 0 : Nt.find((ze) => ze.value === R.value)) == null ? void 0 : ln.label) || R.value, {
|
|
52068
52071
|
id: R.id,
|
|
52069
|
-
label: (
|
|
52072
|
+
label: (W == null ? void 0 : W.label) || R.field,
|
|
52070
52073
|
value: `${se} ${tt}`.trim(),
|
|
52071
52074
|
onRemove: () => {
|
|
52072
52075
|
const ze = S.filter((Yt) => Yt.id !== R.id);
|
|
@@ -52079,9 +52082,9 @@ function nA({
|
|
|
52079
52082
|
I([]), g && (u != null && u.onFilterChange) ? u.onFilterChange([], y) : (x.clearFilters(), y && x.setFilter(D, y, "contains"));
|
|
52080
52083
|
}, fe = Ye(async (R) => {
|
|
52081
52084
|
if (g && (u != null && u.onSortChange)) {
|
|
52082
|
-
const
|
|
52085
|
+
const W = w.sort;
|
|
52083
52086
|
let se = "asc";
|
|
52084
|
-
|
|
52087
|
+
W.column === R && (se = W.direction === "asc" ? "desc" : W.direction === "desc" ? null : "asc");
|
|
52085
52088
|
const tt = {
|
|
52086
52089
|
column: se ? R : null,
|
|
52087
52090
|
direction: se
|
|
@@ -52094,8 +52097,8 @@ function nA({
|
|
|
52094
52097
|
}, [g, u, w.pagination]), _ = Ye(async (R) => {
|
|
52095
52098
|
g && (u != null && u.onPageChange) ? await u.onPageChange(1, R) : w.pagination.onPageSizeChange && w.pagination.onPageSizeChange(R);
|
|
52096
52099
|
}, [g, u, w.pagination]), be = () => {
|
|
52097
|
-
const R = S.length > 0,
|
|
52098
|
-
return R ||
|
|
52100
|
+
const R = S.length > 0, W = y.trim().length > 0;
|
|
52101
|
+
return R || W ? "Nenhum resultado encontrado para os filtros aplicados." : h || "Nenhum dado disponível.";
|
|
52099
52102
|
};
|
|
52100
52103
|
return /* @__PURE__ */ b("div", { className: M("space-y-4", m), children: [
|
|
52101
52104
|
/* @__PURE__ */ b("div", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -52186,17 +52189,17 @@ function nA({
|
|
|
52186
52189
|
)) }) }),
|
|
52187
52190
|
/* @__PURE__ */ l(k4, { children: p ? (
|
|
52188
52191
|
// SKELETON ROWS - limitar a max 15 para performance
|
|
52189
|
-
Array.from({ length: Math.min(w.pagination.pageSize, 15) }).map((R,
|
|
52192
|
+
Array.from({ length: Math.min(w.pagination.pageSize, 15) }).map((R, W) => /* @__PURE__ */ l(Xi, { children: e.map((se, tt) => /* @__PURE__ */ l($o, { className: se.className, children: /* @__PURE__ */ l(br, { className: "h-4 w-full" }) }, tt)) }, `skeleton-${W}`))
|
|
52190
52193
|
) : v.length > 0 ? (
|
|
52191
52194
|
// DADOS NORMAIS
|
|
52192
|
-
v.map((R,
|
|
52195
|
+
v.map((R, W) => /* @__PURE__ */ l(Xi, { children: e.map((se) => /* @__PURE__ */ l(
|
|
52193
52196
|
$o,
|
|
52194
52197
|
{
|
|
52195
52198
|
className: M(se.className, se.align ? `text-${se.align}` : "text-left"),
|
|
52196
|
-
children: se.render ? se.render(R[se.key], R,
|
|
52199
|
+
children: se.render ? se.render(R[se.key], R, W) : R[se.key]
|
|
52197
52200
|
},
|
|
52198
52201
|
String(se.key)
|
|
52199
|
-
)) },
|
|
52202
|
+
)) }, W))
|
|
52200
52203
|
) : (
|
|
52201
52204
|
// EMPTY STATE
|
|
52202
52205
|
/* @__PURE__ */ l(Xi, { children: /* @__PURE__ */ l(
|