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