@lax-wp/design-system 0.14.39 → 0.14.41
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/data-display/infinite-table/context.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/context.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/context.d.ts +0 -1
- package/dist/components/data-display/infinite-table/context.es.js +2 -3
- package/dist/components/data-display/infinite-table/context.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.es.js +19 -21
- package/dist/components/data-display/infinite-table/head/cell/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.es.js +396 -400
- package/dist/components/data-display/infinite-table/index.es.js.map +1 -1
- package/dist/components/navigation/tabs/TabSwitch.cjs.js +1 -1
- package/dist/components/navigation/tabs/TabSwitch.cjs.js.map +1 -1
- package/dist/components/navigation/tabs/TabSwitch.d.ts +3 -1
- package/dist/components/navigation/tabs/TabSwitch.es.js +88 -67
- package/dist/components/navigation/tabs/TabSwitch.es.js.map +1 -1
- package/dist/components/navigation/tabs/Tabs.cjs.js +1 -1
- package/dist/components/navigation/tabs/Tabs.cjs.js.map +1 -1
- package/dist/components/navigation/tabs/Tabs.d.ts +1 -1
- package/dist/components/navigation/tabs/Tabs.es.js +339 -325
- package/dist/components/navigation/tabs/Tabs.es.js.map +1 -1
- package/dist/components/navigation/tabs/types.cjs.js.map +1 -1
- package/dist/components/navigation/tabs/types.d.ts +13 -0
- package/dist/components/navigation/tabs/types.es.js.map +1 -1
- package/dist/utils/table.cjs.js +1 -1
- package/dist/utils/table.cjs.js.map +1 -1
- package/dist/utils/table.d.ts +1 -0
- package/dist/utils/table.es.js +26 -25
- package/dist/utils/table.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useSensors as
|
|
3
|
-
import { SortableContext as
|
|
4
|
-
import { Dropdown as
|
|
1
|
+
import { jsx as n, jsxs as Ce } from "react/jsx-runtime";
|
|
2
|
+
import { useSensors as Ft, useSensor as tt, MouseSensor as Bt, TouchSensor as zt, DndContext as jt, closestCenter as $t } from "@dnd-kit/core";
|
|
3
|
+
import { SortableContext as At, horizontalListSortingStrategy as Gt, arrayMove as nt } from "@dnd-kit/sortable";
|
|
4
|
+
import { Dropdown as Te } from "antd";
|
|
5
5
|
import l from "../../../_virtual/index.es.js";
|
|
6
|
-
import { useState as w, useRef as
|
|
7
|
-
import { useTranslation as
|
|
8
|
-
import
|
|
9
|
-
import { INITIAL_TAB_OPTION_CONFIG as
|
|
10
|
-
import { formatCount as
|
|
11
|
-
import { useTabConfig as
|
|
12
|
-
import { useTextWidth as
|
|
13
|
-
import
|
|
6
|
+
import { useState as w, useRef as Se, useMemo as U, useCallback as I, useEffect as $ } from "react";
|
|
7
|
+
import { useTranslation as Yt } from "react-i18next";
|
|
8
|
+
import ot from "@mui/icons-material/MoreHorizOutlined";
|
|
9
|
+
import { INITIAL_TAB_OPTION_CONFIG as Jt } from "./types.es.js";
|
|
10
|
+
import { formatCount as qt } from "../../../utils/formatters.es.js";
|
|
11
|
+
import { useTabConfig as Qt } from "../../../providers/design-system-provider/hooks.es.js";
|
|
12
|
+
import { useTextWidth as Xt } from "../../../hooks/useTextWidth.es.js";
|
|
13
|
+
import Zt from "../../button/IconButton.es.js";
|
|
14
14
|
import { OptionButton as y } from "../../buttons/option-button/OptionButton.es.js";
|
|
15
|
-
import { SearchBar as
|
|
16
|
-
import
|
|
17
|
-
import { EditIcon as
|
|
18
|
-
import { toast as
|
|
19
|
-
import { TabSwitch as
|
|
20
|
-
import { PinIcon as
|
|
21
|
-
import { SortableTab as
|
|
22
|
-
import { DropableWrapper as
|
|
23
|
-
import { MoreButton as
|
|
24
|
-
import { TabOptions as
|
|
25
|
-
import { TabDragOverlay as
|
|
26
|
-
const
|
|
15
|
+
import { SearchBar as Kt } from "../../forms/search-bar/SearchBar.es.js";
|
|
16
|
+
import Ne from "../../tooltip/Tooltip.es.js";
|
|
17
|
+
import { EditIcon as en } from "../../icons/EditIcon.es.js";
|
|
18
|
+
import { toast as tn } from "react-toastify";
|
|
19
|
+
import { TabSwitch as ve } from "./TabSwitch.es.js";
|
|
20
|
+
import { PinIcon as se, ArrowOutwardIcon as nn, ArrowUpwardIcon as on, ArrowDownwardIcon as sn, ContentCopyIcon as rn, VisibilityOffIcon as an, VisibilityIcon as ln, UnpinFilledIcon as cn, DeleteIcon as dn } from "../../icon/icons.generated.es.js";
|
|
21
|
+
import { SortableTab as st } from "./SortableTab.es.js";
|
|
22
|
+
import { DropableWrapper as un } from "./DropableWrapper.es.js";
|
|
23
|
+
import { MoreButton as mn } from "./MoreButton.es.js";
|
|
24
|
+
import { TabOptions as pn } from "./TabOptions.es.js";
|
|
25
|
+
import { TabDragOverlay as fn } from "./TabDragOverlay.es.js";
|
|
26
|
+
const hn = () => Math.random().toString(16).slice(2, 13), ie = [
|
|
27
27
|
"[&_.ant-dropdown-menu-item]:!outline-none",
|
|
28
28
|
"[&_.ant-dropdown-menu-submenu-title]:!outline-none",
|
|
29
29
|
"[&_.ant-dropdown-menu-item:focus-visible_.option-button-inner]:ring-2",
|
|
@@ -35,14 +35,14 @@ const mn = () => Math.random().toString(16).slice(2, 13), se = [
|
|
|
35
35
|
"[&_.ant-dropdown-menu-submenu-title:focus-visible_.option-button-inner]:bg-gray-50",
|
|
36
36
|
"[&_.ant-dropdown-menu-submenu-title:focus-visible_.option-button-inner]:dark:bg-black-600"
|
|
37
37
|
].join(" ");
|
|
38
|
-
let
|
|
39
|
-
const
|
|
40
|
-
T ? (
|
|
38
|
+
let Ie = null;
|
|
39
|
+
const _e = (T) => {
|
|
40
|
+
T ? (Ie = document.activeElement, setTimeout(() => {
|
|
41
41
|
document.querySelector(
|
|
42
42
|
".row-option-cell .ant-dropdown-menu-item:not(.ant-dropdown-menu-item-disabled), .row-option-cell .ant-dropdown-menu-submenu-title"
|
|
43
43
|
)?.focus();
|
|
44
44
|
}, 50)) : setTimeout(() => {
|
|
45
|
-
|
|
45
|
+
Ie?.focus(), Ie = null;
|
|
46
46
|
}, 0);
|
|
47
47
|
}, c = {
|
|
48
48
|
SELECT: "Select",
|
|
@@ -55,127 +55,129 @@ const Ie = (T) => {
|
|
|
55
55
|
PIN: "Pin",
|
|
56
56
|
UNPIN: "Unpin",
|
|
57
57
|
EDIT: "Edit"
|
|
58
|
-
},
|
|
58
|
+
}, jn = ({
|
|
59
59
|
variant: T = "default",
|
|
60
|
-
tabs:
|
|
61
|
-
activeTab:
|
|
62
|
-
onTabClick:
|
|
63
|
-
suffixRecord:
|
|
64
|
-
isLoading:
|
|
65
|
-
size:
|
|
66
|
-
className:
|
|
67
|
-
draggable:
|
|
68
|
-
showAllItems:
|
|
69
|
-
copyLink:
|
|
70
|
-
isDisabled:
|
|
71
|
-
color:
|
|
72
|
-
iconsOnly:
|
|
73
|
-
tabIcons:
|
|
74
|
-
height:
|
|
75
|
-
fullWidth:
|
|
76
|
-
fitContentWidth:
|
|
77
|
-
disableAnimation:
|
|
78
|
-
onEdit:
|
|
79
|
-
onDelete:
|
|
80
|
-
onCopyLink:
|
|
81
|
-
allowPin:
|
|
82
|
-
isFullWidth:
|
|
60
|
+
tabs: O = [],
|
|
61
|
+
activeTab: r,
|
|
62
|
+
onTabClick: it,
|
|
63
|
+
suffixRecord: A,
|
|
64
|
+
isLoading: rt,
|
|
65
|
+
size: E = "md",
|
|
66
|
+
className: Oe,
|
|
67
|
+
draggable: D = !1,
|
|
68
|
+
showAllItems: G = !1,
|
|
69
|
+
copyLink: at = !1,
|
|
70
|
+
isDisabled: lt = !1,
|
|
71
|
+
color: re = "light",
|
|
72
|
+
iconsOnly: ct = !1,
|
|
73
|
+
tabIcons: ae = {},
|
|
74
|
+
height: dt = "h-6",
|
|
75
|
+
fullWidth: le = !1,
|
|
76
|
+
fitContentWidth: ut = !1,
|
|
77
|
+
disableAnimation: mt = !1,
|
|
78
|
+
onEdit: Ee,
|
|
79
|
+
onDelete: De,
|
|
80
|
+
onCopyLink: Ve,
|
|
81
|
+
allowPin: S = !1,
|
|
82
|
+
isFullWidth: Y = !1,
|
|
83
83
|
rightSection: H,
|
|
84
|
-
initialTabs:
|
|
85
|
-
tabConfig:
|
|
86
|
-
onTabConfigChange:
|
|
87
|
-
onTabsChange:
|
|
88
|
-
parentContainer:
|
|
89
|
-
tabKey:
|
|
84
|
+
initialTabs: pt,
|
|
85
|
+
tabConfig: ft,
|
|
86
|
+
onTabConfigChange: Le,
|
|
87
|
+
onTabsChange: Me,
|
|
88
|
+
parentContainer: ht = document.body,
|
|
89
|
+
tabKey: N,
|
|
90
90
|
linkConfig: m,
|
|
91
|
-
showTabOptions:
|
|
91
|
+
showTabOptions: bt = !0,
|
|
92
|
+
lockedTabs: Ue,
|
|
93
|
+
lockedTabTooltip: ce
|
|
92
94
|
}) => {
|
|
93
|
-
const x =
|
|
94
|
-
|
|
95
|
-
), [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
), p =
|
|
99
|
-
Object.entries(
|
|
95
|
+
const x = Qt(), He = N ? x?.getTabSettings(N) : void 0, de = pt ?? He?.tab_items, J = ft ?? He?.tab_options, [ue, xt] = w(""), [_, q] = w(!1), [R, gt] = w(0), [d, me] = w([]), [Q, wt] = w([]), [kt, X] = w(null), [V, Z] = w(null), [yt, Re] = w(!1), [We, Pe] = w(
|
|
96
|
+
J ?? Jt
|
|
97
|
+
), [pe, Ct] = w(""), [Fe, Tt] = w("contains"), { showCounts: k, lockOrder: W, sortOrder: fe } = We, { t: u } = Yt(), K = Se(null), St = Se(null), Be = Se(R), { measureText: P } = Xt(), F = U(() => hn(), []), Nt = Ft(
|
|
98
|
+
tt(Bt, { activationConstraint: { distance: 5 } }),
|
|
99
|
+
tt(zt, { activationConstraint: { delay: 300, tolerance: 5 } })
|
|
100
|
+
), p = U(() => A && Object.fromEntries(
|
|
101
|
+
Object.entries(A).map(([e, t]) => [
|
|
100
102
|
e,
|
|
101
|
-
|
|
103
|
+
qt(t)
|
|
102
104
|
])
|
|
103
|
-
), [
|
|
104
|
-
() =>
|
|
105
|
-
if (!
|
|
106
|
-
const t = (e ?? "").toLowerCase(), o =
|
|
107
|
-
return
|
|
105
|
+
), [A]), ze = U(() => Q.filter(({ is_hidden: e }) => !e), [Q]), L = U(() => Q.filter(({ is_hidden: e }) => e), [Q]), je = U(
|
|
106
|
+
() => ze.filter(({ name: e }) => {
|
|
107
|
+
if (!pe) return !0;
|
|
108
|
+
const t = (e ?? "").toLowerCase(), o = pe.toLowerCase();
|
|
109
|
+
return Fe === "contains" ? t.includes(o) : !t.includes(o);
|
|
108
110
|
}),
|
|
109
|
-
[
|
|
110
|
-
), a =
|
|
111
|
-
() => [...
|
|
112
|
-
[
|
|
113
|
-
),
|
|
114
|
-
|
|
115
|
-
const
|
|
111
|
+
[ze, pe, Fe]
|
|
112
|
+
), a = U(
|
|
113
|
+
() => [...je].sort((e, t) => e.is_pinned && !t.is_pinned ? -1 : !e.is_pinned && t.is_pinned ? 1 : 0),
|
|
114
|
+
[je]
|
|
115
|
+
), vt = R < a.length, ee = G ? a.length : vt ? R : a.length, $e = a.findIndex((e) => e.name === r) >= ee, Ae = d.length - ee - ($e ? 1 : 0);
|
|
116
|
+
Be.current = R;
|
|
117
|
+
const B = I(
|
|
116
118
|
(e) => {
|
|
117
|
-
|
|
119
|
+
me(e), Me?.(e), N && x?.persistTabSettings && x.persistTabSettings({ tab_type: N, tab_items: e });
|
|
118
120
|
},
|
|
119
|
-
[
|
|
120
|
-
),
|
|
121
|
+
[Me, N, x]
|
|
122
|
+
), It = I(
|
|
121
123
|
(e) => {
|
|
122
|
-
|
|
124
|
+
Pe(e), Le?.(e), N && x?.persistTabSettings && x.persistTabSettings({ tab_type: N, tab_options: e });
|
|
123
125
|
},
|
|
124
|
-
[
|
|
125
|
-
),
|
|
126
|
+
[Le, N, x]
|
|
127
|
+
), Ge = (e) => e.is_pinned ? 32 : 0, he = I(
|
|
126
128
|
(e) => {
|
|
127
129
|
if (!e) return;
|
|
128
|
-
const t =
|
|
129
|
-
let f = 0,
|
|
130
|
-
const h = e - (H?.width || 0) - t,
|
|
130
|
+
const t = D ? 30 : 0, o = k ? 190 : 84, s = E === "sm" ? 4 : 8, i = 32;
|
|
131
|
+
let f = 0, ne = 0, g = 0;
|
|
132
|
+
const h = e - (H?.width || 0) - t, Qe = Be.current, Xe = Qe < a.length, Ze = L.length > 0;
|
|
131
133
|
for (let b = 0; b < a.length; b++) {
|
|
132
|
-
const
|
|
134
|
+
const v = a[b], oe = p?.[v.name] ? String(p?.[v.name]) : "", we = k && oe ? P(oe, {
|
|
133
135
|
fontSize: "16px",
|
|
134
136
|
fontWeight: "500",
|
|
135
137
|
fontFamily: "Inter, system-ui, -apple-system, sans-serif"
|
|
136
|
-
}) + 18 + 2 : 0,
|
|
138
|
+
}) + 18 + 2 : 0, ke = P(v?.name || "", {
|
|
137
139
|
fontSize: "16px",
|
|
138
140
|
fontWeight: "600",
|
|
139
141
|
fontFamily: "Inter, system-ui, -apple-system, sans-serif"
|
|
140
|
-
}),
|
|
141
|
-
if (
|
|
142
|
+
}), ye = S ? Ge(v) : 0, et = ke + we + i + s + ye;
|
|
143
|
+
if (v.name === r && (ne = et), f += et, h > f + (Xe || Ze ? o : 0) + b * 25)
|
|
142
144
|
g = b + 1;
|
|
143
145
|
else
|
|
144
146
|
break;
|
|
145
147
|
}
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
+
const Ke = a.length - g;
|
|
149
|
+
if (Ke + L.length === 1 && L.length === 0 && Ke === 1 && g < a.length) {
|
|
148
150
|
const b = a[g];
|
|
149
151
|
if (b) {
|
|
150
|
-
const
|
|
152
|
+
const v = p?.[b.name] ? String(p?.[b.name]) : "", oe = k && v ? P(v, {
|
|
151
153
|
fontSize: "16px",
|
|
152
154
|
fontWeight: "500",
|
|
153
155
|
fontFamily: "Inter, system-ui, -apple-system, sans-serif"
|
|
154
|
-
}) + 18 + 2 : 0,
|
|
156
|
+
}) + 18 + 2 : 0, we = P(b?.name || "", {
|
|
155
157
|
fontSize: "16px",
|
|
156
158
|
fontWeight: "600",
|
|
157
159
|
fontFamily: "Inter, system-ui, -apple-system, sans-serif"
|
|
158
|
-
}),
|
|
159
|
-
h >= f +
|
|
160
|
+
}), ke = S ? Ge(b) : 0, ye = we + oe + i + s + ke;
|
|
161
|
+
h >= f + ye && (g += 1);
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
|
-
const
|
|
163
|
-
a.findIndex((b) => b.name ===
|
|
164
|
+
const Pt = G ? a.length : g;
|
|
165
|
+
a.findIndex((b) => b.name === r) >= Pt && (f += ne, h < f + (Xe || Ze ? o : 0) && (g = Math.max(g - 1, 0))), g !== Qe && gt(g);
|
|
164
166
|
},
|
|
165
167
|
[
|
|
166
168
|
a,
|
|
167
169
|
k,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
+
G,
|
|
171
|
+
S,
|
|
170
172
|
p,
|
|
171
173
|
H?.width,
|
|
172
|
-
|
|
173
|
-
O,
|
|
174
|
+
r,
|
|
174
175
|
E,
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
D,
|
|
177
|
+
L.length,
|
|
178
|
+
P
|
|
177
179
|
]
|
|
178
|
-
),
|
|
180
|
+
), be = I(
|
|
179
181
|
() => {
|
|
180
182
|
if (typeof window < "u")
|
|
181
183
|
return new URLSearchParams(window.location.search);
|
|
@@ -186,187 +188,190 @@ const Ie = (T) => {
|
|
|
186
188
|
return new URLSearchParams();
|
|
187
189
|
},
|
|
188
190
|
[m, x]
|
|
189
|
-
),
|
|
191
|
+
), xe = I(
|
|
190
192
|
(e, t) => (m && (t === m.defaultLink ? e.delete(m.key) : e.set(m.key, t), m.onResolve?.(e)), e),
|
|
191
193
|
[m]
|
|
192
|
-
), z =
|
|
193
|
-
(e) => m ? `?${
|
|
194
|
-
[
|
|
195
|
-
),
|
|
194
|
+
), z = I(
|
|
195
|
+
(e) => m ? `?${xe(be(), e).toString()}` : void 0,
|
|
196
|
+
[xe, be, m]
|
|
197
|
+
), _t = at || !!m, Ot = I(
|
|
196
198
|
async (e) => {
|
|
197
|
-
const t = z(e), o = typeof window < "u" ? window.location.origin : "",
|
|
198
|
-
await navigator.clipboard.writeText(
|
|
199
|
+
const t = z(e), o = typeof window < "u" ? window.location.origin : "", s = typeof window < "u" ? window.location.pathname : "", i = t ? `${o}${s}${t}` : `${o}${s}`;
|
|
200
|
+
await navigator.clipboard.writeText(i), tn.success(u("Link copied to clipboard"), {
|
|
199
201
|
toastId: "Link copied to clipboard"
|
|
200
|
-
}),
|
|
202
|
+
}), Ve?.(e, i);
|
|
201
203
|
},
|
|
202
|
-
[z, u,
|
|
203
|
-
),
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
[z, u, Ve]
|
|
205
|
+
), C = I(
|
|
206
|
+
(e) => !!Ue?.includes(e),
|
|
207
|
+
[Ue]
|
|
208
|
+
), j = (e) => {
|
|
209
|
+
if (!C(e) && (q(!1), it?.(e), m && x?.navigate)) {
|
|
210
|
+
const t = xe(be(), e);
|
|
206
211
|
x.navigate(`?${t.toString()}`);
|
|
207
212
|
}
|
|
208
|
-
},
|
|
213
|
+
}, Ye = (e) => {
|
|
209
214
|
if (a.length <= 1) return;
|
|
210
215
|
const t = d.map(
|
|
211
|
-
(
|
|
212
|
-
), o = a.findIndex((
|
|
213
|
-
|
|
214
|
-
},
|
|
216
|
+
(i) => i.name === e ? { ...i, is_hidden: !0 } : i
|
|
217
|
+
), o = a.findIndex((i) => i.name === e), s = o === 0 ? 1 : o - 1;
|
|
218
|
+
j(a[s].name), B(t);
|
|
219
|
+
}, Et = (e) => {
|
|
215
220
|
const t = d.map(
|
|
216
221
|
(o) => o.name === e ? { ...o, is_hidden: !1 } : o
|
|
217
222
|
);
|
|
218
|
-
|
|
219
|
-
},
|
|
220
|
-
if (!
|
|
223
|
+
q(!1), B(t);
|
|
224
|
+
}, te = (e) => {
|
|
225
|
+
if (!S) return;
|
|
221
226
|
const t = d.map(
|
|
222
227
|
(o) => o.name === e ? { ...o, is_pinned: !o.is_pinned } : o
|
|
223
228
|
);
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
const o = d.findIndex(({ name:
|
|
227
|
-
|
|
228
|
-
},
|
|
229
|
+
B(t);
|
|
230
|
+
}, Je = (e, t) => {
|
|
231
|
+
const o = d.findIndex(({ name: i }) => i === e), s = t === "left" ? o - (d[o - 1]?.name === r ? 2 : 1) : o + 1;
|
|
232
|
+
B(nt(d, o, s));
|
|
233
|
+
}, qe = () => q(!_), Dt = (e) => Z(e.active.id), Vt = (e) => {
|
|
229
234
|
const { active: t, over: o } = e;
|
|
230
235
|
if (o?.id === "more-tabs") {
|
|
231
|
-
|
|
236
|
+
Ye(t.id), Z(null), X(null);
|
|
232
237
|
return;
|
|
233
238
|
}
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
},
|
|
244
|
-
const
|
|
239
|
+
const s = d.findIndex(({ name: f }) => f === t.id), i = d.findIndex(({ name: f }) => f === o?.id);
|
|
240
|
+
B(nt(d, s, i)), Z(null), X(null);
|
|
241
|
+
}, Lt = () => {
|
|
242
|
+
Z(null), X(null);
|
|
243
|
+
}, Mt = (e) => {
|
|
244
|
+
X(e.over?.id === "more-tabs" ? "more-tabs" : null);
|
|
245
|
+
}, Ut = () => {
|
|
246
|
+
}, Ht = (e, t) => {
|
|
247
|
+
Ct(e), Tt(t);
|
|
248
|
+
}, ge = (e, t = !1, o = !1) => {
|
|
249
|
+
const i = d.find((h) => h.name === e)?.is_pinned, f = [
|
|
245
250
|
{
|
|
246
251
|
label: /* @__PURE__ */ n(
|
|
247
252
|
y,
|
|
248
253
|
{
|
|
249
|
-
icon: /* @__PURE__ */ n(
|
|
254
|
+
icon: /* @__PURE__ */ n(nn, { className: "w-icon h-icon text-inherit dark:text-inherit" }),
|
|
250
255
|
text: u("Select Tab"),
|
|
251
256
|
className: "text-black-900 dark:text-white"
|
|
252
257
|
}
|
|
253
258
|
),
|
|
254
259
|
key: c.SELECT,
|
|
255
|
-
onClick: () =>
|
|
260
|
+
onClick: () => j(e)
|
|
256
261
|
},
|
|
257
262
|
{
|
|
258
263
|
label: /* @__PURE__ */ n(
|
|
259
264
|
y,
|
|
260
265
|
{
|
|
261
|
-
icon: /* @__PURE__ */ n(
|
|
266
|
+
icon: /* @__PURE__ */ n(on, { className: "w-icon h-icon text-inherit dark:text-inherit" }),
|
|
262
267
|
text: u("Move Up"),
|
|
263
|
-
isDisabled:
|
|
268
|
+
isDisabled: W,
|
|
264
269
|
className: "text-black-900 dark:text-white"
|
|
265
270
|
}
|
|
266
271
|
),
|
|
267
272
|
key: c.MOVE_LEFT,
|
|
268
|
-
disabled:
|
|
269
|
-
onClick: () =>
|
|
273
|
+
disabled: W,
|
|
274
|
+
onClick: () => Je(e, "left")
|
|
270
275
|
},
|
|
271
276
|
{
|
|
272
277
|
label: /* @__PURE__ */ n(
|
|
273
278
|
y,
|
|
274
279
|
{
|
|
275
|
-
icon: /* @__PURE__ */ n(
|
|
280
|
+
icon: /* @__PURE__ */ n(sn, { className: "w-icon h-icon text-inherit dark:text-inherit" }),
|
|
276
281
|
text: u("Move Down"),
|
|
277
|
-
isDisabled:
|
|
282
|
+
isDisabled: W,
|
|
278
283
|
className: "text-black-900 dark:text-white"
|
|
279
284
|
}
|
|
280
285
|
),
|
|
281
286
|
key: c.MOVE_RIGHT,
|
|
282
|
-
disabled:
|
|
283
|
-
onClick: () =>
|
|
287
|
+
disabled: W,
|
|
288
|
+
onClick: () => Je(e, "right")
|
|
284
289
|
},
|
|
285
290
|
{
|
|
286
291
|
label: /* @__PURE__ */ n(
|
|
287
292
|
y,
|
|
288
293
|
{
|
|
289
|
-
icon: /* @__PURE__ */ n(
|
|
294
|
+
icon: /* @__PURE__ */ n(rn, { className: "w-icon h-icon text-inherit dark:text-inherit" }),
|
|
290
295
|
text: u("Copy Link"),
|
|
291
296
|
className: "text-black-900 dark:text-white"
|
|
292
297
|
}
|
|
293
298
|
),
|
|
294
299
|
key: c.COPY_LINK,
|
|
295
|
-
onClick: () =>
|
|
300
|
+
onClick: () => Ot(e)
|
|
296
301
|
},
|
|
297
302
|
{
|
|
298
303
|
label: /* @__PURE__ */ n(
|
|
299
304
|
y,
|
|
300
305
|
{
|
|
301
|
-
icon: /* @__PURE__ */ n(
|
|
306
|
+
icon: /* @__PURE__ */ n(an, { className: "w-icon h-icon text-inherit dark:text-inherit" }),
|
|
302
307
|
text: u("Hide"),
|
|
303
308
|
className: "text-black-900 dark:text-white"
|
|
304
309
|
}
|
|
305
310
|
),
|
|
306
311
|
key: c.HIDE,
|
|
307
|
-
onClick: () =>
|
|
312
|
+
onClick: () => Ye(e)
|
|
308
313
|
},
|
|
309
314
|
{
|
|
310
315
|
label: /* @__PURE__ */ n(
|
|
311
316
|
y,
|
|
312
317
|
{
|
|
313
|
-
icon: /* @__PURE__ */ n(
|
|
318
|
+
icon: /* @__PURE__ */ n(ln, { className: "w-icon h-icon text-inherit dark:text-inherit" }),
|
|
314
319
|
text: u("Unhide"),
|
|
315
320
|
className: "text-black-900 dark:text-white"
|
|
316
321
|
}
|
|
317
322
|
),
|
|
318
323
|
key: c.UNHIDE,
|
|
319
|
-
onClick: () =>
|
|
324
|
+
onClick: () => Et(e)
|
|
320
325
|
},
|
|
321
326
|
{
|
|
322
327
|
label: /* @__PURE__ */ n(
|
|
323
328
|
y,
|
|
324
329
|
{
|
|
325
|
-
icon:
|
|
326
|
-
text: u(
|
|
330
|
+
icon: i ? /* @__PURE__ */ n(cn, { className: "w-icon h-icon rotate-12 text-inherit dark:text-inherit" }) : /* @__PURE__ */ n(se, { className: "w-icon h-icon rotate-45 text-inherit dark:text-inherit" }),
|
|
331
|
+
text: u(i ? "Unpin" : "Pin"),
|
|
327
332
|
className: "text-black-900 dark:text-white",
|
|
328
|
-
notVisible: !
|
|
333
|
+
notVisible: !S
|
|
329
334
|
}
|
|
330
335
|
),
|
|
331
|
-
key:
|
|
332
|
-
onClick: () =>
|
|
336
|
+
key: i ? c.UNPIN : c.PIN,
|
|
337
|
+
onClick: () => te(e)
|
|
333
338
|
},
|
|
334
339
|
{
|
|
335
340
|
label: /* @__PURE__ */ n(
|
|
336
341
|
y,
|
|
337
342
|
{
|
|
338
343
|
className: "text-black-900 dark:text-white",
|
|
339
|
-
icon: /* @__PURE__ */ n(
|
|
344
|
+
icon: /* @__PURE__ */ n(en, { className: "w-icon h-icon" }),
|
|
340
345
|
text: u("Edit"),
|
|
341
|
-
notVisible: !
|
|
346
|
+
notVisible: !Ee
|
|
342
347
|
}
|
|
343
348
|
),
|
|
344
349
|
key: c.EDIT,
|
|
345
|
-
onClick: () =>
|
|
350
|
+
onClick: () => Ee?.(e)
|
|
346
351
|
},
|
|
347
352
|
{
|
|
348
353
|
label: /* @__PURE__ */ n(
|
|
349
354
|
y,
|
|
350
355
|
{
|
|
351
356
|
className: "text-error-600 dark:text-error-600",
|
|
352
|
-
icon: /* @__PURE__ */ n(
|
|
357
|
+
icon: /* @__PURE__ */ n(dn, { className: "w-icon h-icon text-error-600 dark:text-error-600" }),
|
|
353
358
|
text: u("Delete"),
|
|
354
|
-
notVisible: !
|
|
359
|
+
notVisible: !De
|
|
355
360
|
}
|
|
356
361
|
),
|
|
357
362
|
key: c.DELETE,
|
|
358
|
-
onClick: () =>
|
|
363
|
+
onClick: () => De?.(e)
|
|
359
364
|
}
|
|
360
|
-
],
|
|
365
|
+
], ne = [c.HIDE, c.UNHIDE], g = [c.SELECT, c.MOVE_LEFT, c.MOVE_RIGHT, c.UNHIDE];
|
|
361
366
|
return f.filter(
|
|
362
|
-
(h) => t ? h.key === c.UNHIDE : o ? !
|
|
363
|
-
).filter((h) =>
|
|
364
|
-
},
|
|
367
|
+
(h) => t ? h.key === c.UNHIDE : o ? !ne.includes(h.key) : !g.includes(h.key)
|
|
368
|
+
).filter((h) => _t ? !0 : h.key !== c.COPY_LINK).filter((h) => a.length === 1 ? h.key !== c.HIDE : !0);
|
|
369
|
+
}, M = (e, t) => ({
|
|
365
370
|
classValue: {
|
|
366
371
|
default: l("relative inline-flex pt-2 pb-3 px-2 pl-3 sm:px-2 rounded-t-sm group"),
|
|
367
372
|
secondary: l(
|
|
368
373
|
"flex w-full sm:w-auto relative rounded-lg font-sans font-semibold text-center cursor-pointer uppercase",
|
|
369
|
-
|
|
374
|
+
E === "sm" ? "py-1 px-3 text-sm" : "py-2 px-4 text-base"
|
|
370
375
|
)
|
|
371
376
|
},
|
|
372
377
|
selectedClassValue: {
|
|
@@ -384,77 +389,79 @@ const Ie = (T) => {
|
|
|
384
389
|
)
|
|
385
390
|
}
|
|
386
391
|
})[e][T];
|
|
387
|
-
|
|
388
|
-
if (!
|
|
392
|
+
$(() => {
|
|
393
|
+
if (!K.current || T === "switch") return;
|
|
389
394
|
const e = new ResizeObserver((t) => {
|
|
390
395
|
const o = t[0].contentRect.width;
|
|
391
|
-
|
|
396
|
+
he(o);
|
|
392
397
|
});
|
|
393
|
-
return e.observe(
|
|
394
|
-
}, [
|
|
395
|
-
const
|
|
396
|
-
return
|
|
397
|
-
if (
|
|
398
|
-
let e = [...
|
|
399
|
-
|
|
398
|
+
return e.observe(K.current), he(K.current.clientWidth), () => e.disconnect();
|
|
399
|
+
}, [he, T]);
|
|
400
|
+
const Rt = JSON.stringify(O), Wt = JSON.stringify(de?.map(({ name: e }) => e));
|
|
401
|
+
return $(() => {
|
|
402
|
+
if (de?.length) {
|
|
403
|
+
let e = [...de];
|
|
404
|
+
O.forEach((t) => {
|
|
400
405
|
e.find((o) => o.name === t) || e.push({ name: t, is_default: !1, is_hidden: !1, is_pinned: !1 });
|
|
401
406
|
}), e = e.filter(
|
|
402
|
-
(t, o,
|
|
403
|
-
),
|
|
407
|
+
(t, o, s) => O.includes(t.name) && o === s.findIndex((i) => i.name === t.name)
|
|
408
|
+
), me(e);
|
|
404
409
|
} else
|
|
405
|
-
|
|
406
|
-
|
|
410
|
+
me(
|
|
411
|
+
O.map((e) => ({ name: e, is_default: !1, is_hidden: !1, is_pinned: !1 })).filter((e, t, o) => t === o.findIndex((s) => s.name === e.name))
|
|
407
412
|
);
|
|
408
|
-
}, [
|
|
409
|
-
|
|
410
|
-
}, [
|
|
413
|
+
}, [Rt, Wt]), $(() => {
|
|
414
|
+
J && Pe(J);
|
|
415
|
+
}, [J]), $(() => {
|
|
411
416
|
if (!d.length) return;
|
|
412
417
|
const e = [...d];
|
|
413
|
-
|
|
414
|
-
}, [d,
|
|
415
|
-
|
|
416
|
-
}, [
|
|
418
|
+
fe === "asc" ? e.sort((t, o) => t.name.localeCompare(o.name)) : fe === "desc" && e.sort((t, o) => o.name.localeCompare(t.name)), wt(e);
|
|
419
|
+
}, [d, fe]), $(() => {
|
|
420
|
+
_e(_);
|
|
421
|
+
}, [_]), T === "switch" ? /* @__PURE__ */ n("div", { className: l("inline", Oe), children: /* @__PURE__ */ n(
|
|
417
422
|
"ul",
|
|
418
423
|
{
|
|
419
424
|
role: "tablist",
|
|
420
425
|
"aria-orientation": "horizontal",
|
|
421
426
|
className: l(
|
|
422
427
|
"inline-flex grow-0 p-1 rounded-lg",
|
|
423
|
-
|
|
424
|
-
|
|
428
|
+
re === "dark" ? "border-[1.5px] border-neutral-800 bg-neutral-800 dark:border-black-800" : "bg-neutral-100 dark:bg-black-700",
|
|
429
|
+
le ? "w-full" : "w-auto"
|
|
425
430
|
),
|
|
426
|
-
children:
|
|
427
|
-
const t =
|
|
428
|
-
return /* @__PURE__ */ n("li", { role: "presentation", className: l("inline-flex",
|
|
429
|
-
|
|
431
|
+
children: O.map((e) => {
|
|
432
|
+
const t = r === e, o = ae?.[e], s = d.find((f) => f.name === e), i = S && s?.is_pinned;
|
|
433
|
+
return /* @__PURE__ */ n("li", { role: "presentation", className: l("inline-flex", le ? "w-full" : "w-auto"), children: /* @__PURE__ */ n(
|
|
434
|
+
ve,
|
|
430
435
|
{
|
|
431
436
|
title: e,
|
|
432
437
|
showCounts: k,
|
|
433
438
|
role: "tab",
|
|
434
439
|
ariaSelected: t,
|
|
435
440
|
tabIndex: 0,
|
|
436
|
-
icon:
|
|
437
|
-
iconsOnly:
|
|
441
|
+
icon: i ? /* @__PURE__ */ n(Ne, { title: "Unpin", children: /* @__PURE__ */ n("span", { onClick: () => te(e), children: /* @__PURE__ */ n(se, { className: "rotate-45 w-icon h-icon text-inherit dark:text-inherit" }) }) }) : o,
|
|
442
|
+
iconsOnly: ct,
|
|
438
443
|
classValue: l(
|
|
439
444
|
"relative py-0.5 border-gray-200",
|
|
440
|
-
|
|
441
|
-
|
|
445
|
+
dt,
|
|
446
|
+
le ? "w-full flex items-center justify-center" : "px-2"
|
|
442
447
|
),
|
|
443
448
|
selectedClassValue: l(
|
|
444
449
|
"absolute inset-0 rounded-md z-0",
|
|
445
|
-
|
|
450
|
+
re === "dark" ? "bg-neutral-900" : "bg-white dark:bg-black-800"
|
|
446
451
|
),
|
|
447
452
|
textClassValue: l(
|
|
448
453
|
"relative text-xs font-semibold font-sans whitespace-nowrap",
|
|
449
454
|
t ? "text-neutral-900 dark:text-neutral-100" : "text-neutral-700 dark:text-neutral-100"
|
|
450
455
|
),
|
|
451
456
|
isSelected: t,
|
|
452
|
-
|
|
453
|
-
|
|
457
|
+
isLocked: C(e),
|
|
458
|
+
lockedTooltip: ce,
|
|
459
|
+
href: C(e) ? void 0 : z(e),
|
|
460
|
+
onClick: !lt && !C(e) ? () => j(e) : void 0,
|
|
454
461
|
suffixRecord: p,
|
|
455
|
-
selectedId:
|
|
456
|
-
color:
|
|
457
|
-
disableAnimation:
|
|
462
|
+
selectedId: F,
|
|
463
|
+
color: re,
|
|
464
|
+
disableAnimation: mt
|
|
458
465
|
}
|
|
459
466
|
) }, e);
|
|
460
467
|
})
|
|
@@ -462,50 +469,50 @@ const Ie = (T) => {
|
|
|
462
469
|
) }) : /* @__PURE__ */ n(
|
|
463
470
|
"div",
|
|
464
471
|
{
|
|
465
|
-
ref:
|
|
466
|
-
className: l(
|
|
467
|
-
onMouseEnter: () =>
|
|
468
|
-
onMouseLeave: () =>
|
|
469
|
-
children: /* @__PURE__ */
|
|
470
|
-
|
|
472
|
+
ref: K,
|
|
473
|
+
className: l(ut ? "w-fit" : "w-full"),
|
|
474
|
+
onMouseEnter: () => Re(!0),
|
|
475
|
+
onMouseLeave: () => Re(!1),
|
|
476
|
+
children: /* @__PURE__ */ Ce(
|
|
477
|
+
jt,
|
|
471
478
|
{
|
|
472
|
-
sensors:
|
|
473
|
-
onDragEnd:
|
|
474
|
-
onDragStart:
|
|
475
|
-
onDragCancel:
|
|
476
|
-
collisionDetection:
|
|
477
|
-
onDragOver:
|
|
479
|
+
sensors: Nt,
|
|
480
|
+
onDragEnd: Vt,
|
|
481
|
+
onDragStart: Dt,
|
|
482
|
+
onDragCancel: Lt,
|
|
483
|
+
collisionDetection: $t,
|
|
484
|
+
onDragOver: Mt,
|
|
478
485
|
children: [
|
|
479
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ Ce(
|
|
480
487
|
"ul",
|
|
481
488
|
{
|
|
482
489
|
role: "tablist",
|
|
483
490
|
"aria-orientation": "horizontal",
|
|
484
491
|
className: l(
|
|
485
492
|
"flex items-center w-full",
|
|
486
|
-
|
|
487
|
-
|
|
493
|
+
Oe,
|
|
494
|
+
Y ? "gap-0" : E === "sm" ? "gap-1" : "gap-2"
|
|
488
495
|
),
|
|
489
|
-
ref:
|
|
496
|
+
ref: St,
|
|
490
497
|
children: [
|
|
491
|
-
|
|
492
|
-
|
|
498
|
+
rt ? /* @__PURE__ */ n("div", { className: "skeleton bg-neutral-300 dark:bg-black-700 animate-pulse h-10 min-w-[100px] w-full rounded" }) : /* @__PURE__ */ Ce(
|
|
499
|
+
At,
|
|
493
500
|
{
|
|
494
501
|
items: a.map(({ name: e }) => e),
|
|
495
|
-
strategy:
|
|
502
|
+
strategy: Gt,
|
|
496
503
|
id: "sortable",
|
|
497
|
-
disabled: !
|
|
504
|
+
disabled: !D || W,
|
|
498
505
|
children: [
|
|
499
|
-
a.slice(0,
|
|
500
|
-
const o =
|
|
506
|
+
a.slice(0, ee).map(({ name: e, is_pinned: t }) => {
|
|
507
|
+
const o = r === e && !_, s = S && t;
|
|
501
508
|
return /* @__PURE__ */ n(
|
|
502
|
-
|
|
509
|
+
st,
|
|
503
510
|
{
|
|
504
511
|
title: e,
|
|
505
|
-
isDragging:
|
|
506
|
-
className:
|
|
507
|
-
children: /* @__PURE__ */ n("li", { role: "presentation", className: l(
|
|
508
|
-
|
|
512
|
+
isDragging: V === e,
|
|
513
|
+
className: Y ? "flex-1 flex justify-center" : "",
|
|
514
|
+
children: /* @__PURE__ */ n("li", { role: "presentation", className: l(Y ? "w-full flex" : "sm:mr-2"), children: /* @__PURE__ */ n(
|
|
515
|
+
ve,
|
|
509
516
|
{
|
|
510
517
|
showCounts: k,
|
|
511
518
|
title: e,
|
|
@@ -513,85 +520,89 @@ const Ie = (T) => {
|
|
|
513
520
|
ariaSelected: o,
|
|
514
521
|
tabIndex: 0,
|
|
515
522
|
classValue: l(
|
|
516
|
-
|
|
517
|
-
|
|
523
|
+
M("classValue", o),
|
|
524
|
+
Y ? "w-full justify-center" : ""
|
|
518
525
|
),
|
|
519
|
-
selectedClassValue:
|
|
520
|
-
textClassValue:
|
|
526
|
+
selectedClassValue: M("selectedClassValue", o),
|
|
527
|
+
textClassValue: M("textClassValue", o),
|
|
521
528
|
isSelected: o,
|
|
522
|
-
tabOptions: o &&
|
|
523
|
-
|
|
529
|
+
tabOptions: o && D ? /* @__PURE__ */ n(
|
|
530
|
+
Te,
|
|
524
531
|
{
|
|
525
532
|
menu: {
|
|
526
|
-
items:
|
|
527
|
-
className:
|
|
533
|
+
items: ge(e),
|
|
534
|
+
className: ie
|
|
528
535
|
},
|
|
529
536
|
trigger: ["click"],
|
|
530
|
-
onOpenChange:
|
|
537
|
+
onOpenChange: _e,
|
|
531
538
|
overlayClassName: "row-option-cell",
|
|
532
539
|
rootClassName: "",
|
|
533
540
|
openClassName: "max-h-[350px] overflow-y-auto",
|
|
534
541
|
placement: "bottom",
|
|
535
542
|
children: /* @__PURE__ */ n(
|
|
536
|
-
|
|
543
|
+
Zt,
|
|
537
544
|
{
|
|
538
545
|
tooltip: u("More"),
|
|
539
546
|
variant: "ghost",
|
|
540
547
|
className: "!text-primary-500 hover:!bg-primary-100 dark:hover:!bg-primary-900",
|
|
541
|
-
children: /* @__PURE__ */ n(
|
|
548
|
+
children: /* @__PURE__ */ n(ot, { sx: { fontSize: 20 } })
|
|
542
549
|
}
|
|
543
550
|
)
|
|
544
551
|
}
|
|
545
552
|
) : null,
|
|
546
|
-
draggingTab:
|
|
547
|
-
|
|
548
|
-
|
|
553
|
+
draggingTab: V === e,
|
|
554
|
+
isLocked: C(e),
|
|
555
|
+
lockedTooltip: ce,
|
|
556
|
+
href: C(e) ? void 0 : z(e),
|
|
557
|
+
onClick: () => j(e),
|
|
549
558
|
suffixRecord: p,
|
|
550
|
-
selectedId:
|
|
551
|
-
icon:
|
|
559
|
+
selectedId: F,
|
|
560
|
+
icon: s ? /* @__PURE__ */ n(Ne, { title: u("Unpin"), children: /* @__PURE__ */ n("span", { onClick: () => te(e), children: /* @__PURE__ */ n(se, { size: 20, className: "rotate-45 text-inherit dark:text-inherit" }) }) }) : ae?.[e] ?? null
|
|
552
561
|
}
|
|
553
562
|
) }, e)
|
|
554
563
|
},
|
|
555
564
|
e
|
|
556
565
|
);
|
|
557
566
|
}),
|
|
558
|
-
|
|
559
|
-
|
|
567
|
+
r && $e ? /* @__PURE__ */ n(st, { title: r, isDragging: V === r, children: /* @__PURE__ */ n("li", { role: "presentation", className: l("sm:mr-2"), children: /* @__PURE__ */ n(
|
|
568
|
+
ve,
|
|
560
569
|
{
|
|
561
570
|
showCounts: k,
|
|
562
|
-
title:
|
|
571
|
+
title: r,
|
|
563
572
|
role: "tab",
|
|
564
573
|
ariaSelected: !0,
|
|
565
574
|
tabIndex: 0,
|
|
566
|
-
classValue:
|
|
567
|
-
selectedClassValue:
|
|
568
|
-
textClassValue:
|
|
575
|
+
classValue: M("classValue", !0),
|
|
576
|
+
selectedClassValue: M("selectedClassValue", !0),
|
|
577
|
+
textClassValue: M("textClassValue", !0),
|
|
569
578
|
isSelected: !0,
|
|
570
|
-
tabOptions:
|
|
571
|
-
|
|
579
|
+
tabOptions: D ? /* @__PURE__ */ n(
|
|
580
|
+
Te,
|
|
572
581
|
{
|
|
573
582
|
menu: {
|
|
574
|
-
items:
|
|
575
|
-
className:
|
|
583
|
+
items: ge(r),
|
|
584
|
+
className: ie
|
|
576
585
|
},
|
|
577
586
|
trigger: ["click"],
|
|
578
|
-
onOpenChange:
|
|
587
|
+
onOpenChange: _e,
|
|
579
588
|
overlayClassName: "row-option-cell",
|
|
580
589
|
rootClassName: "",
|
|
581
590
|
openClassName: "max-h-[350px] overflow-y-auto",
|
|
582
591
|
placement: "bottom",
|
|
583
|
-
children: /* @__PURE__ */ n(
|
|
592
|
+
children: /* @__PURE__ */ n(ot, { sx: { fontSize: 20 }, className: "text-primary-600" })
|
|
584
593
|
}
|
|
585
594
|
) : null,
|
|
586
|
-
draggingTab:
|
|
587
|
-
|
|
595
|
+
draggingTab: V === r,
|
|
596
|
+
isLocked: C(r),
|
|
597
|
+
lockedTooltip: ce,
|
|
598
|
+
href: C(r) ? void 0 : z(r),
|
|
588
599
|
suffixRecord: p,
|
|
589
|
-
selectedId:
|
|
590
|
-
icon:
|
|
600
|
+
selectedId: F,
|
|
601
|
+
icon: S && d.find((e) => e.name === r)?.is_pinned ? /* @__PURE__ */ n(Ne, { title: u("Pinned"), children: /* @__PURE__ */ n("span", { onClick: () => te(r), children: /* @__PURE__ */ n(se, { size: 20, className: "rotate-45 text-inherit dark:text-inherit" }) }) }) : ae?.[r] ?? null
|
|
591
602
|
}
|
|
592
|
-
) },
|
|
593
|
-
(
|
|
594
|
-
|
|
603
|
+
) }, r) }, r) : null,
|
|
604
|
+
(R < a.length && !G || L.length > 0) && Ae > 0 ? /* @__PURE__ */ n(un, { id: "more-tabs", children: /* @__PURE__ */ n(
|
|
605
|
+
Te,
|
|
595
606
|
{
|
|
596
607
|
overlayStyle: {
|
|
597
608
|
maxHeight: "calc(100vh - 350px)",
|
|
@@ -601,8 +612,8 @@ const Ie = (T) => {
|
|
|
601
612
|
borderRadius: 8,
|
|
602
613
|
boxShadow: "0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)"
|
|
603
614
|
},
|
|
604
|
-
onOpenChange: () =>
|
|
605
|
-
open:
|
|
615
|
+
onOpenChange: () => qe(),
|
|
616
|
+
open: _,
|
|
606
617
|
menu: {
|
|
607
618
|
items: [
|
|
608
619
|
{
|
|
@@ -610,41 +621,44 @@ const Ie = (T) => {
|
|
|
610
621
|
disabled: !0,
|
|
611
622
|
style: { minWidth: "190px", marginBottom: "8px" },
|
|
612
623
|
label: /* @__PURE__ */ n("div", { className: "px-2 bg-white dark:bg-black-800", children: /* @__PURE__ */ n(
|
|
613
|
-
|
|
624
|
+
Kt,
|
|
614
625
|
{
|
|
615
626
|
id: "search-bar-more-tabs",
|
|
616
|
-
value:
|
|
627
|
+
value: ue,
|
|
617
628
|
classValues: "!rounded-lg",
|
|
618
|
-
onChange: (e) =>
|
|
629
|
+
onChange: (e) => xt(e)
|
|
619
630
|
}
|
|
620
631
|
) })
|
|
621
632
|
},
|
|
622
|
-
...a.slice(
|
|
623
|
-
({ name: e }) => typeof e == "string" && (e ?? "").toLowerCase().includes(
|
|
624
|
-
).map(({ name: e, is_hidden: t }) =>
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
633
|
+
...a.slice(ee).filter((e) => e.name !== r).concat(L).filter(
|
|
634
|
+
({ name: e }) => typeof e == "string" && (e ?? "").toLowerCase().includes(ue.toLowerCase())
|
|
635
|
+
).map(({ name: e, is_hidden: t }) => {
|
|
636
|
+
const o = C(e), s = t || o;
|
|
637
|
+
return {
|
|
638
|
+
key: e,
|
|
639
|
+
label: /* @__PURE__ */ n(
|
|
640
|
+
y,
|
|
641
|
+
{
|
|
642
|
+
className: l(
|
|
643
|
+
"uppercase",
|
|
644
|
+
s ? "text-neutral-400 dark:text-neutral-500" : "text-black-900 dark:text-black-200"
|
|
645
|
+
),
|
|
646
|
+
text: e,
|
|
647
|
+
suffixRecord: k ? p : {},
|
|
648
|
+
highlight: ue,
|
|
649
|
+
truncateText: !0,
|
|
650
|
+
isDisabled: s,
|
|
651
|
+
onClick: s ? void 0 : () => {
|
|
652
|
+
j(e), q(!1);
|
|
653
|
+
}
|
|
640
654
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
})
|
|
655
|
+
),
|
|
656
|
+
popupClassName: ie,
|
|
657
|
+
children: _ ? ge(e, t, !0) : null
|
|
658
|
+
};
|
|
659
|
+
})
|
|
646
660
|
],
|
|
647
|
-
className:
|
|
661
|
+
className: ie
|
|
648
662
|
},
|
|
649
663
|
openClassName: "max-h-[350px] overflow-y-auto",
|
|
650
664
|
trigger: ["click"],
|
|
@@ -652,16 +666,16 @@ const Ie = (T) => {
|
|
|
652
666
|
placement: "bottomRight",
|
|
653
667
|
getPopupContainer: (e) => e.parentElement,
|
|
654
668
|
children: /* @__PURE__ */ n(
|
|
655
|
-
|
|
669
|
+
mn,
|
|
656
670
|
{
|
|
657
|
-
title: `${k ?
|
|
671
|
+
title: `${k ? Ae : ""} MORE...`,
|
|
658
672
|
variant: T,
|
|
659
|
-
size:
|
|
660
|
-
draggingOver:
|
|
673
|
+
size: E,
|
|
674
|
+
draggingOver: kt,
|
|
661
675
|
suffixRecord: p,
|
|
662
|
-
handleShowMoreDropdown:
|
|
663
|
-
selectedId:
|
|
664
|
-
showMoreDropdown:
|
|
676
|
+
handleShowMoreDropdown: qe,
|
|
677
|
+
selectedId: F,
|
|
678
|
+
showMoreDropdown: _
|
|
665
679
|
}
|
|
666
680
|
)
|
|
667
681
|
}
|
|
@@ -670,23 +684,23 @@ const Ie = (T) => {
|
|
|
670
684
|
}
|
|
671
685
|
),
|
|
672
686
|
H ? /* @__PURE__ */ n("div", { className: l(H?.className), children: /* @__PURE__ */ n("li", { children: H.component }) }) : null,
|
|
673
|
-
|
|
687
|
+
D && bt && /* @__PURE__ */ n(
|
|
674
688
|
"li",
|
|
675
689
|
{
|
|
676
690
|
className: l(
|
|
677
|
-
|
|
691
|
+
yt ? "opacity-100" : "opacity-0",
|
|
678
692
|
"transition-opacity duration-300"
|
|
679
693
|
),
|
|
680
694
|
children: /* @__PURE__ */ n(
|
|
681
|
-
|
|
695
|
+
pn,
|
|
682
696
|
{
|
|
683
697
|
hasSuffixRecord: !!(p && Object.keys(p).length > 0),
|
|
684
|
-
savedConfig:
|
|
685
|
-
onApplyFilter: (e) =>
|
|
698
|
+
savedConfig: We,
|
|
699
|
+
onApplyFilter: (e) => It(e),
|
|
686
700
|
setUnsavedChanges: () => {
|
|
687
701
|
},
|
|
688
|
-
handleTabSort:
|
|
689
|
-
onSearchChange:
|
|
702
|
+
handleTabSort: Ut,
|
|
703
|
+
onSearchChange: Ht
|
|
690
704
|
}
|
|
691
705
|
)
|
|
692
706
|
}
|
|
@@ -694,15 +708,15 @@ const Ie = (T) => {
|
|
|
694
708
|
]
|
|
695
709
|
}
|
|
696
710
|
),
|
|
697
|
-
|
|
698
|
-
|
|
711
|
+
V ? /* @__PURE__ */ n(
|
|
712
|
+
fn,
|
|
699
713
|
{
|
|
700
|
-
draggingTab:
|
|
714
|
+
draggingTab: V,
|
|
701
715
|
suffixRecord: p,
|
|
702
|
-
size:
|
|
716
|
+
size: E,
|
|
703
717
|
variant: T,
|
|
704
|
-
selectedId:
|
|
705
|
-
parentContainer:
|
|
718
|
+
selectedId: F,
|
|
719
|
+
parentContainer: ht
|
|
706
720
|
}
|
|
707
721
|
) : null
|
|
708
722
|
]
|
|
@@ -712,6 +726,6 @@ const Ie = (T) => {
|
|
|
712
726
|
);
|
|
713
727
|
};
|
|
714
728
|
export {
|
|
715
|
-
|
|
729
|
+
jn as Tabs
|
|
716
730
|
};
|
|
717
731
|
//# sourceMappingURL=Tabs.es.js.map
|