@origen-ui/tabs 3.0.7 → 3.0.9
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/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +728 -629
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
import { OG_TABS_LOCALE_EN_US as e, OG_TABS_LOCALE_ZH_CN as t, OG_TABS_LOCALE_ZH_TW as n } from "./locale.mjs";
|
|
2
2
|
import { n as r, t as i } from "./config-MtK7PAXS.js";
|
|
3
|
-
import { Fragment as a, Teleport as o, cloneVNode as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeProps as v, nextTick as y, normalizeClass as b, normalizeProps as x, normalizeStyle as S, onBeforeUnmount as C, onMounted as w, openBlock as T, ref as E, renderList as ee, renderSlot as D, resolveDynamicComponent as
|
|
4
|
-
import { ElEmpty as
|
|
5
|
-
import { filterComponentProps as
|
|
6
|
-
import { Bottom as
|
|
3
|
+
import { Fragment as a, Teleport as o, cloneVNode as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeProps as v, nextTick as y, normalizeClass as b, normalizeProps as x, normalizeStyle as S, onBeforeUnmount as C, onMounted as w, openBlock as T, ref as E, renderList as ee, renderSlot as D, resolveDynamicComponent as te, shallowRef as O, toDisplayString as k, unref as A, useAttrs as ne, useId as re, useSlots as ie, useTemplateRef as ae, vModelText as oe, watch as se, withCtx as j, withDirectives as ce, withModifiers as le } from "vue";
|
|
4
|
+
import { ElEmpty as ue, ElIcon as de, ElPopover as fe, ElTabPane as pe, ElTabs as me } from "element-plus";
|
|
5
|
+
import { filterComponentProps as he, mergeLocale as ge } from "@origen-ui/shared";
|
|
6
|
+
import { Bottom as _e, CircleCheckFilled as ve, CircleCloseFilled as ye, Close as be, CollectionTag as xe, MoreFilled as Se, Refresh as Ce, Search as we, Top as Te, WarningFilled as Ee } from "@element-plus/icons-vue";
|
|
7
7
|
// src/tabKey.ts
|
|
8
|
+
function M(e) {
|
|
9
|
+
if (typeof e == "number") {
|
|
10
|
+
if (!Number.isFinite(e)) throw TypeError("[OgTabs] Tab keys must be finite numbers.");
|
|
11
|
+
} else {
|
|
12
|
+
if (typeof e != "string") throw TypeError("[OgTabs] Tab keys must be strings or finite numbers.");
|
|
13
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
14
|
+
let n = e.charCodeAt(t);
|
|
15
|
+
if (n >= 55296 && n <= 56319) {
|
|
16
|
+
let n = e.charCodeAt(t + 1);
|
|
17
|
+
if (!Number.isFinite(n) || n < 56320 || n > 57343) throw TypeError("[OgTabs] Tab keys must not contain unpaired surrogates.");
|
|
18
|
+
t += 1;
|
|
19
|
+
} else if (n >= 56320 && n <= 57343) throw TypeError("[OgTabs] Tab keys must not contain unpaired surrogates.");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function De(e) {
|
|
24
|
+
for (let t of e) M(t.key);
|
|
25
|
+
}
|
|
8
26
|
function N(e) {
|
|
9
|
-
return `${typeof e == "number" ? "n" : "s"}:${encodeURIComponent(String(e))}`;
|
|
27
|
+
return M(e), `${typeof e == "number" ? "n" : "s"}:${encodeURIComponent(String(e))}`;
|
|
10
28
|
}
|
|
11
29
|
// src/tabStateRevision.ts
|
|
12
|
-
function
|
|
13
|
-
return JSON.stringify([t, e.map((e) => [
|
|
30
|
+
function Oe(e, t) {
|
|
31
|
+
return De(e), t !== void 0 && M(t), JSON.stringify([t, e.map((e) => [
|
|
14
32
|
e.key,
|
|
15
33
|
e.label,
|
|
16
34
|
e.badge,
|
|
@@ -27,7 +45,7 @@ function Ee(e, t) {
|
|
|
27
45
|
])]);
|
|
28
46
|
}
|
|
29
47
|
// src/composables/useOgTabsActionBridge.ts
|
|
30
|
-
function
|
|
48
|
+
function ke(e) {
|
|
31
49
|
async function t(t) {
|
|
32
50
|
let n = r();
|
|
33
51
|
e.emit.actionRequest(t);
|
|
@@ -48,7 +66,7 @@ function De(e) {
|
|
|
48
66
|
"move-bottom": "reorderRequest"
|
|
49
67
|
};
|
|
50
68
|
function r() {
|
|
51
|
-
return
|
|
69
|
+
return Oe(e.tabs.value, e.activeKey.value);
|
|
52
70
|
}
|
|
53
71
|
async function i(t) {
|
|
54
72
|
let n = e.props.ogActionHandler;
|
|
@@ -77,82 +95,124 @@ function De(e) {
|
|
|
77
95
|
function P(e, t) {
|
|
78
96
|
return e.find((e) => e.key === t);
|
|
79
97
|
}
|
|
80
|
-
function
|
|
98
|
+
function Ae(e) {
|
|
81
99
|
return [...e.filter((e) => e.pinned), ...e.filter((e) => !e.pinned)];
|
|
82
100
|
}
|
|
83
|
-
function
|
|
84
|
-
let n = t?.trim().toLocaleLowerCase();
|
|
85
|
-
return Oe(n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n)) : e);
|
|
86
|
-
}
|
|
87
|
-
function Ae(e) {
|
|
101
|
+
function je(e) {
|
|
88
102
|
return !(!e || e.disabled || e.readonly || e.pinned || e.closable === !1);
|
|
89
103
|
}
|
|
90
|
-
function
|
|
104
|
+
function Me(e) {
|
|
91
105
|
return !(!e || e.disabled || e.readonly || e.pinnable === !1);
|
|
92
106
|
}
|
|
93
|
-
function
|
|
107
|
+
function Ne(e) {
|
|
94
108
|
return !(!e || e.disabled || e.readonly || e.pinned || e.draggable === !1);
|
|
95
109
|
}
|
|
96
|
-
function
|
|
110
|
+
function Pe(e, t) {
|
|
111
|
+
De(e), t !== void 0 && M(t);
|
|
112
|
+
}
|
|
113
|
+
function Fe(e, t) {
|
|
114
|
+
return Pe(e, t), P(e, t);
|
|
115
|
+
}
|
|
116
|
+
function Ie(e) {
|
|
117
|
+
return De(e), Ae(e);
|
|
118
|
+
}
|
|
119
|
+
function Le(e, t) {
|
|
120
|
+
return De(e), Re(e, t);
|
|
121
|
+
}
|
|
122
|
+
function Re(e, t) {
|
|
123
|
+
let n = t?.trim().toLocaleLowerCase();
|
|
124
|
+
return Ae(n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n)) : e);
|
|
125
|
+
}
|
|
126
|
+
function ze(e) {
|
|
127
|
+
return e && M(e.key), je(e);
|
|
128
|
+
}
|
|
129
|
+
function Be(e) {
|
|
130
|
+
return e && M(e.key), Me(e);
|
|
131
|
+
}
|
|
132
|
+
function Ve(e) {
|
|
133
|
+
return e && M(e.key), Ne(e);
|
|
134
|
+
}
|
|
135
|
+
function He(e, t, n) {
|
|
136
|
+
return Pe(e, t), Ue(e, t, n);
|
|
137
|
+
}
|
|
138
|
+
function Ue(e, t, n) {
|
|
97
139
|
let r = P(e, t);
|
|
98
140
|
if (!r || r.pinned === n) return [...e];
|
|
99
|
-
let i =
|
|
141
|
+
let i = Ae(e.filter((e) => e.key !== t)), a = {
|
|
100
142
|
...r,
|
|
101
143
|
pinned: n
|
|
102
144
|
}, o = n ? i.filter((e) => e.pinned).length : i.findIndex((e) => !e.pinned);
|
|
103
145
|
return i.splice(o < 0 ? i.length : o, 0, a), i;
|
|
104
146
|
}
|
|
105
|
-
function
|
|
147
|
+
function We(e, t) {
|
|
148
|
+
De(e);
|
|
149
|
+
for (let e of t) M(e);
|
|
150
|
+
return Ge(e, t);
|
|
151
|
+
}
|
|
152
|
+
function Ge(e, t) {
|
|
106
153
|
return e.filter((e) => !t.has(e.key));
|
|
107
154
|
}
|
|
108
|
-
function
|
|
109
|
-
|
|
155
|
+
function Ke(e, t, n) {
|
|
156
|
+
return Pe(e, t), qe(e, t, n);
|
|
157
|
+
}
|
|
158
|
+
function qe(e, t, n) {
|
|
159
|
+
return Je(e, t, n).filter(je);
|
|
160
|
+
}
|
|
161
|
+
function Je(e, t, n) {
|
|
162
|
+
if (n === "all") return e;
|
|
110
163
|
let r = e.findIndex((e) => e.key === t);
|
|
111
|
-
|
|
112
|
-
if (n === "current") {
|
|
113
|
-
let t = e[r];
|
|
114
|
-
return t && Ae(t) ? [t] : [];
|
|
115
|
-
}
|
|
116
|
-
return n === "others" ? e.filter((e) => e.key !== t && Ae(e)) : (n === "left" ? e.slice(0, r) : e.slice(r + 1)).filter(Ae);
|
|
164
|
+
return r < 0 ? [] : n === "current" ? e[r] ? [e[r]] : [] : n === "others" ? e.filter((e) => e.key !== t) : n === "left" ? e.slice(0, r) : e.slice(r + 1);
|
|
117
165
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
166
|
+
function Ye(e, t, n) {
|
|
167
|
+
return Pe(e, n), De(t), Xe(e, t, n);
|
|
168
|
+
}
|
|
169
|
+
function Xe(e, t, n) {
|
|
170
|
+
let r = /* @__PURE__ */ new Set();
|
|
171
|
+
for (let e of t) e.disabled || r.add(e.key);
|
|
172
|
+
let i = e.findIndex((e) => e.key === n), a = (e) => e !== void 0 && r.has(e);
|
|
173
|
+
for (let t = i + 1; t < e.length; t += 1) {
|
|
121
174
|
let n = e[t];
|
|
122
|
-
if (n &&
|
|
175
|
+
if (n && a(n.key)) return n.key;
|
|
123
176
|
}
|
|
124
|
-
for (let t =
|
|
177
|
+
for (let t = i - 1; t >= 0; --t) {
|
|
125
178
|
let n = e[t];
|
|
126
|
-
if (n &&
|
|
179
|
+
if (n && a(n.key)) return n.key;
|
|
127
180
|
}
|
|
128
|
-
let
|
|
129
|
-
if (
|
|
181
|
+
let o = t.find((e) => !e.disabled);
|
|
182
|
+
if (o) return o.key;
|
|
183
|
+
}
|
|
184
|
+
function Ze(e, t, n) {
|
|
185
|
+
return Pe(e, t), M(n), Qe(e, t, n);
|
|
130
186
|
}
|
|
131
|
-
function
|
|
132
|
-
let r =
|
|
133
|
-
if (!i || !a || i.key === a.key || !
|
|
187
|
+
function Qe(e, t, n) {
|
|
188
|
+
let r = Ae(e), i = P(r, t), a = P(r, n);
|
|
189
|
+
if (!i || !a || i.key === a.key || !Ne(i) || !Ne(a)) return [...e];
|
|
134
190
|
let o = r.filter((e) => e.key !== t);
|
|
135
191
|
return o.splice(o.findIndex((e) => e.key === n), 0, i), o;
|
|
136
192
|
}
|
|
137
|
-
function
|
|
138
|
-
|
|
139
|
-
|
|
193
|
+
function $e(e, t, n) {
|
|
194
|
+
return Pe(e, t), et(e, t, n);
|
|
195
|
+
}
|
|
196
|
+
function et(e, t, n) {
|
|
197
|
+
let r = Ae(e), i = P(r, t);
|
|
198
|
+
if (!i || !Ne(i)) return [...e];
|
|
140
199
|
let a = r.filter((e) => e.key !== t), o = a.findIndex((e) => !e.pinned), s = n === "top" ? o : a.length;
|
|
141
200
|
return a.splice(s < 0 ? a.length : s, 0, i), a;
|
|
142
201
|
}
|
|
143
|
-
function
|
|
202
|
+
function tt(e) {
|
|
144
203
|
return e === "current" ? "close" : `close-${e}`;
|
|
145
204
|
}
|
|
146
|
-
function
|
|
205
|
+
function nt(e) {
|
|
206
|
+
De(e);
|
|
147
207
|
let t = /* @__PURE__ */ new Set();
|
|
148
208
|
return e.some((e) => t.has(e.key) ? !0 : (t.add(e.key), !1));
|
|
149
209
|
}
|
|
150
210
|
// src/tabActionExecutor.ts
|
|
151
|
-
function
|
|
211
|
+
function rt(e) {
|
|
152
212
|
let t = !1;
|
|
153
213
|
async function n(n) {
|
|
154
214
|
let r;
|
|
155
|
-
if (r = t ? "busy" : e.getDeniedReason(n.operation, n.tab), r) return e.onDenied(n.operation, n.tab, r), !1;
|
|
215
|
+
if (r = t ? "busy" : e.getDeniedReason(n.operation, n.tab, n.targets), r) return e.onDenied(n.operation, n.tab, r), !1;
|
|
156
216
|
t = !0, e.onPendingChange?.(!0);
|
|
157
217
|
try {
|
|
158
218
|
if (await e.beforeAction?.(n) === !1 || e.getRevision && n.revision !== void 0 && e.getRevision() !== n.revision) return !1;
|
|
@@ -170,7 +230,7 @@ function Ve(e) {
|
|
|
170
230
|
};
|
|
171
231
|
}
|
|
172
232
|
// src/tabCommandPlanner.ts
|
|
173
|
-
function
|
|
233
|
+
function it(e, t, n, r = {}) {
|
|
174
234
|
return {
|
|
175
235
|
operation: t,
|
|
176
236
|
source: e.source,
|
|
@@ -182,83 +242,83 @@ function He(e, t, n, r = {}) {
|
|
|
182
242
|
...r
|
|
183
243
|
};
|
|
184
244
|
}
|
|
185
|
-
function
|
|
245
|
+
function at(e, t) {
|
|
186
246
|
let n = P(e.items, t);
|
|
187
|
-
if (!
|
|
247
|
+
if (!je(n)) return {
|
|
188
248
|
operation: "close",
|
|
189
249
|
tab: n
|
|
190
250
|
};
|
|
191
|
-
let r =
|
|
192
|
-
return
|
|
251
|
+
let r = Ge(e.items, /* @__PURE__ */ new Set([t])), i = t === e.activeKey ? Xe(Ae(e.items), r, t) : e.activeKey;
|
|
252
|
+
return it(e, "close", n, {
|
|
193
253
|
targets: [n],
|
|
194
254
|
nextItems: r,
|
|
195
255
|
nextActiveKey: i
|
|
196
256
|
});
|
|
197
257
|
}
|
|
198
|
-
function
|
|
199
|
-
let r =
|
|
258
|
+
function ot(e, t, n) {
|
|
259
|
+
let r = Ae(e.items), i = qe(r, n, t);
|
|
200
260
|
if (!i.length) return {
|
|
201
|
-
operation:
|
|
261
|
+
operation: tt(t),
|
|
202
262
|
tab: P(e.items, n)
|
|
203
263
|
};
|
|
204
|
-
let a = new Set(i.map((e) => e.key)), o =
|
|
205
|
-
return t === "current" && (c = i[0]),
|
|
264
|
+
let a = new Set(i.map((e) => e.key)), o = Ge(e.items, a), s = e.activeKey !== void 0 && a.has(e.activeKey) ? Xe(r, o, e.activeKey) : e.activeKey, c = P(e.items, n);
|
|
265
|
+
return t === "current" && (c = i[0]), it(e, tt(t), c, {
|
|
206
266
|
targets: i,
|
|
207
267
|
nextItems: o,
|
|
208
268
|
nextActiveKey: s
|
|
209
269
|
});
|
|
210
270
|
}
|
|
211
|
-
function
|
|
271
|
+
function st(e, t, n) {
|
|
212
272
|
let r = P(e.items, t), i = n ? "pin" : "unpin";
|
|
213
|
-
return !r || !
|
|
273
|
+
return !r || !Me(r) || r.pinned === n ? {
|
|
214
274
|
operation: i,
|
|
215
275
|
tab: r
|
|
216
|
-
} :
|
|
276
|
+
} : it(e, i, r, { nextItems: Ue(e.items, t, n) });
|
|
217
277
|
}
|
|
218
|
-
function
|
|
219
|
-
let r = P(e.items, t), i = P(e.items, n), a =
|
|
278
|
+
function ct(e, t, n) {
|
|
279
|
+
let r = P(e.items, t), i = P(e.items, n), a = Qe(e.items, t, n);
|
|
220
280
|
return !r || !i || a.every((t, n) => t.key === e.items[n]?.key) ? {
|
|
221
281
|
operation: "move",
|
|
222
282
|
tab: r
|
|
223
|
-
} :
|
|
283
|
+
} : it(e, "move", r, {
|
|
224
284
|
nextItems: a,
|
|
225
285
|
targetTab: i
|
|
226
286
|
});
|
|
227
287
|
}
|
|
228
|
-
function
|
|
229
|
-
let r = P(e.items, t), i = n === void 0 ?
|
|
288
|
+
function lt(e, t, n) {
|
|
289
|
+
let r = P(e.items, t), i = n === void 0 ? et(e.items, t, "bottom") : Qe(e.items, t, n);
|
|
230
290
|
if (!r || i.every((t, n) => t.key === e.items[n]?.key)) return {
|
|
231
291
|
operation: "move",
|
|
232
292
|
tab: r
|
|
233
293
|
};
|
|
234
294
|
let a;
|
|
235
|
-
return n !== void 0 && (a = P(e.items, n)),
|
|
295
|
+
return n !== void 0 && (a = P(e.items, n)), it(e, "move", r, {
|
|
236
296
|
nextItems: i,
|
|
237
297
|
targetTab: a
|
|
238
298
|
});
|
|
239
299
|
}
|
|
240
|
-
function
|
|
300
|
+
function ut(e, t, n) {
|
|
241
301
|
let r = P(e.items, t), i = "move-bottom";
|
|
242
302
|
n === "top" && (i = "move-top");
|
|
243
|
-
let a =
|
|
303
|
+
let a = et(e.items, t, n);
|
|
244
304
|
return !r || a.every((t, n) => t.key === e.items[n]?.key) ? {
|
|
245
305
|
operation: i,
|
|
246
306
|
tab: r
|
|
247
|
-
} :
|
|
307
|
+
} : it(e, i, r, { nextItems: a });
|
|
248
308
|
}
|
|
249
|
-
function
|
|
309
|
+
function dt(e, t) {
|
|
250
310
|
let n = P(e.items, t);
|
|
251
|
-
return n ?
|
|
311
|
+
return n ? it(e, "refresh", n) : {
|
|
252
312
|
operation: "refresh",
|
|
253
313
|
tab: n
|
|
254
314
|
};
|
|
255
315
|
}
|
|
256
|
-
function
|
|
316
|
+
function ft(e) {
|
|
257
317
|
return !("source" in e);
|
|
258
318
|
}
|
|
259
319
|
// src/tabControllerCommands.ts
|
|
260
|
-
function
|
|
261
|
-
let n = e.getRevision ?? (() =>
|
|
320
|
+
function pt(e, t) {
|
|
321
|
+
let n = e.getRevision ?? (() => Oe(e.getItems(), e.getActiveKey())), r = rt({
|
|
262
322
|
getRevision: n,
|
|
263
323
|
getDeniedReason: e.getDeniedReason,
|
|
264
324
|
beforeAction: (t) => e.getProps().ogBeforeAction?.(t),
|
|
@@ -275,7 +335,7 @@ function Ze(e, t) {
|
|
|
275
335
|
revision: n(),
|
|
276
336
|
tab: i,
|
|
277
337
|
activeKey: s,
|
|
278
|
-
activeTab:
|
|
338
|
+
activeTab: Fe(o, s),
|
|
279
339
|
items: o,
|
|
280
340
|
...a
|
|
281
341
|
};
|
|
@@ -284,160 +344,189 @@ function Ze(e, t) {
|
|
|
284
344
|
return r.isPending() ? (e.onDenied(t, n, "busy"), !0) : !1;
|
|
285
345
|
}
|
|
286
346
|
function o(e) {
|
|
287
|
-
return r.execute(e);
|
|
347
|
+
return s(e), r.execute(e);
|
|
288
348
|
}
|
|
289
|
-
function s(
|
|
290
|
-
|
|
349
|
+
function s(e) {
|
|
350
|
+
De(e.items), e.nextItems && De(e.nextItems), e.targets && De(e.targets), e.activeKey !== void 0 && M(e.activeKey), e.nextActiveKey !== void 0 && M(e.nextActiveKey), e.tab && M(e.tab.key), e.activeTab && M(e.activeTab.key), e.targetTab && M(e.targetTab.key);
|
|
351
|
+
}
|
|
352
|
+
function c(t, n = "api") {
|
|
353
|
+
let r = Fe(e.getItems(), t);
|
|
291
354
|
return a("activate", r) ? Promise.resolve(!1) : !r || r.disabled ? (e.onDenied("activate", r, r ? "disabled" : "not-found"), Promise.resolve(!1)) : t === e.getActiveKey() ? Promise.resolve(!0) : o(i("activate", n, r, { nextActiveKey: t }));
|
|
292
355
|
}
|
|
293
|
-
function
|
|
356
|
+
function l(e = "api") {
|
|
294
357
|
return o(i("add", e, void 0));
|
|
295
358
|
}
|
|
296
|
-
function
|
|
297
|
-
let i = e.getItems(), s =
|
|
359
|
+
function u(t, r = "api") {
|
|
360
|
+
let i = e.getItems(), s = Fe(i, t);
|
|
298
361
|
if (a("close", s)) return Promise.resolve(!1);
|
|
299
362
|
if (!s || s.disabled || s.readonly || s.pinned || s.closable === !1) {
|
|
300
|
-
let t = s ? s.pinned ? "pinned" : "readonly" : "not-found";
|
|
363
|
+
let t = s ? s.disabled ? "disabled" : s.pinned ? "pinned" : "readonly" : "not-found";
|
|
301
364
|
return e.onDenied("close", s, t), Promise.resolve(!1);
|
|
302
365
|
}
|
|
303
|
-
let c =
|
|
366
|
+
let c = at({
|
|
304
367
|
activeKey: e.getActiveKey(),
|
|
305
368
|
items: i,
|
|
306
369
|
source: r,
|
|
307
370
|
revision: n()
|
|
308
371
|
}, t);
|
|
309
|
-
return
|
|
372
|
+
return ft(c) ? Promise.resolve(!1) : o(c);
|
|
310
373
|
}
|
|
311
|
-
function
|
|
312
|
-
let s = e.getItems(), c =
|
|
313
|
-
if (a(c,
|
|
314
|
-
|
|
374
|
+
function d(t, r, i = "api") {
|
|
375
|
+
let s = e.getItems(), c = tt(t), l = Fe(s, r);
|
|
376
|
+
if (a(c, l)) return Promise.resolve(!1);
|
|
377
|
+
if (t !== "all" && !l) return e.onDenied(c, void 0, "not-found"), Promise.resolve(!1);
|
|
378
|
+
let u = ot({
|
|
315
379
|
activeKey: e.getActiveKey(),
|
|
316
380
|
items: s,
|
|
317
381
|
source: i,
|
|
318
382
|
revision: n()
|
|
319
383
|
}, t, r);
|
|
320
|
-
|
|
384
|
+
if (ft(u)) {
|
|
385
|
+
let n = Je(Ae(s), r, t).some((e) => e.disabled) ? "disabled" : "boundary";
|
|
386
|
+
return e.onDenied(c, u.tab, n), Promise.resolve(!1);
|
|
387
|
+
}
|
|
388
|
+
return o(u);
|
|
321
389
|
}
|
|
322
|
-
function
|
|
323
|
-
let s = e.getItems(), c =
|
|
390
|
+
function f(t, r, i = "api") {
|
|
391
|
+
let s = e.getItems(), c = Fe(s, t), l = r ? "pin" : "unpin";
|
|
324
392
|
if (a(l, c)) return Promise.resolve(!1);
|
|
325
|
-
let u =
|
|
393
|
+
let u = st({
|
|
326
394
|
activeKey: e.getActiveKey(),
|
|
327
395
|
items: s,
|
|
328
396
|
source: i,
|
|
329
397
|
revision: n()
|
|
330
398
|
}, t, r);
|
|
331
|
-
if (
|
|
332
|
-
let t = c ? c.pinned === r ? "boundary" : "readonly" : "not-found";
|
|
399
|
+
if (ft(u)) {
|
|
400
|
+
let t = c ? c.disabled ? "disabled" : c.pinned === r ? "boundary" : "readonly" : "not-found";
|
|
333
401
|
return e.onDenied(l, c, t), Promise.resolve(!1);
|
|
334
402
|
}
|
|
335
403
|
return o(u);
|
|
336
404
|
}
|
|
337
|
-
function
|
|
338
|
-
|
|
405
|
+
function p(t, r, i = "api") {
|
|
406
|
+
M(r);
|
|
407
|
+
let s = e.getItems(), c = Fe(s, t), l = P(s, r);
|
|
339
408
|
if (a("move", c)) return Promise.resolve(!1);
|
|
340
|
-
let
|
|
409
|
+
let u = ct({
|
|
341
410
|
activeKey: e.getActiveKey(),
|
|
342
411
|
items: s,
|
|
343
412
|
source: i,
|
|
344
413
|
revision: n()
|
|
345
414
|
}, t, r);
|
|
346
|
-
|
|
415
|
+
if (ft(u)) {
|
|
416
|
+
let t = c ? c.disabled || l?.disabled ? "disabled" : "boundary" : "not-found";
|
|
417
|
+
return e.onDenied("move", c, t), Promise.resolve(!1);
|
|
418
|
+
}
|
|
419
|
+
return o(u);
|
|
347
420
|
}
|
|
348
|
-
function
|
|
349
|
-
|
|
421
|
+
function m(t, r, i = "api") {
|
|
422
|
+
r !== void 0 && M(r);
|
|
423
|
+
let s = e.getItems(), c = Fe(s, t), l = r === void 0 ? void 0 : P(s, r);
|
|
350
424
|
if (a("move", c)) return Promise.resolve(!1);
|
|
351
|
-
let
|
|
425
|
+
let u = lt({
|
|
352
426
|
activeKey: e.getActiveKey(),
|
|
353
427
|
items: s,
|
|
354
428
|
source: i,
|
|
355
429
|
revision: n()
|
|
356
430
|
}, t, r);
|
|
357
|
-
|
|
431
|
+
if (ft(u)) {
|
|
432
|
+
let t = c ? c.disabled || l?.disabled ? "disabled" : "boundary" : "not-found";
|
|
433
|
+
return e.onDenied("move", c, t), Promise.resolve(!1);
|
|
434
|
+
}
|
|
435
|
+
return o(u);
|
|
358
436
|
}
|
|
359
|
-
function
|
|
360
|
-
let s = e.getItems(), c =
|
|
437
|
+
function h(t, r, i = "api") {
|
|
438
|
+
let s = e.getItems(), c = Fe(s, t), l = r === "top" ? "move-top" : "move-bottom";
|
|
361
439
|
if (a(l, c)) return Promise.resolve(!1);
|
|
362
|
-
let u =
|
|
440
|
+
let u = ut({
|
|
363
441
|
activeKey: e.getActiveKey(),
|
|
364
442
|
items: s,
|
|
365
443
|
source: i,
|
|
366
444
|
revision: n()
|
|
367
445
|
}, t, r);
|
|
368
|
-
|
|
446
|
+
if (ft(u)) {
|
|
447
|
+
let t = c ? c.disabled ? "disabled" : "boundary" : "not-found";
|
|
448
|
+
return e.onDenied(l, c, t), Promise.resolve(!1);
|
|
449
|
+
}
|
|
450
|
+
return o(u);
|
|
369
451
|
}
|
|
370
|
-
function
|
|
371
|
-
let i = e.getItems(), s =
|
|
452
|
+
function g(t, r = "api") {
|
|
453
|
+
let i = e.getItems(), s = Fe(i, t), c = dt({
|
|
372
454
|
activeKey: e.getActiveKey(),
|
|
373
455
|
items: i,
|
|
374
456
|
source: r,
|
|
375
457
|
revision: n()
|
|
376
458
|
}, t);
|
|
377
|
-
return a("refresh", s
|
|
459
|
+
return a("refresh", s) ? Promise.resolve(!1) : ft(c) ? (e.onDenied("refresh", c.tab, "not-found"), Promise.resolve(!1)) : o(c);
|
|
378
460
|
}
|
|
379
461
|
return {
|
|
380
462
|
dispatch: o,
|
|
381
|
-
activate:
|
|
382
|
-
close:
|
|
383
|
-
closeScope: (t, n = "api") =>
|
|
384
|
-
closeScopeAt:
|
|
385
|
-
refreshAt:
|
|
386
|
-
pin: (e, t = "api") =>
|
|
387
|
-
unpin: (e, t = "api") =>
|
|
388
|
-
move:
|
|
389
|
-
moveBefore:
|
|
390
|
-
moveTop: (e, t = "api") =>
|
|
391
|
-
moveBottom: (e, t = "api") =>
|
|
463
|
+
activate: c,
|
|
464
|
+
close: u,
|
|
465
|
+
closeScope: (t, n = "api") => d(t, e.getActiveKey(), n),
|
|
466
|
+
closeScopeAt: d,
|
|
467
|
+
refreshAt: g,
|
|
468
|
+
pin: (e, t = "api") => f(e, !0, t),
|
|
469
|
+
unpin: (e, t = "api") => f(e, !1, t),
|
|
470
|
+
move: p,
|
|
471
|
+
moveBefore: m,
|
|
472
|
+
moveTop: (e, t = "api") => h(e, "top", t),
|
|
473
|
+
moveBottom: (e, t = "api") => h(e, "bottom", t),
|
|
392
474
|
refresh: (t = "api") => {
|
|
393
475
|
let n = e.getActiveKey();
|
|
394
|
-
return n === void 0 ? Promise.resolve(!1) :
|
|
476
|
+
return n === void 0 ? Promise.resolve(!1) : g(n, t);
|
|
395
477
|
},
|
|
396
|
-
requestAdd:
|
|
478
|
+
requestAdd: l
|
|
397
479
|
};
|
|
398
480
|
}
|
|
399
481
|
// src/composables/useTabsController.ts
|
|
400
|
-
function
|
|
401
|
-
let t =
|
|
482
|
+
function mt(e) {
|
|
483
|
+
let t = O(!1);
|
|
402
484
|
return {
|
|
403
485
|
pending: t,
|
|
404
|
-
...
|
|
486
|
+
...pt(e, (e) => {
|
|
405
487
|
t.value = e;
|
|
406
488
|
}),
|
|
407
|
-
scrollTo:
|
|
489
|
+
scrollTo: (t) => {
|
|
490
|
+
M(t), e.onScrollTo(t);
|
|
491
|
+
},
|
|
408
492
|
getItems: e.getItems
|
|
409
493
|
};
|
|
410
494
|
}
|
|
411
495
|
// src/composables/useOgTabsController.ts
|
|
412
|
-
function
|
|
413
|
-
let t = E(), n =
|
|
496
|
+
function ht(e) {
|
|
497
|
+
let t = E(), n = mt({
|
|
414
498
|
getItems: () => e.tabs.value,
|
|
415
499
|
getActiveKey: () => e.activeKey.value,
|
|
416
500
|
getProps: () => e.props,
|
|
417
|
-
getRevision: () =>
|
|
418
|
-
getDeniedReason: (e, t) => r(e, t),
|
|
501
|
+
getRevision: () => Oe(e.tabs.value, e.activeKey.value),
|
|
502
|
+
getDeniedReason: (e, t, n) => r(e, t, n),
|
|
419
503
|
onRequest: e.onRequest,
|
|
420
504
|
onDenied: e.emit.operationDenied,
|
|
421
505
|
onError: e.emit.operationError,
|
|
422
506
|
onScrollTo: e.scrollTo
|
|
423
507
|
});
|
|
424
|
-
function r(
|
|
508
|
+
function r(t, n, r) {
|
|
425
509
|
if (l()) return "busy";
|
|
426
|
-
if (u(
|
|
427
|
-
if (
|
|
428
|
-
if (f(
|
|
429
|
-
|
|
430
|
-
|
|
510
|
+
if (u(t)) return "policy";
|
|
511
|
+
if (t === "activate") return d(n);
|
|
512
|
+
if (f(t, n)) return "not-found";
|
|
513
|
+
if (p(t) && r !== void 0) {
|
|
514
|
+
if (e.props.ogReadonly) return "readonly";
|
|
515
|
+
for (let e of r) if (!je(e)) return e.disabled ? "disabled" : e.pinned ? "pinned" : "readonly";
|
|
516
|
+
return h(t, void 0) || (r.length ? void 0 : "boundary");
|
|
517
|
+
}
|
|
518
|
+
let i = m(n);
|
|
519
|
+
return i === void 0 ? h(t, n) : i;
|
|
431
520
|
}
|
|
432
521
|
let i = () => void 0;
|
|
433
522
|
function a(e) {
|
|
434
|
-
if (!
|
|
523
|
+
if (!je(e)) return e?.pinned ? "pinned" : "readonly";
|
|
435
524
|
}
|
|
436
525
|
function o(e) {
|
|
437
|
-
if (!
|
|
526
|
+
if (!Me(e)) return "readonly";
|
|
438
527
|
}
|
|
439
528
|
function s(e) {
|
|
440
|
-
if (!
|
|
529
|
+
if (!Ne(e)) return e?.pinned ? "pinned" : "boundary";
|
|
441
530
|
}
|
|
442
531
|
let c = {
|
|
443
532
|
add: {
|
|
@@ -505,83 +594,86 @@ function $e(e) {
|
|
|
505
594
|
function f(e, t) {
|
|
506
595
|
return t || e === "close-all" ? !1 : e !== "add";
|
|
507
596
|
}
|
|
508
|
-
function p(
|
|
597
|
+
function p(e) {
|
|
598
|
+
return e === "close-others" || e === "close-left" || e === "close-right" || e === "close-all";
|
|
599
|
+
}
|
|
600
|
+
function m(t) {
|
|
509
601
|
if (e.props.ogReadonly || t?.readonly || t?.disabled) return t?.disabled ? "disabled" : "readonly";
|
|
510
602
|
}
|
|
511
|
-
function
|
|
603
|
+
function h(t, n) {
|
|
512
604
|
let r = c[t];
|
|
513
605
|
if (r !== void 0) return e.featureEnabled(r.feature) ? r.check(n) : "policy";
|
|
514
606
|
}
|
|
515
|
-
function
|
|
607
|
+
function g(t, r) {
|
|
516
608
|
n.activate(t, r).then((n) => {
|
|
517
609
|
n && e.scrollTo(t);
|
|
518
610
|
});
|
|
519
611
|
}
|
|
520
|
-
function
|
|
521
|
-
let r = e.orderedTabs.value, i =
|
|
612
|
+
function _(n) {
|
|
613
|
+
let r = e.orderedTabs.value, i = Xe(r, r.filter((e) => e.key !== n), n);
|
|
522
614
|
i === void 0 ? t.value = void 0 : t.value = N(i);
|
|
523
615
|
}
|
|
524
|
-
function
|
|
525
|
-
|
|
616
|
+
function v(e, r) {
|
|
617
|
+
_(e), n.close(e, r).then((e) => {
|
|
526
618
|
e || (t.value = void 0);
|
|
527
619
|
});
|
|
528
620
|
}
|
|
529
|
-
function
|
|
530
|
-
let o = e.orderedTabs.value, s =
|
|
621
|
+
function b(r, i, a) {
|
|
622
|
+
let o = e.orderedTabs.value, s = qe(o, i, r), c = e.activeKey.value;
|
|
531
623
|
if (c !== void 0 && s.some((e) => e.key === c)) {
|
|
532
|
-
let e =
|
|
624
|
+
let e = Xe(o, o.filter((e) => !s.some((t) => t.key === e.key)), c);
|
|
533
625
|
e === void 0 ? t.value = void 0 : t.value = N(e);
|
|
534
626
|
}
|
|
535
627
|
n.closeScopeAt(r, i, a).then((e) => {
|
|
536
628
|
e || (t.value = void 0);
|
|
537
629
|
});
|
|
538
630
|
}
|
|
539
|
-
async function
|
|
631
|
+
async function x(t) {
|
|
540
632
|
let r = e.keyFromNativeName(t);
|
|
541
633
|
return r === void 0 || r === e.activeKey.value ? r !== void 0 : await n.activate(r, "native") ? (await y(), await y(), e.activeKey.value === r) : !1;
|
|
542
634
|
}
|
|
543
|
-
function
|
|
635
|
+
function S(t, n) {
|
|
544
636
|
e.emit.tabClick(e.publicPane(t), n);
|
|
545
637
|
}
|
|
546
|
-
function
|
|
638
|
+
function C(t) {
|
|
547
639
|
e.emit.tabChange(e.keyFromNativeName(t));
|
|
548
640
|
}
|
|
549
|
-
function
|
|
641
|
+
function w(t) {
|
|
550
642
|
let n = e.keyFromNativeName(t);
|
|
551
|
-
e.emit.tabRemove(n), n !== void 0 &&
|
|
643
|
+
e.emit.tabRemove(n), n !== void 0 && v(n, "native");
|
|
552
644
|
}
|
|
553
645
|
return {
|
|
554
|
-
activate:
|
|
555
|
-
beforeNativeLeave:
|
|
646
|
+
activate: g,
|
|
647
|
+
beforeNativeLeave: x,
|
|
556
648
|
controller: n,
|
|
557
649
|
deniedReason: r,
|
|
558
|
-
onNativeTabChange:
|
|
559
|
-
onNativeTabClick:
|
|
560
|
-
onNativeTabRemove:
|
|
650
|
+
onNativeTabChange: C,
|
|
651
|
+
onNativeTabClick: S,
|
|
652
|
+
onNativeTabRemove: w,
|
|
561
653
|
pendingFocusId: t,
|
|
562
|
-
requestClose:
|
|
563
|
-
requestCloseScope:
|
|
654
|
+
requestClose: v,
|
|
655
|
+
requestCloseScope: b
|
|
564
656
|
};
|
|
565
657
|
}
|
|
566
658
|
// ../../node_modules/.pnpm/sortablejs@1.15.7/node_modules/sortablejs/modular/sortable.esm.js
|
|
567
|
-
function
|
|
568
|
-
return (t =
|
|
659
|
+
function gt(e, t, n) {
|
|
660
|
+
return (t = Ct(t)) in e ? Object.defineProperty(e, t, {
|
|
569
661
|
value: n,
|
|
570
662
|
enumerable: !0,
|
|
571
663
|
configurable: !0,
|
|
572
664
|
writable: !0
|
|
573
665
|
}) : e[t] = n, e;
|
|
574
666
|
}
|
|
575
|
-
function
|
|
576
|
-
return
|
|
667
|
+
function _t() {
|
|
668
|
+
return _t = Object.assign ? Object.assign.bind() : function(e) {
|
|
577
669
|
for (var t = 1; t < arguments.length; t++) {
|
|
578
670
|
var n = arguments[t];
|
|
579
671
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
580
672
|
}
|
|
581
673
|
return e;
|
|
582
|
-
},
|
|
674
|
+
}, _t.apply(null, arguments);
|
|
583
675
|
}
|
|
584
|
-
function
|
|
676
|
+
function vt(e, t) {
|
|
585
677
|
var n = Object.keys(e);
|
|
586
678
|
if (Object.getOwnPropertySymbols) {
|
|
587
679
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -591,27 +683,27 @@ function nt(e, t) {
|
|
|
591
683
|
}
|
|
592
684
|
return n;
|
|
593
685
|
}
|
|
594
|
-
function
|
|
686
|
+
function yt(e) {
|
|
595
687
|
for (var t = 1; t < arguments.length; t++) {
|
|
596
688
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
597
|
-
t % 2 ?
|
|
598
|
-
|
|
599
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
689
|
+
t % 2 ? vt(Object(n), !0).forEach(function(t) {
|
|
690
|
+
gt(e, t, n[t]);
|
|
691
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : vt(Object(n)).forEach(function(t) {
|
|
600
692
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
601
693
|
});
|
|
602
694
|
}
|
|
603
695
|
return e;
|
|
604
696
|
}
|
|
605
|
-
function
|
|
697
|
+
function bt(e, t) {
|
|
606
698
|
if (e == null) return {};
|
|
607
|
-
var n, r, i =
|
|
699
|
+
var n, r, i = xt(e, t);
|
|
608
700
|
if (Object.getOwnPropertySymbols) {
|
|
609
701
|
var a = Object.getOwnPropertySymbols(e);
|
|
610
702
|
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
|
|
611
703
|
}
|
|
612
704
|
return i;
|
|
613
705
|
}
|
|
614
|
-
function
|
|
706
|
+
function xt(e, t) {
|
|
615
707
|
if (e == null) return {};
|
|
616
708
|
var n = {};
|
|
617
709
|
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
@@ -620,7 +712,7 @@ function at(e, t) {
|
|
|
620
712
|
}
|
|
621
713
|
return n;
|
|
622
714
|
}
|
|
623
|
-
function
|
|
715
|
+
function St(e, t) {
|
|
624
716
|
if (typeof e != "object" || !e) return e;
|
|
625
717
|
var n = e[Symbol.toPrimitive];
|
|
626
718
|
if (n !== void 0) {
|
|
@@ -630,33 +722,33 @@ function ot(e, t) {
|
|
|
630
722
|
}
|
|
631
723
|
return (t === "string" ? String : Number)(e);
|
|
632
724
|
}
|
|
633
|
-
function
|
|
634
|
-
var t =
|
|
725
|
+
function Ct(e) {
|
|
726
|
+
var t = St(e, "string");
|
|
635
727
|
return typeof t == "symbol" ? t : t + "";
|
|
636
728
|
}
|
|
637
|
-
function
|
|
729
|
+
function wt(e) {
|
|
638
730
|
"@babel/helpers - typeof";
|
|
639
|
-
return
|
|
731
|
+
return wt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
640
732
|
return typeof e;
|
|
641
733
|
} : function(e) {
|
|
642
734
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
643
|
-
},
|
|
735
|
+
}, wt(e);
|
|
644
736
|
}
|
|
645
|
-
var
|
|
646
|
-
function
|
|
737
|
+
var Tt = "1.15.7";
|
|
738
|
+
function Et(e) {
|
|
647
739
|
if (typeof window < "u" && window.navigator) return !!/*@__PURE__*/ navigator.userAgent.match(e);
|
|
648
740
|
}
|
|
649
|
-
var
|
|
741
|
+
var Dt = Et(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ot = Et(/Edge/i), kt = Et(/firefox/i), At = Et(/safari/i) && !Et(/chrome/i) && !Et(/android/i), jt = Et(/iP(ad|od|hone)/i), Mt = Et(/chrome/i) && Et(/android/i), Nt = {
|
|
650
742
|
capture: !1,
|
|
651
743
|
passive: !1
|
|
652
744
|
};
|
|
653
745
|
function F(e, t, n) {
|
|
654
|
-
e.addEventListener(t, n, !
|
|
746
|
+
e.addEventListener(t, n, !Dt && Nt);
|
|
655
747
|
}
|
|
656
748
|
function I(e, t, n) {
|
|
657
|
-
e.removeEventListener(t, n, !
|
|
749
|
+
e.removeEventListener(t, n, !Dt && Nt);
|
|
658
750
|
}
|
|
659
|
-
function
|
|
751
|
+
function Pt(e, t) {
|
|
660
752
|
if (t) {
|
|
661
753
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
662
754
|
if (e.matches) return e.matches(t);
|
|
@@ -668,22 +760,22 @@ function vt(e, t) {
|
|
|
668
760
|
return !1;
|
|
669
761
|
}
|
|
670
762
|
}
|
|
671
|
-
function
|
|
763
|
+
function Ft(e) {
|
|
672
764
|
return e.host && e !== document && e.host.nodeType && e.host !== e ? e.host : e.parentNode;
|
|
673
765
|
}
|
|
674
|
-
function
|
|
766
|
+
function It(e, t, n, r) {
|
|
675
767
|
if (e) {
|
|
676
768
|
n ||= document;
|
|
677
769
|
do {
|
|
678
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
770
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Pt(e, t) : Pt(e, t)) || r && e === n) return e;
|
|
679
771
|
if (e === n) break;
|
|
680
|
-
} while (e =
|
|
772
|
+
} while (e = Ft(e));
|
|
681
773
|
}
|
|
682
774
|
return null;
|
|
683
775
|
}
|
|
684
|
-
var
|
|
776
|
+
var Lt = /\s+/g;
|
|
685
777
|
function L(e, t, n) {
|
|
686
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
778
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Lt, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Lt, " "));
|
|
687
779
|
}
|
|
688
780
|
function R(e, t, n) {
|
|
689
781
|
var r = e && e.style;
|
|
@@ -692,7 +784,7 @@ function R(e, t, n) {
|
|
|
692
784
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
693
785
|
}
|
|
694
786
|
}
|
|
695
|
-
function
|
|
787
|
+
function Rt(e, t) {
|
|
696
788
|
var n = "";
|
|
697
789
|
if (typeof e == "string") n = e;
|
|
698
790
|
else do {
|
|
@@ -702,7 +794,7 @@ function St(e, t) {
|
|
|
702
794
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
703
795
|
return i && new i(n);
|
|
704
796
|
}
|
|
705
|
-
function
|
|
797
|
+
function zt(e, t, n) {
|
|
706
798
|
if (e) {
|
|
707
799
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
708
800
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -710,13 +802,13 @@ function Ct(e, t, n) {
|
|
|
710
802
|
}
|
|
711
803
|
return [];
|
|
712
804
|
}
|
|
713
|
-
function
|
|
805
|
+
function Bt() {
|
|
714
806
|
return document.scrollingElement || document.documentElement;
|
|
715
807
|
}
|
|
716
808
|
function z(e, t, n, r, i) {
|
|
717
809
|
if (e.getBoundingClientRect || e === window) {
|
|
718
810
|
var a, o, s, c, l, u, d;
|
|
719
|
-
if (e !== window && e.parentNode && e !==
|
|
811
|
+
if (e !== window && e.parentNode && e !== Bt() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Dt)) do
|
|
720
812
|
if (i && i.getBoundingClientRect && (R(i, "transform") !== "none" || n && R(i, "position") !== "static")) {
|
|
721
813
|
var f = i.getBoundingClientRect();
|
|
722
814
|
o -= f.top + parseInt(R(i, "border-top-width")), s -= f.left + parseInt(R(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -724,7 +816,7 @@ function z(e, t, n, r, i) {
|
|
|
724
816
|
}
|
|
725
817
|
while (i = i.parentNode);
|
|
726
818
|
if (r && e !== window) {
|
|
727
|
-
var p =
|
|
819
|
+
var p = Rt(i || e), m = p && p.a, h = p && p.d;
|
|
728
820
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
729
821
|
}
|
|
730
822
|
return {
|
|
@@ -737,18 +829,18 @@ function z(e, t, n, r, i) {
|
|
|
737
829
|
};
|
|
738
830
|
}
|
|
739
831
|
}
|
|
740
|
-
function
|
|
741
|
-
for (var r =
|
|
832
|
+
function Vt(e, t, n) {
|
|
833
|
+
for (var r = Kt(e, !0), i = z(e)[t]; r;) {
|
|
742
834
|
var a = z(r)[n], o = void 0;
|
|
743
835
|
if (o = n === "top" || n === "left" ? i >= a : i <= a, !o) return r;
|
|
744
|
-
if (r ===
|
|
745
|
-
r =
|
|
836
|
+
if (r === Bt()) break;
|
|
837
|
+
r = Kt(r, !1);
|
|
746
838
|
}
|
|
747
839
|
return !1;
|
|
748
840
|
}
|
|
749
|
-
function
|
|
841
|
+
function Ht(e, t, n, r) {
|
|
750
842
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
751
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
843
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && It(o[a], n.draggable, e, !1)) {
|
|
752
844
|
if (i === t) return o[a];
|
|
753
845
|
i++;
|
|
754
846
|
}
|
|
@@ -756,84 +848,84 @@ function Et(e, t, n, r) {
|
|
|
756
848
|
}
|
|
757
849
|
return null;
|
|
758
850
|
}
|
|
759
|
-
function
|
|
760
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !
|
|
851
|
+
function Ut(e, t) {
|
|
852
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !Pt(n, t));) n = n.previousElementSibling;
|
|
761
853
|
return n || null;
|
|
762
854
|
}
|
|
763
855
|
function B(e, t) {
|
|
764
856
|
var n = 0;
|
|
765
857
|
if (!e || !e.parentNode) return -1;
|
|
766
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
858
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Pt(e, t)) && n++;
|
|
767
859
|
return n;
|
|
768
860
|
}
|
|
769
|
-
function
|
|
770
|
-
var t = 0, n = 0, r =
|
|
861
|
+
function Wt(e) {
|
|
862
|
+
var t = 0, n = 0, r = Bt();
|
|
771
863
|
if (e) do {
|
|
772
|
-
var i =
|
|
864
|
+
var i = Rt(e), a = i.a, o = i.d;
|
|
773
865
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
774
866
|
} while (e !== r && (e = e.parentNode));
|
|
775
867
|
return [t, n];
|
|
776
868
|
}
|
|
777
|
-
function
|
|
869
|
+
function Gt(e, t) {
|
|
778
870
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
779
871
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
780
872
|
}
|
|
781
873
|
return -1;
|
|
782
874
|
}
|
|
783
|
-
function
|
|
784
|
-
if (!e || !e.getBoundingClientRect) return
|
|
875
|
+
function Kt(e, t) {
|
|
876
|
+
if (!e || !e.getBoundingClientRect) return Bt();
|
|
785
877
|
var n = e, r = !1;
|
|
786
878
|
do
|
|
787
879
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
788
880
|
var i = R(n);
|
|
789
881
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
790
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
882
|
+
if (!n.getBoundingClientRect || n === document.body) return Bt();
|
|
791
883
|
if (r || t) return n;
|
|
792
884
|
r = !0;
|
|
793
885
|
}
|
|
794
886
|
}
|
|
795
887
|
while (n = n.parentNode);
|
|
796
|
-
return
|
|
888
|
+
return Bt();
|
|
797
889
|
}
|
|
798
|
-
function
|
|
890
|
+
function qt(e, t) {
|
|
799
891
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
800
892
|
return e;
|
|
801
893
|
}
|
|
802
|
-
function
|
|
894
|
+
function Jt(e, t) {
|
|
803
895
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
804
896
|
}
|
|
805
|
-
var
|
|
806
|
-
function
|
|
897
|
+
var Yt;
|
|
898
|
+
function Xt(e, t) {
|
|
807
899
|
return function() {
|
|
808
|
-
if (!
|
|
900
|
+
if (!Yt) {
|
|
809
901
|
var n = arguments, r = this;
|
|
810
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
811
|
-
|
|
902
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Yt = setTimeout(function() {
|
|
903
|
+
Yt = void 0;
|
|
812
904
|
}, t);
|
|
813
905
|
}
|
|
814
906
|
};
|
|
815
907
|
}
|
|
816
|
-
function
|
|
817
|
-
clearTimeout(
|
|
908
|
+
function Zt() {
|
|
909
|
+
clearTimeout(Yt), Yt = void 0;
|
|
818
910
|
}
|
|
819
|
-
function
|
|
911
|
+
function Qt(e, t, n) {
|
|
820
912
|
e.scrollLeft += t, e.scrollTop += n;
|
|
821
913
|
}
|
|
822
|
-
function
|
|
914
|
+
function $t(e) {
|
|
823
915
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
824
916
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
825
917
|
}
|
|
826
|
-
function
|
|
918
|
+
function en(e, t, n) {
|
|
827
919
|
var r = {};
|
|
828
920
|
return Array.from(e.children).forEach(function(i) {
|
|
829
|
-
if (
|
|
921
|
+
if (It(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
830
922
|
var a = z(i);
|
|
831
923
|
r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
|
|
832
924
|
}
|
|
833
925
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
834
926
|
}
|
|
835
927
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
836
|
-
function
|
|
928
|
+
function tn() {
|
|
837
929
|
var e = [], t;
|
|
838
930
|
return {
|
|
839
931
|
captureAnimationState: function() {
|
|
@@ -843,9 +935,9 @@ function zt() {
|
|
|
843
935
|
target: t,
|
|
844
936
|
rect: z(t)
|
|
845
937
|
});
|
|
846
|
-
var n =
|
|
938
|
+
var n = yt({}, e[e.length - 1].rect);
|
|
847
939
|
if (t.thisAnimationDuration) {
|
|
848
|
-
var r =
|
|
940
|
+
var r = Rt(t, !0);
|
|
849
941
|
r && (n.top -= r.f, n.left -= r.e);
|
|
850
942
|
}
|
|
851
943
|
t.fromRect = n;
|
|
@@ -856,7 +948,7 @@ function zt() {
|
|
|
856
948
|
e.push(t);
|
|
857
949
|
},
|
|
858
950
|
removeAnimationState: function(t) {
|
|
859
|
-
e.splice(
|
|
951
|
+
e.splice(Gt(e, { target: t }), 1);
|
|
860
952
|
},
|
|
861
953
|
animateAll: function(n) {
|
|
862
954
|
var r = this;
|
|
@@ -864,8 +956,8 @@ function zt() {
|
|
|
864
956
|
else {
|
|
865
957
|
var i = !1, a = 0;
|
|
866
958
|
e.forEach(function(e) {
|
|
867
|
-
var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
868
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
959
|
+
var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Rt(n, !0);
|
|
960
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Jt(c, s) && !Jt(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = rn(u, c, l, r.options)), Jt(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
|
|
869
961
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
870
962
|
}, t), n.thisAnimationDuration = t);
|
|
871
963
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -876,26 +968,26 @@ function zt() {
|
|
|
876
968
|
animate: function(e, t, n, r) {
|
|
877
969
|
if (r) {
|
|
878
970
|
R(e, "transition", ""), R(e, "transform", "");
|
|
879
|
-
var i =
|
|
880
|
-
e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
971
|
+
var i = Rt(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
972
|
+
e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = nn(e), R(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), R(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
881
973
|
R(e, "transition", ""), R(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
882
974
|
}, r);
|
|
883
975
|
}
|
|
884
976
|
}
|
|
885
977
|
};
|
|
886
978
|
}
|
|
887
|
-
function
|
|
979
|
+
function nn(e) {
|
|
888
980
|
return e.offsetWidth;
|
|
889
981
|
}
|
|
890
|
-
function
|
|
982
|
+
function rn(e, t, n, r) {
|
|
891
983
|
return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
|
|
892
984
|
}
|
|
893
|
-
var
|
|
985
|
+
var an = [], on = { initializeByDefault: !0 }, sn = {
|
|
894
986
|
mount: function(e) {
|
|
895
|
-
for (var t in
|
|
896
|
-
|
|
987
|
+
for (var t in on) on.hasOwnProperty(t) && !(t in e) && (e[t] = on[t]);
|
|
988
|
+
an.forEach(function(t) {
|
|
897
989
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
898
|
-
}),
|
|
990
|
+
}), an.push(e);
|
|
899
991
|
},
|
|
900
992
|
pluginEvent: function(e, t, n) {
|
|
901
993
|
var r = this;
|
|
@@ -903,16 +995,16 @@ var Ht = [], Ut = { initializeByDefault: !0 }, Wt = {
|
|
|
903
995
|
r.eventCanceled = !0;
|
|
904
996
|
};
|
|
905
997
|
var i = e + "Global";
|
|
906
|
-
|
|
907
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
998
|
+
an.forEach(function(r) {
|
|
999
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](yt({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](yt({ sortable: t }, n)));
|
|
908
1000
|
});
|
|
909
1001
|
},
|
|
910
1002
|
initializePlugins: function(e, t, n, r) {
|
|
911
|
-
for (var i in
|
|
1003
|
+
for (var i in an.forEach(function(r) {
|
|
912
1004
|
var i = r.pluginName;
|
|
913
1005
|
if (e.options[i] || r.initializeByDefault) {
|
|
914
1006
|
var a = new r(e, t, e.options);
|
|
915
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
1007
|
+
a.sortable = e, a.options = e.options, e[i] = a, _t(n, a.defaults);
|
|
916
1008
|
}
|
|
917
1009
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
918
1010
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -921,56 +1013,56 @@ var Ht = [], Ut = { initializeByDefault: !0 }, Wt = {
|
|
|
921
1013
|
},
|
|
922
1014
|
getEventProperties: function(e, t) {
|
|
923
1015
|
var n = {};
|
|
924
|
-
return
|
|
925
|
-
typeof r.eventProperties == "function" &&
|
|
1016
|
+
return an.forEach(function(r) {
|
|
1017
|
+
typeof r.eventProperties == "function" && _t(n, r.eventProperties.call(t[r.pluginName], e));
|
|
926
1018
|
}), n;
|
|
927
1019
|
},
|
|
928
1020
|
modifyOption: function(e, t, n) {
|
|
929
1021
|
var r;
|
|
930
|
-
return
|
|
1022
|
+
return an.forEach(function(i) {
|
|
931
1023
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
932
1024
|
}), r;
|
|
933
1025
|
}
|
|
934
1026
|
};
|
|
935
|
-
function
|
|
1027
|
+
function cn(e) {
|
|
936
1028
|
var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
|
|
937
1029
|
if (t ||= n && n[V], t) {
|
|
938
1030
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
939
|
-
window.CustomEvent && !
|
|
1031
|
+
window.CustomEvent && !Dt && !Ot ? h = new CustomEvent(r, {
|
|
940
1032
|
bubbles: !0,
|
|
941
1033
|
cancelable: !0
|
|
942
1034
|
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
943
|
-
var v =
|
|
1035
|
+
var v = yt(yt({}, m), sn.getEventProperties(r, t));
|
|
944
1036
|
for (var y in v) h[y] = v[y];
|
|
945
1037
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
946
1038
|
}
|
|
947
1039
|
}
|
|
948
|
-
var
|
|
949
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
950
|
-
|
|
1040
|
+
var ln = ["evt"], H = function(e, t) {
|
|
1041
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = bt(n, ln);
|
|
1042
|
+
sn.pluginEvent.bind(Q)(e, t, yt({
|
|
951
1043
|
dragEl: W,
|
|
952
1044
|
parentEl: G,
|
|
953
1045
|
ghostEl: K,
|
|
954
1046
|
rootEl: q,
|
|
955
|
-
nextEl:
|
|
956
|
-
lastDownEl:
|
|
1047
|
+
nextEl: un,
|
|
1048
|
+
lastDownEl: dn,
|
|
957
1049
|
cloneEl: J,
|
|
958
|
-
cloneHidden:
|
|
959
|
-
dragStarted:
|
|
1050
|
+
cloneHidden: fn,
|
|
1051
|
+
dragStarted: En,
|
|
960
1052
|
putSortable: X,
|
|
961
1053
|
activeSortable: Q.active,
|
|
962
1054
|
originalEvent: r,
|
|
963
|
-
oldIndex:
|
|
964
|
-
oldDraggableIndex:
|
|
1055
|
+
oldIndex: pn,
|
|
1056
|
+
oldDraggableIndex: mn,
|
|
965
1057
|
newIndex: Y,
|
|
966
|
-
newDraggableIndex:
|
|
967
|
-
hideGhostForTarget:
|
|
968
|
-
unhideGhostForTarget:
|
|
1058
|
+
newDraggableIndex: hn,
|
|
1059
|
+
hideGhostForTarget: Wn,
|
|
1060
|
+
unhideGhostForTarget: Gn,
|
|
969
1061
|
cloneNowHidden: function() {
|
|
970
|
-
|
|
1062
|
+
fn = !0;
|
|
971
1063
|
},
|
|
972
1064
|
cloneNowShown: function() {
|
|
973
|
-
|
|
1065
|
+
fn = !1;
|
|
974
1066
|
},
|
|
975
1067
|
dispatchSortableEvent: function(e) {
|
|
976
1068
|
U({
|
|
@@ -982,45 +1074,45 @@ var Kt = ["evt"], H = function(e, t) {
|
|
|
982
1074
|
}, i));
|
|
983
1075
|
};
|
|
984
1076
|
function U(e) {
|
|
985
|
-
|
|
1077
|
+
cn(yt({
|
|
986
1078
|
putSortable: X,
|
|
987
1079
|
cloneEl: J,
|
|
988
1080
|
targetEl: W,
|
|
989
1081
|
rootEl: q,
|
|
990
|
-
oldIndex:
|
|
991
|
-
oldDraggableIndex:
|
|
1082
|
+
oldIndex: pn,
|
|
1083
|
+
oldDraggableIndex: mn,
|
|
992
1084
|
newIndex: Y,
|
|
993
|
-
newDraggableIndex:
|
|
1085
|
+
newDraggableIndex: hn
|
|
994
1086
|
}, e));
|
|
995
1087
|
}
|
|
996
|
-
var W, G, K, q,
|
|
997
|
-
if (
|
|
998
|
-
if (
|
|
1088
|
+
var W, G, K, q, un, dn, J, fn, pn, Y, mn, hn, gn, X, _n = !1, vn = !1, yn = [], bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn = !1, An = !1, jn, Z, Mn = [], Nn = !1, Pn = [], Fn = typeof document < "u", In = jt, Ln = Ot || Dt ? "cssFloat" : "float", Rn = Fn && !Mt && !jt && "draggable" in document.createElement("div"), zn = function() {
|
|
1089
|
+
if (Fn) {
|
|
1090
|
+
if (Dt) return !1;
|
|
999
1091
|
var e = document.createElement("x");
|
|
1000
1092
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
1001
1093
|
}
|
|
1002
|
-
}(),
|
|
1003
|
-
var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
1094
|
+
}(), Bn = function(e, t) {
|
|
1095
|
+
var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Ht(e, 0, t), a = Ht(e, 1, t), o = i && R(i), s = a && R(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + z(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + z(a).width;
|
|
1004
1096
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1005
1097
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1006
1098
|
if (i && o.float && o.float !== "none") {
|
|
1007
1099
|
var u = o.float === "left" ? "left" : "right";
|
|
1008
1100
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
1009
1101
|
}
|
|
1010
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
1011
|
-
},
|
|
1102
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Ln] === "none" || a && n[Ln] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
1103
|
+
}, Vn = function(e, t, n) {
|
|
1012
1104
|
var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
1013
1105
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
1014
|
-
},
|
|
1106
|
+
}, Hn = function(e, t) {
|
|
1015
1107
|
var n;
|
|
1016
|
-
return
|
|
1108
|
+
return yn.some(function(r) {
|
|
1017
1109
|
var i = r[V].options.emptyInsertThreshold;
|
|
1018
|
-
if (i && !
|
|
1110
|
+
if (i && !Ut(r)) {
|
|
1019
1111
|
var a = z(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
1020
1112
|
if (o && s) return n = r;
|
|
1021
1113
|
}
|
|
1022
1114
|
}), n;
|
|
1023
|
-
},
|
|
1115
|
+
}, Un = function(e) {
|
|
1024
1116
|
function t(e, n) {
|
|
1025
1117
|
return function(r, i, a, o) {
|
|
1026
1118
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -1033,31 +1125,31 @@ var W, G, K, q, qt, Jt, J, Yt, Xt, Y, Zt, Qt, $t, X, en = !1, tn = !1, nn = [],
|
|
|
1033
1125
|
};
|
|
1034
1126
|
}
|
|
1035
1127
|
var n = {}, r = e.group;
|
|
1036
|
-
r &&
|
|
1037
|
-
},
|
|
1038
|
-
!
|
|
1039
|
-
},
|
|
1040
|
-
!
|
|
1128
|
+
r && wt(r) == "object" || (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
|
|
1129
|
+
}, Wn = function() {
|
|
1130
|
+
!zn && K && R(K, "display", "none");
|
|
1131
|
+
}, Gn = function() {
|
|
1132
|
+
!zn && K && R(K, "display", "");
|
|
1041
1133
|
};
|
|
1042
|
-
|
|
1043
|
-
if (
|
|
1134
|
+
Fn && !Mt && document.addEventListener("click", function(e) {
|
|
1135
|
+
if (vn) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), vn = !1, !1;
|
|
1044
1136
|
}, !0);
|
|
1045
|
-
var
|
|
1137
|
+
var Kn = function(e) {
|
|
1046
1138
|
if (W) {
|
|
1047
1139
|
e = e.touches ? e.touches[0] : e;
|
|
1048
|
-
var t =
|
|
1140
|
+
var t = Hn(e.clientX, e.clientY);
|
|
1049
1141
|
if (t) {
|
|
1050
1142
|
var n = {};
|
|
1051
1143
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
1052
1144
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
1053
1145
|
}
|
|
1054
1146
|
}
|
|
1055
|
-
},
|
|
1147
|
+
}, qn = function(e) {
|
|
1056
1148
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
1057
1149
|
};
|
|
1058
1150
|
function Q(e, t) {
|
|
1059
1151
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
1060
|
-
this.el = e, this.options = t =
|
|
1152
|
+
this.el = e, this.options = t = _t({}, t), e[V] = this;
|
|
1061
1153
|
var n = {
|
|
1062
1154
|
group: null,
|
|
1063
1155
|
sort: !0,
|
|
@@ -1070,7 +1162,7 @@ function Q(e, t) {
|
|
|
1070
1162
|
invertedSwapThreshold: null,
|
|
1071
1163
|
removeCloneOnHide: !0,
|
|
1072
1164
|
direction: function() {
|
|
1073
|
-
return
|
|
1165
|
+
return Bn(e, this.options);
|
|
1074
1166
|
},
|
|
1075
1167
|
ghostClass: "sortable-ghost",
|
|
1076
1168
|
chosenClass: "sortable-chosen",
|
|
@@ -1097,17 +1189,17 @@ function Q(e, t) {
|
|
|
1097
1189
|
x: 0,
|
|
1098
1190
|
y: 0
|
|
1099
1191
|
},
|
|
1100
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && (!
|
|
1192
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && (!At || jt),
|
|
1101
1193
|
emptyInsertThreshold: 5
|
|
1102
1194
|
};
|
|
1103
|
-
for (var r in
|
|
1104
|
-
for (var i in
|
|
1105
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
1195
|
+
for (var r in sn.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
1196
|
+
for (var i in Un(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
1197
|
+
this.nativeDraggable = !t.forceFallback && Rn, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? F(e, "pointerdown", this._onTapStart) : (F(e, "mousedown", this._onTapStart), F(e, "touchstart", this._onTapStart)), this.nativeDraggable && (F(e, "dragover", this), F(e, "dragenter", this)), yn.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), _t(this, tn());
|
|
1106
1198
|
}
|
|
1107
1199
|
Q.prototype = {
|
|
1108
1200
|
constructor: Q,
|
|
1109
1201
|
_isOutsideThisEl: function(e) {
|
|
1110
|
-
!this.el.contains(e) && e !== this.el && (
|
|
1202
|
+
!this.el.contains(e) && e !== this.el && (Dn = null);
|
|
1111
1203
|
},
|
|
1112
1204
|
_getDirection: function(e, t) {
|
|
1113
1205
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -1115,8 +1207,8 @@ Q.prototype = {
|
|
|
1115
1207
|
_onTapStart: function(e) {
|
|
1116
1208
|
if (e.cancelable) {
|
|
1117
1209
|
var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
|
|
1118
|
-
if (
|
|
1119
|
-
if (
|
|
1210
|
+
if (rr(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && At && s && s.tagName.toUpperCase() === "SELECT") && (s = It(s, r.draggable, n, !1), !(s && s.animated) && dn !== s)) {
|
|
1211
|
+
if (pn = B(s), mn = B(s, r.draggable), typeof l == "function") {
|
|
1120
1212
|
if (l.call(this, e, s, this)) {
|
|
1121
1213
|
U({
|
|
1122
1214
|
sortable: t,
|
|
@@ -1129,7 +1221,7 @@ Q.prototype = {
|
|
|
1129
1221
|
return;
|
|
1130
1222
|
}
|
|
1131
1223
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
1132
|
-
if (r =
|
|
1224
|
+
if (r = It(c, r.trim(), n, !1), r) return U({
|
|
1133
1225
|
sortable: t,
|
|
1134
1226
|
rootEl: r,
|
|
1135
1227
|
name: "filter",
|
|
@@ -1141,7 +1233,7 @@ Q.prototype = {
|
|
|
1141
1233
|
i && e.preventDefault();
|
|
1142
1234
|
return;
|
|
1143
1235
|
}
|
|
1144
|
-
(!r.handle ||
|
|
1236
|
+
(!r.handle || It(c, r.handle, n, !1)) && this._prepareDragStart(e, o, s);
|
|
1145
1237
|
}
|
|
1146
1238
|
}
|
|
1147
1239
|
},
|
|
@@ -1149,19 +1241,19 @@ Q.prototype = {
|
|
|
1149
1241
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
1150
1242
|
if (n && !W && n.parentNode === i) {
|
|
1151
1243
|
var c = z(n);
|
|
1152
|
-
if (q = i, W = n, G = W.parentNode,
|
|
1244
|
+
if (q = i, W = n, G = W.parentNode, un = W.nextSibling, dn = n, gn = a.group, Q.dragged = W, bn = {
|
|
1153
1245
|
target: W,
|
|
1154
1246
|
clientX: (t || e).clientX,
|
|
1155
1247
|
clientY: (t || e).clientY
|
|
1156
|
-
},
|
|
1157
|
-
H("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !
|
|
1248
|
+
}, wn = bn.clientX - c.left, Tn = bn.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
1249
|
+
H("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !kt && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
1158
1250
|
sortable: r,
|
|
1159
1251
|
name: "choose",
|
|
1160
1252
|
originalEvent: e
|
|
1161
1253
|
}), L(W, a.chosenClass, !0));
|
|
1162
1254
|
}, a.ignore.split(",").forEach(function(e) {
|
|
1163
|
-
|
|
1164
|
-
}), F(o, "dragover",
|
|
1255
|
+
zt(W, e.trim(), Xn);
|
|
1256
|
+
}), F(o, "dragover", Kn), F(o, "mousemove", Kn), F(o, "touchmove", Kn), a.supportPointer ? (F(o, "pointerup", r._onDrop), !this.nativeDraggable && F(o, "pointercancel", r._onDrop)) : (F(o, "mouseup", r._onDrop), F(o, "touchend", r._onDrop), F(o, "touchcancel", r._onDrop)), kt && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ot || Dt))) {
|
|
1165
1257
|
if (Q.eventCanceled) {
|
|
1166
1258
|
this._onDrop();
|
|
1167
1259
|
return;
|
|
@@ -1175,7 +1267,7 @@ Q.prototype = {
|
|
|
1175
1267
|
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
1176
1268
|
},
|
|
1177
1269
|
_disableDelayedDrag: function() {
|
|
1178
|
-
W &&
|
|
1270
|
+
W && Xn(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1179
1271
|
},
|
|
1180
1272
|
_disableDelayedDragEvents: function() {
|
|
1181
1273
|
var e = this.el.ownerDocument;
|
|
@@ -1184,14 +1276,14 @@ Q.prototype = {
|
|
|
1184
1276
|
_triggerDragStart: function(e, t) {
|
|
1185
1277
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? F(document, "pointermove", this._onTouchMove) : t ? F(document, "touchmove", this._onTouchMove) : F(document, "mousemove", this._onTouchMove) : (F(W, "dragend", this), F(q, "dragstart", this._onDragStart));
|
|
1186
1278
|
try {
|
|
1187
|
-
document.selection ?
|
|
1279
|
+
document.selection ? ir(function() {
|
|
1188
1280
|
document.selection.empty();
|
|
1189
1281
|
}) : window.getSelection().removeAllRanges();
|
|
1190
1282
|
} catch {}
|
|
1191
1283
|
},
|
|
1192
1284
|
_dragStarted: function(e, t) {
|
|
1193
|
-
if (
|
|
1194
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover",
|
|
1285
|
+
if (_n = !1, q && W) {
|
|
1286
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover", qn);
|
|
1195
1287
|
var n = this.options;
|
|
1196
1288
|
!e && L(W, n.dragClass, !1), L(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
1197
1289
|
sortable: this,
|
|
@@ -1201,33 +1293,33 @@ Q.prototype = {
|
|
|
1201
1293
|
} else this._nulling();
|
|
1202
1294
|
},
|
|
1203
1295
|
_emulateDragOver: function() {
|
|
1204
|
-
if (
|
|
1205
|
-
this._lastX =
|
|
1206
|
-
for (var e = document.elementFromPoint(
|
|
1296
|
+
if (xn) {
|
|
1297
|
+
this._lastX = xn.clientX, this._lastY = xn.clientY, Wn();
|
|
1298
|
+
for (var e = document.elementFromPoint(xn.clientX, xn.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(xn.clientX, xn.clientY), e !== t);) t = e;
|
|
1207
1299
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
1208
1300
|
if (t[V]) {
|
|
1209
1301
|
var n = void 0;
|
|
1210
1302
|
if (n = t[V]._onDragOver({
|
|
1211
|
-
clientX:
|
|
1212
|
-
clientY:
|
|
1303
|
+
clientX: xn.clientX,
|
|
1304
|
+
clientY: xn.clientY,
|
|
1213
1305
|
target: e,
|
|
1214
1306
|
rootEl: t
|
|
1215
1307
|
}), n && !this.options.dragoverBubble) break;
|
|
1216
1308
|
}
|
|
1217
1309
|
e = t;
|
|
1218
|
-
} while (t =
|
|
1219
|
-
|
|
1310
|
+
} while (t = Ft(t));
|
|
1311
|
+
Gn();
|
|
1220
1312
|
}
|
|
1221
1313
|
},
|
|
1222
1314
|
_onTouchMove: function(e) {
|
|
1223
|
-
if (
|
|
1224
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
1225
|
-
if (!Q.active && !
|
|
1315
|
+
if (bn) {
|
|
1316
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && Rt(K, !0), o = K && a && a.a, s = K && a && a.d, c = In && Z && Wt(Z), l = (i.clientX - bn.clientX + r.x) / (o || 1) + (c ? c[0] - Mn[0] : 0) / (o || 1), u = (i.clientY - bn.clientY + r.y) / (s || 1) + (c ? c[1] - Mn[1] : 0) / (s || 1);
|
|
1317
|
+
if (!Q.active && !_n) {
|
|
1226
1318
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
1227
1319
|
this._onDragStart(e, !0);
|
|
1228
1320
|
}
|
|
1229
1321
|
if (K) {
|
|
1230
|
-
a ? (a.e += l - (
|
|
1322
|
+
a ? (a.e += l - (Sn || 0), a.f += u - (Cn || 0)) : a = {
|
|
1231
1323
|
a: 1,
|
|
1232
1324
|
b: 0,
|
|
1233
1325
|
c: 0,
|
|
@@ -1236,35 +1328,35 @@ Q.prototype = {
|
|
|
1236
1328
|
f: u
|
|
1237
1329
|
};
|
|
1238
1330
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
1239
|
-
R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d),
|
|
1331
|
+
R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d), Sn = l, Cn = u, xn = i;
|
|
1240
1332
|
}
|
|
1241
1333
|
e.cancelable && e.preventDefault();
|
|
1242
1334
|
}
|
|
1243
1335
|
},
|
|
1244
1336
|
_appendGhost: function() {
|
|
1245
1337
|
if (!K) {
|
|
1246
|
-
var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0,
|
|
1247
|
-
if (
|
|
1338
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0, In, !0, e), n = this.options;
|
|
1339
|
+
if (In) {
|
|
1248
1340
|
for (Z = e; R(Z, "position") === "static" && R(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
1249
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
1341
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Bt()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Bt(), Mn = Wt(Z);
|
|
1250
1342
|
}
|
|
1251
|
-
K = W.cloneNode(!0), L(K, n.ghostClass, !1), L(K, n.fallbackClass, !0), L(K, n.dragClass, !0), R(K, "transition", ""), R(K, "transform", ""), R(K, "box-sizing", "border-box"), R(K, "margin", 0), R(K, "top", t.top), R(K, "left", t.left), R(K, "width", t.width), R(K, "height", t.height), R(K, "opacity", "0.8"), R(K, "position",
|
|
1343
|
+
K = W.cloneNode(!0), L(K, n.ghostClass, !1), L(K, n.fallbackClass, !0), L(K, n.dragClass, !0), R(K, "transition", ""), R(K, "transform", ""), R(K, "box-sizing", "border-box"), R(K, "margin", 0), R(K, "top", t.top), R(K, "left", t.left), R(K, "width", t.width), R(K, "height", t.height), R(K, "opacity", "0.8"), R(K, "position", In ? "absolute" : "fixed"), R(K, "zIndex", "100000"), R(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), R(K, "transform-origin", wn / parseInt(K.style.width) * 100 + "% " + Tn / parseInt(K.style.height) * 100 + "%");
|
|
1252
1344
|
}
|
|
1253
1345
|
},
|
|
1254
1346
|
_onDragStart: function(e, t) {
|
|
1255
1347
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
1256
|
-
H("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (H("setupClone", this), Q.eventCanceled || (J =
|
|
1348
|
+
H("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (H("setupClone", this), Q.eventCanceled || (J = $t(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), L(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = ir(function() {
|
|
1257
1349
|
H("clone", n), Q.eventCanceled || (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
1258
1350
|
sortable: n,
|
|
1259
1351
|
name: "clone"
|
|
1260
1352
|
}));
|
|
1261
|
-
}), !t && L(W, i.dragClass, !0), t ? (
|
|
1353
|
+
}), !t && L(W, i.dragClass, !0), t ? (vn = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (I(document, "mouseup", n._onDrop), I(document, "touchend", n._onDrop), I(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), F(document, "drop", n), R(W, "transform", "translateZ(0)")), _n = !0, n._dragStartId = ir(n._dragStarted.bind(n, t, e)), F(document, "selectstart", n), En = !0, window.getSelection().removeAllRanges(), At && R(document.body, "user-select", "none"));
|
|
1262
1354
|
},
|
|
1263
1355
|
_onDragOver: function(e) {
|
|
1264
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
1265
|
-
if (
|
|
1356
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = gn === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
1357
|
+
if (Nn) return;
|
|
1266
1358
|
function h(o, s) {
|
|
1267
|
-
H(o, p,
|
|
1359
|
+
H(o, p, yt({
|
|
1268
1360
|
evt: e,
|
|
1269
1361
|
isOwner: l,
|
|
1270
1362
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -1276,7 +1368,7 @@ Q.prototype = {
|
|
|
1276
1368
|
target: n,
|
|
1277
1369
|
completed: _,
|
|
1278
1370
|
onMove: function(n, i) {
|
|
1279
|
-
return
|
|
1371
|
+
return Yn(q, t, W, r, n, z(n), e, i);
|
|
1280
1372
|
},
|
|
1281
1373
|
changed: v
|
|
1282
1374
|
}, s));
|
|
@@ -1287,48 +1379,48 @@ Q.prototype = {
|
|
|
1287
1379
|
function _(r) {
|
|
1288
1380
|
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (L(W, X ? X.options.ghostClass : c.options.ghostClass, !1), L(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
1289
1381
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
1290
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
1382
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Dn = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && Kn(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
1291
1383
|
}
|
|
1292
1384
|
function v() {
|
|
1293
|
-
Y = B(W),
|
|
1385
|
+
Y = B(W), hn = B(W, o.draggable), U({
|
|
1294
1386
|
sortable: p,
|
|
1295
1387
|
name: "change",
|
|
1296
1388
|
toEl: t,
|
|
1297
1389
|
newIndex: Y,
|
|
1298
|
-
newDraggableIndex:
|
|
1390
|
+
newDraggableIndex: hn,
|
|
1299
1391
|
originalEvent: e
|
|
1300
1392
|
});
|
|
1301
1393
|
}
|
|
1302
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
1394
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = It(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
1303
1395
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
1304
|
-
if (
|
|
1396
|
+
if (vn = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = gn.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
1305
1397
|
if (f = this._getDirection(e, n) === "vertical", r = z(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
1306
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
1307
|
-
var y =
|
|
1308
|
-
if (!y ||
|
|
1398
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (un ? q.insertBefore(W, un) : q.appendChild(W)), _(!0);
|
|
1399
|
+
var y = Ut(t, o.draggable);
|
|
1400
|
+
if (!y || $n(e, f, this) && !y.animated) {
|
|
1309
1401
|
if (y === W) return _(!1);
|
|
1310
|
-
if (y && t === e.target && (n = y), n && (i = z(n)),
|
|
1311
|
-
} else if (y &&
|
|
1312
|
-
var b =
|
|
1402
|
+
if (y && t === e.target && (n = y), n && (i = z(n)), Yn(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
|
|
1403
|
+
} else if (y && Qn(e, f, this)) {
|
|
1404
|
+
var b = Ht(t, 0, o, !0);
|
|
1313
1405
|
if (b === W) return _(!1);
|
|
1314
|
-
if (n = b, i = z(n),
|
|
1406
|
+
if (n = b, i = z(n), Yn(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
1315
1407
|
} else if (n.parentNode === t) {
|
|
1316
1408
|
i = z(n);
|
|
1317
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
1318
|
-
|
|
1409
|
+
var x = 0, S, C = W.parentNode !== t, w = !Vn(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Vt(n, "top", "top") || Vt(W, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
1410
|
+
Dn !== n && (S = i[T], kn = !1, An = !w && o.invertSwap || C), x = er(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, An, Dn === n);
|
|
1319
1411
|
var D;
|
|
1320
1412
|
if (x !== 0) {
|
|
1321
|
-
var
|
|
1413
|
+
var te = B(W);
|
|
1322
1414
|
do
|
|
1323
|
-
|
|
1415
|
+
te -= x, D = G.children[te];
|
|
1324
1416
|
while (D && (R(D, "display") === "none" || D === K));
|
|
1325
1417
|
}
|
|
1326
1418
|
if (x === 0 || D === n) return _(!1);
|
|
1327
|
-
|
|
1328
|
-
var
|
|
1329
|
-
|
|
1330
|
-
var
|
|
1331
|
-
if (
|
|
1419
|
+
Dn = n, On = x;
|
|
1420
|
+
var O = n.nextElementSibling, k = !1;
|
|
1421
|
+
k = x === 1;
|
|
1422
|
+
var A = Yn(q, t, W, r, n, i, e, k);
|
|
1423
|
+
if (A !== !1) return (A === 1 || A === -1) && (k = A === 1), Nn = !0, setTimeout(Zn, 30), g(), k && !O ? t.appendChild(W) : n.parentNode.insertBefore(W, k ? O : n), E && Qt(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !An && (jn = Math.abs(S - z(n)[T])), v(), _(!0);
|
|
1332
1424
|
}
|
|
1333
1425
|
if (t.contains(W)) return _(!1);
|
|
1334
1426
|
}
|
|
@@ -1336,7 +1428,7 @@ Q.prototype = {
|
|
|
1336
1428
|
},
|
|
1337
1429
|
_ignoreWhileAnimating: null,
|
|
1338
1430
|
_offMoveEvents: function() {
|
|
1339
|
-
I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover",
|
|
1431
|
+
I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover", Kn), I(document, "mousemove", Kn), I(document, "touchmove", Kn);
|
|
1340
1432
|
},
|
|
1341
1433
|
_offUpEvents: function() {
|
|
1342
1434
|
var e = this.el.ownerDocument;
|
|
@@ -1344,14 +1436,14 @@ Q.prototype = {
|
|
|
1344
1436
|
},
|
|
1345
1437
|
_onDrop: function(e) {
|
|
1346
1438
|
var t = this.el, n = this.options;
|
|
1347
|
-
Y = B(W),
|
|
1439
|
+
Y = B(W), hn = B(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = B(W), hn = B(W, n.draggable), Q.eventCanceled || (_n = !1, An = !1, kn = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ar(this.cloneId), ar(this._dragStartId), this.nativeDraggable && (I(document, "drop", this), I(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), At && R(document.body, "user-select", ""), R(W, "transform", ""), e && (En && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && I(W, "dragend", this), Xn(W), W.style["will-change"] = "", En && !_n && L(W, X ? X.options.ghostClass : this.options.ghostClass, !1), L(W, this.options.chosenClass, !1), U({
|
|
1348
1440
|
sortable: this,
|
|
1349
1441
|
name: "unchoose",
|
|
1350
1442
|
toEl: G,
|
|
1351
1443
|
newIndex: null,
|
|
1352
1444
|
newDraggableIndex: null,
|
|
1353
1445
|
originalEvent: e
|
|
1354
|
-
}), q === G ? Y !==
|
|
1446
|
+
}), q === G ? Y !== pn && Y >= 0 && (U({
|
|
1355
1447
|
sortable: this,
|
|
1356
1448
|
name: "update",
|
|
1357
1449
|
toEl: G,
|
|
@@ -1383,7 +1475,7 @@ Q.prototype = {
|
|
|
1383
1475
|
name: "sort",
|
|
1384
1476
|
toEl: G,
|
|
1385
1477
|
originalEvent: e
|
|
1386
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
1478
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = pn, hn = mn), U({
|
|
1387
1479
|
sortable: this,
|
|
1388
1480
|
name: "end",
|
|
1389
1481
|
toEl: G,
|
|
@@ -1391,11 +1483,11 @@ Q.prototype = {
|
|
|
1391
1483
|
}), this.save())))), this._nulling();
|
|
1392
1484
|
},
|
|
1393
1485
|
_nulling: function() {
|
|
1394
|
-
H("nulling", this), q = W = G = K =
|
|
1486
|
+
H("nulling", this), q = W = G = K = un = J = dn = fn = bn = xn = En = Y = hn = pn = mn = Dn = On = X = gn = Q.dragged = Q.ghost = Q.clone = Q.active = null;
|
|
1395
1487
|
var e = this.el;
|
|
1396
|
-
|
|
1488
|
+
Pn.forEach(function(t) {
|
|
1397
1489
|
e.contains(t) && (t.checked = !0);
|
|
1398
|
-
}),
|
|
1490
|
+
}), Pn.length = Sn = Cn = 0;
|
|
1399
1491
|
},
|
|
1400
1492
|
handleEvent: function(e) {
|
|
1401
1493
|
switch (e.type) {
|
|
@@ -1405,20 +1497,20 @@ Q.prototype = {
|
|
|
1405
1497
|
break;
|
|
1406
1498
|
case "dragenter":
|
|
1407
1499
|
case "dragover":
|
|
1408
|
-
W && (this._onDragOver(e),
|
|
1500
|
+
W && (this._onDragOver(e), Jn(e));
|
|
1409
1501
|
break;
|
|
1410
1502
|
case "selectstart": e.preventDefault();
|
|
1411
1503
|
}
|
|
1412
1504
|
},
|
|
1413
1505
|
toArray: function() {
|
|
1414
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
1506
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], It(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || nr(t));
|
|
1415
1507
|
return e;
|
|
1416
1508
|
},
|
|
1417
1509
|
sort: function(e, t) {
|
|
1418
1510
|
var n = {}, r = this.el;
|
|
1419
1511
|
this.toArray().forEach(function(e, t) {
|
|
1420
1512
|
var i = r.children[t];
|
|
1421
|
-
|
|
1513
|
+
It(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
1422
1514
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
1423
1515
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
1424
1516
|
}), t && this.animateAll();
|
|
@@ -1428,109 +1520,109 @@ Q.prototype = {
|
|
|
1428
1520
|
e && e.set && e.set(this);
|
|
1429
1521
|
},
|
|
1430
1522
|
closest: function(e, t) {
|
|
1431
|
-
return
|
|
1523
|
+
return It(e, t || this.options.draggable, this.el, !1);
|
|
1432
1524
|
},
|
|
1433
1525
|
option: function(e, t) {
|
|
1434
1526
|
var n = this.options;
|
|
1435
1527
|
if (t === void 0) return n[e];
|
|
1436
|
-
var r =
|
|
1437
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
1528
|
+
var r = sn.modifyOption(this, e, t);
|
|
1529
|
+
n[e] = r === void 0 ? t : r, e === "group" && Un(n);
|
|
1438
1530
|
},
|
|
1439
1531
|
destroy: function() {
|
|
1440
1532
|
H("destroy", this);
|
|
1441
1533
|
var e = this.el;
|
|
1442
1534
|
e[V] = null, I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart), I(e, "pointerdown", this._onTapStart), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
1443
1535
|
e.removeAttribute("draggable");
|
|
1444
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1536
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), yn.splice(yn.indexOf(this.el), 1), this.el = e = null;
|
|
1445
1537
|
},
|
|
1446
1538
|
_hideClone: function() {
|
|
1447
|
-
if (!
|
|
1539
|
+
if (!fn) {
|
|
1448
1540
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
1449
|
-
R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J),
|
|
1541
|
+
R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), fn = !0;
|
|
1450
1542
|
}
|
|
1451
1543
|
},
|
|
1452
1544
|
_showClone: function(e) {
|
|
1453
1545
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
1454
|
-
else if (
|
|
1546
|
+
else if (fn) {
|
|
1455
1547
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
1456
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
1548
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : un ? q.insertBefore(J, un) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), R(J, "display", ""), fn = !1;
|
|
1457
1549
|
}
|
|
1458
1550
|
}
|
|
1459
1551
|
};
|
|
1460
|
-
function
|
|
1552
|
+
function Jn(e) {
|
|
1461
1553
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1462
1554
|
}
|
|
1463
|
-
function
|
|
1555
|
+
function Yn(e, t, n, r, i, a, o, s) {
|
|
1464
1556
|
var c, l = e[V], u = l.options.onMove, d;
|
|
1465
|
-
return window.CustomEvent && !
|
|
1557
|
+
return window.CustomEvent && !Dt && !Ot ? c = new CustomEvent("move", {
|
|
1466
1558
|
bubbles: !0,
|
|
1467
1559
|
cancelable: !0
|
|
1468
1560
|
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || z(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
1469
1561
|
}
|
|
1470
|
-
function
|
|
1562
|
+
function Xn(e) {
|
|
1471
1563
|
e.draggable = !1;
|
|
1472
1564
|
}
|
|
1473
|
-
function
|
|
1474
|
-
|
|
1565
|
+
function Zn() {
|
|
1566
|
+
Nn = !1;
|
|
1475
1567
|
}
|
|
1476
|
-
function
|
|
1477
|
-
var r = z(
|
|
1568
|
+
function Qn(e, t, n) {
|
|
1569
|
+
var r = z(Ht(n.el, 0, n.options, !0)), i = en(n.el, n.options, K), a = 10;
|
|
1478
1570
|
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
1479
1571
|
}
|
|
1480
|
-
function
|
|
1481
|
-
var r = z(
|
|
1572
|
+
function $n(e, t, n) {
|
|
1573
|
+
var r = z(Ut(n.el, n.options.draggable)), i = en(n.el, n.options, K), a = 10;
|
|
1482
1574
|
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
1483
1575
|
}
|
|
1484
|
-
function
|
|
1576
|
+
function er(e, t, n, r, i, a, o, s) {
|
|
1485
1577
|
var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
|
|
1486
1578
|
if (!o) {
|
|
1487
|
-
if (s &&
|
|
1488
|
-
if (!
|
|
1489
|
-
else if (
|
|
1490
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
1579
|
+
if (s && jn < l * i) {
|
|
1580
|
+
if (!kn && (On === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (kn = !0), kn) f = !0;
|
|
1581
|
+
else if (On === 1 ? c < u + jn : c > d - jn) return -On;
|
|
1582
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return tr(t);
|
|
1491
1583
|
}
|
|
1492
1584
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
1493
1585
|
}
|
|
1494
|
-
function
|
|
1586
|
+
function tr(e) {
|
|
1495
1587
|
return B(W) < B(e) ? 1 : -1;
|
|
1496
1588
|
}
|
|
1497
|
-
function
|
|
1589
|
+
function nr(e) {
|
|
1498
1590
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
1499
1591
|
return r.toString(36);
|
|
1500
1592
|
}
|
|
1501
|
-
function
|
|
1502
|
-
|
|
1593
|
+
function rr(e) {
|
|
1594
|
+
Pn.length = 0;
|
|
1503
1595
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
1504
1596
|
var r = t[n];
|
|
1505
|
-
r.checked &&
|
|
1597
|
+
r.checked && Pn.push(r);
|
|
1506
1598
|
}
|
|
1507
1599
|
}
|
|
1508
|
-
function
|
|
1600
|
+
function ir(e) {
|
|
1509
1601
|
return setTimeout(e, 0);
|
|
1510
1602
|
}
|
|
1511
|
-
function
|
|
1603
|
+
function ar(e) {
|
|
1512
1604
|
return clearTimeout(e);
|
|
1513
1605
|
}
|
|
1514
|
-
|
|
1515
|
-
(Q.active ||
|
|
1606
|
+
Fn && F(document, "touchmove", function(e) {
|
|
1607
|
+
(Q.active || _n) && e.cancelable && e.preventDefault();
|
|
1516
1608
|
}), Q.utils = {
|
|
1517
1609
|
on: F,
|
|
1518
1610
|
off: I,
|
|
1519
1611
|
css: R,
|
|
1520
|
-
find:
|
|
1612
|
+
find: zt,
|
|
1521
1613
|
is: function(e, t) {
|
|
1522
|
-
return !!
|
|
1614
|
+
return !!It(e, t, e, !1);
|
|
1523
1615
|
},
|
|
1524
|
-
extend:
|
|
1525
|
-
throttle:
|
|
1526
|
-
closest:
|
|
1616
|
+
extend: qt,
|
|
1617
|
+
throttle: Xt,
|
|
1618
|
+
closest: It,
|
|
1527
1619
|
toggleClass: L,
|
|
1528
|
-
clone:
|
|
1620
|
+
clone: $t,
|
|
1529
1621
|
index: B,
|
|
1530
|
-
nextTick:
|
|
1531
|
-
cancelNextTick:
|
|
1532
|
-
detectDirection:
|
|
1533
|
-
getChild:
|
|
1622
|
+
nextTick: ir,
|
|
1623
|
+
cancelNextTick: ar,
|
|
1624
|
+
detectDirection: Bn,
|
|
1625
|
+
getChild: Ht,
|
|
1534
1626
|
expando: V
|
|
1535
1627
|
}, Q.get = function(e) {
|
|
1536
1628
|
return e[V];
|
|
@@ -1538,13 +1630,13 @@ yn && F(document, "touchmove", function(e) {
|
|
|
1538
1630
|
var e = [...arguments];
|
|
1539
1631
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
1540
1632
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
1541
|
-
e.utils && (Q.utils =
|
|
1633
|
+
e.utils && (Q.utils = yt(yt({}, Q.utils), e.utils)), sn.mount(e);
|
|
1542
1634
|
});
|
|
1543
1635
|
}, Q.create = function(e, t) {
|
|
1544
1636
|
return new Q(e, t);
|
|
1545
|
-
}, Q.version =
|
|
1546
|
-
var $ = [],
|
|
1547
|
-
function
|
|
1637
|
+
}, Q.version = Tt;
|
|
1638
|
+
var $ = [], or, sr, cr = !1, lr, ur, dr, fr;
|
|
1639
|
+
function pr() {
|
|
1548
1640
|
function e() {
|
|
1549
1641
|
for (var e in this.defaults = {
|
|
1550
1642
|
scroll: !0,
|
|
@@ -1564,63 +1656,63 @@ function Zn() {
|
|
|
1564
1656
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1565
1657
|
},
|
|
1566
1658
|
drop: function() {
|
|
1567
|
-
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
1659
|
+
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)), hr(), mr(), Zt();
|
|
1568
1660
|
},
|
|
1569
1661
|
nulling: function() {
|
|
1570
|
-
|
|
1662
|
+
dr = sr = or = cr = fr = lr = ur = null, $.length = 0;
|
|
1571
1663
|
},
|
|
1572
1664
|
_handleFallbackAutoScroll: function(e) {
|
|
1573
1665
|
this._handleAutoScroll(e, !0);
|
|
1574
1666
|
},
|
|
1575
1667
|
_handleAutoScroll: function(e, t) {
|
|
1576
1668
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
1577
|
-
if (
|
|
1578
|
-
|
|
1579
|
-
var o =
|
|
1580
|
-
|
|
1581
|
-
var a =
|
|
1582
|
-
a !== o && (o = a,
|
|
1583
|
-
}, 10),
|
|
1669
|
+
if (dr = e, t || this.options.forceAutoScrollFallback || Ot || Dt || At) {
|
|
1670
|
+
gr(e, this.options, a, t);
|
|
1671
|
+
var o = Kt(a, !0);
|
|
1672
|
+
cr && (!fr || r !== lr || i !== ur) && (fr && hr(), fr = setInterval(function() {
|
|
1673
|
+
var a = Kt(document.elementFromPoint(r, i), !0);
|
|
1674
|
+
a !== o && (o = a, mr()), gr(e, n.options, a, t);
|
|
1675
|
+
}, 10), lr = r, ur = i);
|
|
1584
1676
|
} else {
|
|
1585
|
-
if (!this.options.bubbleScroll ||
|
|
1586
|
-
|
|
1677
|
+
if (!this.options.bubbleScroll || Kt(a, !0) === Bt()) {
|
|
1678
|
+
mr();
|
|
1587
1679
|
return;
|
|
1588
1680
|
}
|
|
1589
|
-
|
|
1681
|
+
gr(e, this.options, Kt(a, !1), !1);
|
|
1590
1682
|
}
|
|
1591
1683
|
}
|
|
1592
|
-
},
|
|
1684
|
+
}, _t(e, {
|
|
1593
1685
|
pluginName: "scroll",
|
|
1594
1686
|
initializeByDefault: !0
|
|
1595
1687
|
});
|
|
1596
1688
|
}
|
|
1597
|
-
function
|
|
1689
|
+
function mr() {
|
|
1598
1690
|
$.forEach(function(e) {
|
|
1599
1691
|
clearInterval(e.pid);
|
|
1600
1692
|
}), $ = [];
|
|
1601
1693
|
}
|
|
1602
|
-
function
|
|
1603
|
-
clearInterval(
|
|
1694
|
+
function hr() {
|
|
1695
|
+
clearInterval(fr);
|
|
1604
1696
|
}
|
|
1605
|
-
var
|
|
1697
|
+
var gr = Xt(function(e, t, n, r) {
|
|
1606
1698
|
if (t.scroll) {
|
|
1607
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
1608
|
-
|
|
1609
|
-
var d = 0, f =
|
|
1699
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Bt(), l = !1, u;
|
|
1700
|
+
sr !== n && (sr = n, mr(), or = t.scroll, u = t.scrollFn, or === !0 && (or = Kt(n, !0)));
|
|
1701
|
+
var d = 0, f = or;
|
|
1610
1702
|
do {
|
|
1611
1703
|
var p = f, m = z(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = R(p), E = p.scrollLeft, ee = p.scrollTop;
|
|
1612
1704
|
p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
|
|
1613
|
-
var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E),
|
|
1614
|
-
if (!$[d]) for (var
|
|
1615
|
-
($[d].vx != D || $[d].vy !=
|
|
1616
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
1705
|
+
var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), te = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
|
|
1706
|
+
if (!$[d]) for (var O = 0; O <= d; O++) $[O] || ($[O] = {});
|
|
1707
|
+
($[d].vx != D || $[d].vy != te || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = te, clearInterval($[d].pid), (D != 0 || te != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
1708
|
+
r && this.layer === 0 && Q.active._onTouchMove(dr);
|
|
1617
1709
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
1618
|
-
(typeof u != "function" || u.call(Q.dragged.parentNode[V], n, t, e,
|
|
1710
|
+
(typeof u != "function" || u.call(Q.dragged.parentNode[V], n, t, e, dr, $[this.layer].el) === "continue") && Qt($[this.layer].el, n, t);
|
|
1619
1711
|
}.bind({ layer: d }), 24))), d++;
|
|
1620
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
1621
|
-
|
|
1712
|
+
} while (t.bubbleScroll && f !== c && (f = Kt(f, !1)));
|
|
1713
|
+
cr = l;
|
|
1622
1714
|
}
|
|
1623
|
-
}, 30),
|
|
1715
|
+
}, 30), _r = function(e) {
|
|
1624
1716
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1625
1717
|
if (t) {
|
|
1626
1718
|
var c = n || i;
|
|
@@ -1632,8 +1724,8 @@ var er = Pt(function(e, t, n, r) {
|
|
|
1632
1724
|
}));
|
|
1633
1725
|
}
|
|
1634
1726
|
};
|
|
1635
|
-
function
|
|
1636
|
-
|
|
1727
|
+
function vr() {}
|
|
1728
|
+
vr.prototype = {
|
|
1637
1729
|
startIndex: null,
|
|
1638
1730
|
dragStart: function(e) {
|
|
1639
1731
|
var t = e.oldDraggableIndex;
|
|
@@ -1642,21 +1734,21 @@ nr.prototype = {
|
|
|
1642
1734
|
onSpill: function(e) {
|
|
1643
1735
|
var t = e.dragEl, n = e.putSortable;
|
|
1644
1736
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1645
|
-
var r =
|
|
1737
|
+
var r = Ht(this.sortable.el, this.startIndex, this.options);
|
|
1646
1738
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
1647
1739
|
},
|
|
1648
|
-
drop:
|
|
1649
|
-
},
|
|
1650
|
-
function
|
|
1651
|
-
|
|
1740
|
+
drop: _r
|
|
1741
|
+
}, _t(vr, { pluginName: "revertOnSpill" });
|
|
1742
|
+
function yr() {}
|
|
1743
|
+
yr.prototype = {
|
|
1652
1744
|
onSpill: function(e) {
|
|
1653
1745
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
1654
1746
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
1655
1747
|
},
|
|
1656
|
-
drop:
|
|
1657
|
-
},
|
|
1748
|
+
drop: _r
|
|
1749
|
+
}, _t(yr, { pluginName: "removeOnSpill" }), Q.mount(new pr()), Q.mount(yr, vr);
|
|
1658
1750
|
// src/composables/useTabsDrag.ts
|
|
1659
|
-
function
|
|
1751
|
+
function br(e) {
|
|
1660
1752
|
let t, n = [];
|
|
1661
1753
|
function r(e) {
|
|
1662
1754
|
return e?.getAttribute("data-tab-id") ?? e?.querySelector("[data-tab-id]")?.getAttribute("data-tab-id") ?? void 0;
|
|
@@ -1693,29 +1785,30 @@ function ir(e) {
|
|
|
1693
1785
|
}
|
|
1694
1786
|
}));
|
|
1695
1787
|
}
|
|
1696
|
-
|
|
1788
|
+
se([
|
|
1697
1789
|
e.element,
|
|
1698
|
-
e.
|
|
1699
|
-
e.
|
|
1790
|
+
e.enabled,
|
|
1791
|
+
() => e.selector,
|
|
1792
|
+
() => e.scrollElement?.()
|
|
1700
1793
|
], o, {
|
|
1701
1794
|
immediate: !0,
|
|
1702
1795
|
flush: "post"
|
|
1703
1796
|
}), C(i);
|
|
1704
1797
|
}
|
|
1705
1798
|
// src/composables/useOgTabsLifecycle.ts
|
|
1706
|
-
function
|
|
1707
|
-
|
|
1799
|
+
function xr(e) {
|
|
1800
|
+
br({
|
|
1708
1801
|
element: e.nativeNav,
|
|
1709
1802
|
selector: "[role=\"tab\"]",
|
|
1710
1803
|
enabled: () => e.featureEnabled("drag") && !e.props.ogReadonly && !e.props.ogBusy,
|
|
1711
1804
|
items: () => e.orderedTabs.value,
|
|
1712
|
-
canDrag:
|
|
1805
|
+
canDrag: Ne,
|
|
1713
1806
|
onMove: (t, n) => {
|
|
1714
1807
|
e.controller.moveBefore(t, n, "drag");
|
|
1715
1808
|
}
|
|
1716
1809
|
});
|
|
1717
1810
|
let t = "";
|
|
1718
|
-
|
|
1811
|
+
se([e.tabs, e.activeKey], ([n, r], [i]) => {
|
|
1719
1812
|
if (r !== void 0 && P(n, r)) {
|
|
1720
1813
|
t = "";
|
|
1721
1814
|
return;
|
|
@@ -1724,40 +1817,40 @@ function ar(e) {
|
|
|
1724
1817
|
if (t === a) return;
|
|
1725
1818
|
t = a;
|
|
1726
1819
|
let o;
|
|
1727
|
-
o = r === void 0 ?
|
|
1728
|
-
}, { immediate: !0 }),
|
|
1820
|
+
o = r === void 0 ? Ae(n).find((e) => !e.disabled)?.key : Xe(Ae(i || n), n, r), e.emitActiveKey(o);
|
|
1821
|
+
}, { immediate: !0 }), se(e.activeKey, (t) => {
|
|
1729
1822
|
t !== void 0 && e.scrollTo(t), t !== void 0 && e.pendingFocusId.value === N(t) && (e.focusTab(e.pendingFocusId.value), e.pendingFocusId.value = void 0);
|
|
1730
1823
|
});
|
|
1731
1824
|
}
|
|
1732
1825
|
// src/composables/useOgTabsModel.ts
|
|
1733
|
-
function
|
|
1826
|
+
function Sr(e) {
|
|
1734
1827
|
let { props: n, globalConfig: r, slots: i, navOverflowed: a, assertUnique: o } = e, s = c(() => n.ogVariant ?? r?.variant ?? "default"), l = c(() => n.ogDensity ?? r?.density ?? "default"), u = c(() => n.ogRenderContent ?? r?.renderContent ?? !0), d = c(() => ({
|
|
1735
1828
|
...r?.features,
|
|
1736
1829
|
...n.ogFeatures
|
|
1737
|
-
})), f = c(() =>
|
|
1830
|
+
})), f = c(() => ge(t, r?.localeSource?.value, r?.locale, n.ogLocale)), p = c(() => ({
|
|
1738
1831
|
...r?.contextMenu,
|
|
1739
1832
|
...n.ogContextMenu
|
|
1740
|
-
})), m = c(() => n.ogMinTabWidth ?? r?.minTabWidth), h = c(() => n.ogMaxTabWidth ?? r?.maxTabWidth), g = c(() => n.ogThemeColor ?? r?.themeColor), _ = c(() => n.ogSticky ?? r?.sticky), v = c(() => n.ogFinderThreshold ?? r?.finderThreshold ?? 8), y = c(() => (o(n.ogItems), n.ogItems)), b = c(() =>
|
|
1833
|
+
})), m = c(() => n.ogMinTabWidth ?? r?.minTabWidth), h = c(() => n.ogMaxTabWidth ?? r?.maxTabWidth), g = c(() => n.ogThemeColor ?? r?.themeColor), _ = c(() => n.ogSticky ?? r?.sticky), v = c(() => n.ogFinderThreshold ?? r?.finderThreshold ?? 8), y = c(() => (o(n.ogItems), n.ogItems)), b = c(() => Ae(y.value)), x = c(() => n.modelValue), S = c(() => P(y.value, x.value)), C = c(() => {
|
|
1741
1834
|
if (x.value !== void 0) return N(x.value);
|
|
1742
|
-
}), w = c(() => p.value.enabled !== !1), T = c(() => new Set(p.value.hiddenActions ?? [])), E = c(() =>
|
|
1743
|
-
function
|
|
1835
|
+
}), w = c(() => p.value.enabled !== !1), T = c(() => new Set(p.value.hiddenActions ?? [])), E = c(() => Cr(m.value)), ee = c(() => Cr(h.value) ?? "240px"), D = c(() => O("finder") && (a.value || b.value.length >= v.value)), te = c(() => D.value || w.value && S.value !== void 0 || !!i.extra);
|
|
1836
|
+
function O(e) {
|
|
1744
1837
|
return e === "add" ? d.value.add === !0 : e === "pin" || e === "drag" ? d.value[e] === !0 : d.value[e] !== !1;
|
|
1745
1838
|
}
|
|
1746
|
-
function
|
|
1839
|
+
function k(e) {
|
|
1747
1840
|
return y.value.find((t) => N(t.key) === String(e))?.key;
|
|
1748
1841
|
}
|
|
1749
1842
|
return {
|
|
1750
|
-
actionsVisible:
|
|
1843
|
+
actionsVisible: te,
|
|
1751
1844
|
activeKey: x,
|
|
1752
1845
|
activeTab: S,
|
|
1753
1846
|
contextMenu: p,
|
|
1754
1847
|
density: l,
|
|
1755
|
-
featureEnabled:
|
|
1848
|
+
featureEnabled: O,
|
|
1756
1849
|
features: d,
|
|
1757
1850
|
finderThreshold: v,
|
|
1758
1851
|
finderVisible: D,
|
|
1759
1852
|
hiddenMenuActions: T,
|
|
1760
|
-
keyFromNativeName:
|
|
1853
|
+
keyFromNativeName: k,
|
|
1761
1854
|
locale: f,
|
|
1762
1855
|
maxTabWidth: h,
|
|
1763
1856
|
maxWidth: ee,
|
|
@@ -1773,11 +1866,11 @@ function or(e) {
|
|
|
1773
1866
|
variant: s
|
|
1774
1867
|
};
|
|
1775
1868
|
}
|
|
1776
|
-
function
|
|
1869
|
+
function Cr(e) {
|
|
1777
1870
|
return typeof e == "number" ? `${e}px` : e;
|
|
1778
1871
|
}
|
|
1779
1872
|
// src/composables/useOgTabsNativeBridge.ts
|
|
1780
|
-
function
|
|
1873
|
+
function wr(e) {
|
|
1781
1874
|
let t = c(() => {
|
|
1782
1875
|
let t = {}, n = e.props.ogTabsEvents;
|
|
1783
1876
|
n?.tabClick && (t.onTabClick = (e, t) => n.tabClick?.(r(e), t)), n?.tabChange && (t.onTabChange = (t) => n.tabChange?.(e.keyFromNativeName(t))), t.onEdit = (t, r) => {
|
|
@@ -1790,7 +1883,7 @@ function cr(e) {
|
|
|
1790
1883
|
}, n?.tabRemove && (t.onTabRemove = (t) => n.tabRemove?.(e.keyFromNativeName(t)));
|
|
1791
1884
|
let i = Object.fromEntries(Object.entries(e.attrs).filter(([e]) => /^on[A-Z]/u.test(e) && e !== "onUpdate:modelValue")), a = Object.fromEntries(Object.entries(e.attrs).filter(([e]) => e === "role" || e === "title"));
|
|
1792
1885
|
return {
|
|
1793
|
-
...me
|
|
1886
|
+
...he(me.props, [
|
|
1794
1887
|
e.globalConfig?.nativeProps,
|
|
1795
1888
|
e.attrs,
|
|
1796
1889
|
e.props
|
|
@@ -1830,7 +1923,7 @@ function cr(e) {
|
|
|
1830
1923
|
};
|
|
1831
1924
|
}
|
|
1832
1925
|
// src/actionPresentation.ts
|
|
1833
|
-
function
|
|
1926
|
+
function Tr(e) {
|
|
1834
1927
|
return [
|
|
1835
1928
|
{
|
|
1836
1929
|
operation: "refresh",
|
|
@@ -1847,10 +1940,10 @@ function lr(e) {
|
|
|
1847
1940
|
].filter((t) => !(e.hidden.has(t.operation) || t.operation === "refresh" && e.features.refresh === !1 || (t.operation === "pin" || t.operation === "unpin") && e.features.pin !== !0 || t.operation === "move-top" && e.features.drag !== !0));
|
|
1848
1941
|
}
|
|
1849
1942
|
// src/composables/useOgTabsContextMenu.ts
|
|
1850
|
-
function
|
|
1943
|
+
function Er(e) {
|
|
1851
1944
|
return e === "close" ? "current" : e.replace("close-", "");
|
|
1852
1945
|
}
|
|
1853
|
-
function
|
|
1946
|
+
function Dr(e) {
|
|
1854
1947
|
let t = E(), n = E({
|
|
1855
1948
|
x: 0,
|
|
1856
1949
|
y: 0
|
|
@@ -1889,7 +1982,7 @@ function dr(e) {
|
|
|
1889
1982
|
};
|
|
1890
1983
|
function f(t, n) {
|
|
1891
1984
|
if (t.startsWith("close")) {
|
|
1892
|
-
e.requestCloseScope(
|
|
1985
|
+
e.requestCloseScope(Er(t), n, "menu");
|
|
1893
1986
|
return;
|
|
1894
1987
|
}
|
|
1895
1988
|
let r = d[t];
|
|
@@ -1903,56 +1996,61 @@ function dr(e) {
|
|
|
1903
1996
|
menuItems: c(() => {
|
|
1904
1997
|
let n = t.value;
|
|
1905
1998
|
if (!n) return [];
|
|
1906
|
-
let r = [
|
|
1999
|
+
let r = e.orderedTabs.value, i = /* @__PURE__ */ new Map([
|
|
2000
|
+
["close-others", qe(r, n.key, "others")],
|
|
2001
|
+
["close-left", qe(r, n.key, "left")],
|
|
2002
|
+
["close-right", qe(r, n.key, "right")],
|
|
2003
|
+
["close-all", qe(r, n.key, "all")]
|
|
2004
|
+
]), a = [
|
|
1907
2005
|
{
|
|
1908
2006
|
operation: "refresh",
|
|
1909
2007
|
label: e.locale.value.refresh,
|
|
1910
|
-
icon:
|
|
2008
|
+
icon: Ce
|
|
1911
2009
|
},
|
|
1912
2010
|
{
|
|
1913
2011
|
operation: "close",
|
|
1914
2012
|
label: e.locale.value.close,
|
|
1915
|
-
icon:
|
|
2013
|
+
icon: be,
|
|
1916
2014
|
dividerBefore: !0
|
|
1917
2015
|
},
|
|
1918
2016
|
{
|
|
1919
2017
|
operation: "close-others",
|
|
1920
2018
|
label: e.locale.value.closeOthers,
|
|
1921
|
-
icon:
|
|
2019
|
+
icon: be
|
|
1922
2020
|
},
|
|
1923
2021
|
{
|
|
1924
2022
|
operation: "close-left",
|
|
1925
2023
|
label: e.locale.value.closeLeft,
|
|
1926
|
-
icon:
|
|
2024
|
+
icon: be
|
|
1927
2025
|
},
|
|
1928
2026
|
{
|
|
1929
2027
|
operation: "close-right",
|
|
1930
2028
|
label: e.locale.value.closeRight,
|
|
1931
|
-
icon:
|
|
2029
|
+
icon: be
|
|
1932
2030
|
},
|
|
1933
2031
|
{
|
|
1934
2032
|
operation: "close-all",
|
|
1935
2033
|
label: e.locale.value.closeAll,
|
|
1936
|
-
icon:
|
|
2034
|
+
icon: be
|
|
1937
2035
|
},
|
|
1938
2036
|
{
|
|
1939
2037
|
operation: n.pinned ? "unpin" : "pin",
|
|
1940
2038
|
label: n.pinned ? e.locale.value.unpin : e.locale.value.pin,
|
|
1941
|
-
icon:
|
|
2039
|
+
icon: xe,
|
|
1942
2040
|
dividerBefore: !0
|
|
1943
2041
|
},
|
|
1944
2042
|
{
|
|
1945
2043
|
operation: "move-top",
|
|
1946
2044
|
label: e.locale.value.moveTop,
|
|
1947
|
-
icon:
|
|
2045
|
+
icon: Te,
|
|
1948
2046
|
dividerBefore: !0
|
|
1949
2047
|
},
|
|
1950
2048
|
{
|
|
1951
2049
|
operation: "move-bottom",
|
|
1952
2050
|
label: e.locale.value.moveBottom,
|
|
1953
|
-
icon:
|
|
2051
|
+
icon: _e
|
|
1954
2052
|
}
|
|
1955
|
-
],
|
|
2053
|
+
], o = new Set(Tr({
|
|
1956
2054
|
hidden: e.hiddenMenuActions.value,
|
|
1957
2055
|
features: e.features.value,
|
|
1958
2056
|
labels: {
|
|
@@ -1962,12 +2060,12 @@ function dr(e) {
|
|
|
1962
2060
|
},
|
|
1963
2061
|
pinned: n.pinned === !0
|
|
1964
2062
|
}).map((e) => e.operation));
|
|
1965
|
-
return
|
|
1966
|
-
let n =
|
|
2063
|
+
return a.filter((t) => {
|
|
2064
|
+
let n = o.has(t.operation) || t.operation !== "refresh" && t.operation !== "pin" && t.operation !== "unpin" && t.operation !== "move-top", r = t.operation !== "move-bottom" || e.featureEnabled("drag");
|
|
1967
2065
|
return n && r && !e.hiddenMenuActions.value.has(t.operation);
|
|
1968
2066
|
}).map((t) => ({
|
|
1969
2067
|
...t,
|
|
1970
|
-
disabled: e.deniedReason(t.operation, n) !== void 0
|
|
2068
|
+
disabled: e.deniedReason(t.operation, n, i.get(t.operation)) !== void 0
|
|
1971
2069
|
}));
|
|
1972
2070
|
}),
|
|
1973
2071
|
menuPosition: n,
|
|
@@ -1982,7 +2080,7 @@ function dr(e) {
|
|
|
1982
2080
|
};
|
|
1983
2081
|
}
|
|
1984
2082
|
// src/composables/useOgTabsKeyboard.ts
|
|
1985
|
-
function
|
|
2083
|
+
function Or(e) {
|
|
1986
2084
|
return (t) => {
|
|
1987
2085
|
if (!e.enabled()) return;
|
|
1988
2086
|
let n = null;
|
|
@@ -2001,8 +2099,8 @@ function fr(e) {
|
|
|
2001
2099
|
};
|
|
2002
2100
|
}
|
|
2003
2101
|
// src/composables/useOgTabsUiInteractions.ts
|
|
2004
|
-
function
|
|
2005
|
-
let t =
|
|
2102
|
+
function kr(e) {
|
|
2103
|
+
let t = Dr({
|
|
2006
2104
|
activeTab: e.activeTab,
|
|
2007
2105
|
controller: e.controller,
|
|
2008
2106
|
deniedReason: e.deniedReason,
|
|
@@ -2011,8 +2109,9 @@ function pr(e) {
|
|
|
2011
2109
|
hiddenMenuActions: e.hiddenMenuActions,
|
|
2012
2110
|
locale: e.locale,
|
|
2013
2111
|
menuEnabled: e.menuEnabled,
|
|
2112
|
+
orderedTabs: e.orderedTabs,
|
|
2014
2113
|
requestCloseScope: e.requestCloseScope
|
|
2015
|
-
}), n =
|
|
2114
|
+
}), n = Or({
|
|
2016
2115
|
activate: e.activate,
|
|
2017
2116
|
close: e.close,
|
|
2018
2117
|
enabled: () => e.featureEnabled("keyboard"),
|
|
@@ -2026,8 +2125,8 @@ function pr(e) {
|
|
|
2026
2125
|
};
|
|
2027
2126
|
}
|
|
2028
2127
|
// src/composables/useTabsNavState.ts
|
|
2029
|
-
function
|
|
2030
|
-
let n =
|
|
2128
|
+
function Ar(e, t) {
|
|
2129
|
+
let n = O(!1), r, i, a = 0, o = !1;
|
|
2031
2130
|
function s() {
|
|
2032
2131
|
if (o) return;
|
|
2033
2132
|
let e = t.value, r = e?.parentElement;
|
|
@@ -2054,7 +2153,7 @@ function mr(e, t) {
|
|
|
2054
2153
|
function d(t) {
|
|
2055
2154
|
y(() => e.value?.querySelector(`[data-tab-id="${t}"]`)?.closest("[role=\"tab\"]")?.focus());
|
|
2056
2155
|
}
|
|
2057
|
-
return
|
|
2156
|
+
return se([e, t], u, {
|
|
2058
2157
|
immediate: !0,
|
|
2059
2158
|
flush: "post"
|
|
2060
2159
|
}), C(() => {
|
|
@@ -2065,14 +2164,14 @@ function mr(e, t) {
|
|
|
2065
2164
|
};
|
|
2066
2165
|
}
|
|
2067
2166
|
// src/composables/useOgTabsRuntime.ts
|
|
2068
|
-
function
|
|
2069
|
-
let t = c(() => e.surface.value?.getRootElement() ?? null), n = c(() => e.surface.value?.getNativeTabs()), r = c(() => n.value?.tabNavRef?.tabListRef ?? null), i =
|
|
2167
|
+
function jr(e) {
|
|
2168
|
+
let t = c(() => e.surface.value?.getRootElement() ?? null), n = c(() => e.surface.value?.getNativeTabs()), r = c(() => n.value?.tabNavRef?.tabListRef ?? null), i = Ar(t, r), a = Sr({
|
|
2070
2169
|
assertUnique: e.assertUnique,
|
|
2071
2170
|
globalConfig: e.globalConfig,
|
|
2072
2171
|
navOverflowed: i.overflowed,
|
|
2073
2172
|
props: e.props,
|
|
2074
2173
|
slots: e.slots
|
|
2075
|
-
}), o = () => {}, s =
|
|
2174
|
+
}), o = () => {}, s = wr({
|
|
2076
2175
|
attrs: e.attrs,
|
|
2077
2176
|
featureEnabled: a.featureEnabled,
|
|
2078
2177
|
globalConfig: e.globalConfig,
|
|
@@ -2081,13 +2180,13 @@ function hr(e) {
|
|
|
2081
2180
|
props: e.props,
|
|
2082
2181
|
requestNativeAdd: () => o(),
|
|
2083
2182
|
tabs: a.tabs
|
|
2084
|
-
}), l =
|
|
2183
|
+
}), l = ke({
|
|
2085
2184
|
activeKey: a.activeKey,
|
|
2086
2185
|
emit: e.emit,
|
|
2087
2186
|
props: e.props,
|
|
2088
2187
|
root: t,
|
|
2089
2188
|
tabs: a.tabs
|
|
2090
|
-
}), u =
|
|
2189
|
+
}), u = ht({
|
|
2091
2190
|
activeKey: a.activeKey,
|
|
2092
2191
|
emit: e.emit,
|
|
2093
2192
|
featureEnabled: a.featureEnabled,
|
|
@@ -2102,7 +2201,7 @@ function hr(e) {
|
|
|
2102
2201
|
o = () => {
|
|
2103
2202
|
u.controller.requestAdd("native");
|
|
2104
2203
|
};
|
|
2105
|
-
let d =
|
|
2204
|
+
let d = kr({
|
|
2106
2205
|
activeTab: a.activeTab,
|
|
2107
2206
|
activate: u.activate,
|
|
2108
2207
|
close: u.requestClose,
|
|
@@ -2117,7 +2216,7 @@ function hr(e) {
|
|
|
2117
2216
|
orderedTabs: a.orderedTabs,
|
|
2118
2217
|
requestCloseScope: u.requestCloseScope
|
|
2119
2218
|
});
|
|
2120
|
-
return
|
|
2219
|
+
return xr({
|
|
2121
2220
|
activeKey: a.activeKey,
|
|
2122
2221
|
controller: u.controller,
|
|
2123
2222
|
emitActiveKey: e.emit.updateModelValue,
|
|
@@ -2138,11 +2237,11 @@ function hr(e) {
|
|
|
2138
2237
|
};
|
|
2139
2238
|
}
|
|
2140
2239
|
// src/components/tabs/OgTabsContextMenu.vue?vue&type=script&setup=true&lang.ts
|
|
2141
|
-
var
|
|
2240
|
+
var Mr = {
|
|
2142
2241
|
key: 0,
|
|
2143
2242
|
class: "og-tabs-context-menu__divider",
|
|
2144
2243
|
role: "separator"
|
|
2145
|
-
},
|
|
2244
|
+
}, Nr = ["disabled", "onClick"], Pr = /*@__PURE__*/ g({
|
|
2146
2245
|
__name: "OgTabsContextMenu",
|
|
2147
2246
|
props: {
|
|
2148
2247
|
visible: { type: Boolean },
|
|
@@ -2156,7 +2255,7 @@ var gr = {
|
|
|
2156
2255
|
"reposition"
|
|
2157
2256
|
],
|
|
2158
2257
|
setup(e, { emit: t }) {
|
|
2159
|
-
let n = e, r = t, i =
|
|
2258
|
+
let n = e, r = t, i = ae("menu");
|
|
2160
2259
|
function s() {
|
|
2161
2260
|
r("close");
|
|
2162
2261
|
}
|
|
@@ -2181,7 +2280,7 @@ var gr = {
|
|
|
2181
2280
|
"End"
|
|
2182
2281
|
].includes(e.key) && (e.preventDefault(), t[e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : (n + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus());
|
|
2183
2282
|
}
|
|
2184
|
-
return
|
|
2283
|
+
return se(() => n.visible, (e) => {
|
|
2185
2284
|
e && y(p);
|
|
2186
2285
|
}), w(() => window.addEventListener("pointerdown", m)), C(() => window.removeEventListener("pointerdown", m)), (t, n) => (T(), l(o, { to: "body" }, [e.visible ? (T(), d("div", {
|
|
2187
2286
|
key: 0,
|
|
@@ -2193,40 +2292,40 @@ var gr = {
|
|
|
2193
2292
|
top: `${e.y}px`
|
|
2194
2293
|
}),
|
|
2195
2294
|
role: "menu",
|
|
2196
|
-
onContextmenu: n[0] ||=
|
|
2295
|
+
onContextmenu: n[0] ||= le(() => {}, ["prevent"]),
|
|
2197
2296
|
onKeydown: h
|
|
2198
2297
|
}, [
|
|
2199
2298
|
D(t.$slots, "top", {}, void 0, !0),
|
|
2200
|
-
(T(!0), d(a, null, ee(e.items, (e) => (T(), d(a, { key: e.operation }, [e.dividerBefore ? (T(), d("div",
|
|
2299
|
+
(T(!0), d(a, null, ee(e.items, (e) => (T(), d(a, { key: e.operation }, [e.dividerBefore ? (T(), d("div", Mr)) : u("", !0), f("button", {
|
|
2201
2300
|
type: "button",
|
|
2202
2301
|
role: "menuitem",
|
|
2203
2302
|
disabled: e.disabled,
|
|
2204
|
-
onClick:
|
|
2205
|
-
}, [e.icon ? (T(), l(
|
|
2303
|
+
onClick: le((n) => t.$emit("select", e.operation), ["stop"])
|
|
2304
|
+
}, [e.icon ? (T(), l(A(de), {
|
|
2206
2305
|
key: 0,
|
|
2207
2306
|
"aria-hidden": "true"
|
|
2208
2307
|
}, {
|
|
2209
|
-
default:
|
|
2308
|
+
default: j(() => [(T(), l(te(e.icon)))]),
|
|
2210
2309
|
_: 2
|
|
2211
|
-
}, 1024)) : u("", !0), f("span", null,
|
|
2310
|
+
}, 1024)) : u("", !0), f("span", null, k(e.label), 1)], 8, Nr)], 64))), 128)),
|
|
2212
2311
|
D(t.$slots, "bottom", {}, void 0, !0)
|
|
2213
2312
|
], 36)) : u("", !0)]));
|
|
2214
2313
|
}
|
|
2215
|
-
}),
|
|
2314
|
+
}), Fr = (e, t) => {
|
|
2216
2315
|
let n = e.__vccOpts || e;
|
|
2217
2316
|
for (let [e, r] of t) n[e] = r;
|
|
2218
2317
|
return n;
|
|
2219
|
-
},
|
|
2318
|
+
}, Ir = /*#__PURE__*/ Fr(Pr, [["__scopeId", "data-v-0cada8a2"]]), Lr = ["aria-label"], Rr = { class: "og-tabs-finder__content" }, zr = [
|
|
2220
2319
|
"aria-expanded",
|
|
2221
2320
|
"aria-controls",
|
|
2222
2321
|
"aria-activedescendant",
|
|
2223
2322
|
"placeholder"
|
|
2224
|
-
],
|
|
2323
|
+
], Br = ["id", "aria-label"], Vr = [
|
|
2225
2324
|
"id",
|
|
2226
2325
|
"aria-selected",
|
|
2227
2326
|
"disabled",
|
|
2228
2327
|
"onClick"
|
|
2229
|
-
],
|
|
2328
|
+
], Hr = { class: "og-tabs-finder__label" }, Ur = { class: "og-tabs-finder__title" }, Wr = ["aria-label"], Gr = /*#__PURE__*/ Fr(/* @__PURE__ */ g({
|
|
2230
2329
|
__name: "OgTabsFinder",
|
|
2231
2330
|
props: {
|
|
2232
2331
|
tabs: {},
|
|
@@ -2235,9 +2334,9 @@ var gr = {
|
|
|
2235
2334
|
},
|
|
2236
2335
|
emits: ["activate"],
|
|
2237
2336
|
setup(e, { emit: t }) {
|
|
2238
|
-
let n = e, r = t, i =
|
|
2337
|
+
let n = e, r = t, i = O(!1), o = O(""), s = O(-1), p = re(), m = re(), g = ae("input"), _ = c(() => Re(n.tabs, o.value)), v = c(() => _.value.filter((e) => !e.disabled)), x = c(() => v.value[s.value]), S = c(() => _.value.length > 0);
|
|
2239
2338
|
function C(e) {
|
|
2240
|
-
return `og-tabs-finder-option-${m}-${
|
|
2339
|
+
return `og-tabs-finder-option-${m}-${N(e.key)}`;
|
|
2241
2340
|
}
|
|
2242
2341
|
function w(e) {
|
|
2243
2342
|
let t = v.value.length;
|
|
@@ -2263,29 +2362,29 @@ var gr = {
|
|
|
2263
2362
|
function D(e) {
|
|
2264
2363
|
i.value = !1, r("activate", e);
|
|
2265
2364
|
}
|
|
2266
|
-
function
|
|
2365
|
+
function te() {
|
|
2267
2366
|
g.value?.focus();
|
|
2268
2367
|
}
|
|
2269
|
-
return
|
|
2270
|
-
e && !n && (o.value = "", s.value = -1, y(
|
|
2271
|
-
}, { flush: "sync" }), (t, n) => (T(), l(
|
|
2368
|
+
return se([i, v], ([e, t], [n]) => {
|
|
2369
|
+
e && !n && (o.value = "", s.value = -1, y(te)), s.value >= t.length && (s.value = t.length - 1);
|
|
2370
|
+
}, { flush: "sync" }), (t, n) => (T(), l(A(fe), {
|
|
2272
2371
|
visible: i.value,
|
|
2273
2372
|
"onUpdate:visible": n[1] ||= (e) => i.value = e,
|
|
2274
2373
|
trigger: "click",
|
|
2275
2374
|
placement: "bottom-end",
|
|
2276
2375
|
width: 320,
|
|
2277
2376
|
"popper-class": "og-tabs-finder",
|
|
2278
|
-
onAfterEnter:
|
|
2377
|
+
onAfterEnter: te
|
|
2279
2378
|
}, {
|
|
2280
|
-
reference:
|
|
2379
|
+
reference: j(() => [f("button", {
|
|
2281
2380
|
type: "button",
|
|
2282
2381
|
class: "og-tabs__action",
|
|
2283
2382
|
"aria-label": e.locale.findTabs
|
|
2284
|
-
}, [h(
|
|
2285
|
-
default:
|
|
2383
|
+
}, [h(A(de), { "aria-hidden": "true" }, {
|
|
2384
|
+
default: j(() => [h(A(we))]),
|
|
2286
2385
|
_: 1
|
|
2287
|
-
})], 8,
|
|
2288
|
-
default:
|
|
2386
|
+
})], 8, Lr)]),
|
|
2387
|
+
default: j(() => [f("div", Rr, [ce(f("input", {
|
|
2289
2388
|
ref_key: "input",
|
|
2290
2389
|
ref: g,
|
|
2291
2390
|
"onUpdate:modelValue": n[0] ||= (e) => o.value = e,
|
|
@@ -2294,30 +2393,30 @@ var gr = {
|
|
|
2294
2393
|
"aria-autocomplete": "list",
|
|
2295
2394
|
"aria-haspopup": "listbox",
|
|
2296
2395
|
"aria-expanded": i.value,
|
|
2297
|
-
"aria-controls": S.value ?
|
|
2396
|
+
"aria-controls": S.value ? A(p) : void 0,
|
|
2298
2397
|
"aria-activedescendant": x.value ? C(x.value) : void 0,
|
|
2299
2398
|
placeholder: e.locale.findTabsPlaceholder,
|
|
2300
2399
|
onKeydown: E
|
|
2301
|
-
}, null, 40,
|
|
2400
|
+
}, null, 40, zr), [[oe, o.value]]), S.value ? (T(), d("div", {
|
|
2302
2401
|
key: 0,
|
|
2303
|
-
id:
|
|
2402
|
+
id: A(p),
|
|
2304
2403
|
class: "og-tabs-finder__list",
|
|
2305
2404
|
role: "listbox",
|
|
2306
2405
|
"aria-label": e.locale.findTabs
|
|
2307
2406
|
}, [(T(!0), d(a, null, ee(_.value, (t) => (T(), d("button", {
|
|
2308
2407
|
id: C(t),
|
|
2309
|
-
key:
|
|
2408
|
+
key: A(N)(t.key),
|
|
2310
2409
|
type: "button",
|
|
2311
2410
|
role: "option",
|
|
2312
2411
|
"aria-selected": t.key === e.activeKey,
|
|
2313
2412
|
class: b({ "is-active": t.key === x.value?.key }),
|
|
2314
2413
|
disabled: t.disabled,
|
|
2315
2414
|
onClick: (e) => D(t.key)
|
|
2316
|
-
}, [f("span",
|
|
2415
|
+
}, [f("span", Hr, [f("span", Ur, k(t.label), 1), t.dirty ? (T(), d("span", {
|
|
2317
2416
|
key: 0,
|
|
2318
2417
|
class: "og-tabs-finder__dirty",
|
|
2319
2418
|
"aria-label": e.locale.unsaved
|
|
2320
|
-
}, null, 8,
|
|
2419
|
+
}, null, 8, Wr)) : u("", !0)])], 10, Vr))), 128))], 8, Br)) : (T(), l(A(ue), {
|
|
2321
2420
|
key: 1,
|
|
2322
2421
|
description: e.locale.noResults,
|
|
2323
2422
|
"image-size": 56
|
|
@@ -2325,14 +2424,14 @@ var gr = {
|
|
|
2325
2424
|
_: 1
|
|
2326
2425
|
}, 8, ["visible"]));
|
|
2327
2426
|
}
|
|
2328
|
-
}), [["__scopeId", "data-v-
|
|
2427
|
+
}), [["__scopeId", "data-v-8bb165de"]]), Kr = [
|
|
2329
2428
|
"data-tab-key",
|
|
2330
2429
|
"data-tab-id",
|
|
2331
2430
|
"title"
|
|
2332
|
-
],
|
|
2431
|
+
], qr = { class: "og-tabs-label__text" }, Jr = ["aria-label"], Yr = { class: "og-tabs-sr-only" }, Xr = ["aria-label"], Zr = {
|
|
2333
2432
|
key: 3,
|
|
2334
2433
|
class: "og-tabs-label__badge"
|
|
2335
|
-
},
|
|
2434
|
+
}, Qr = /*#__PURE__*/ Fr(/* @__PURE__ */ g({
|
|
2336
2435
|
__name: "OgTabsLabel",
|
|
2337
2436
|
props: {
|
|
2338
2437
|
tab: {},
|
|
@@ -2345,7 +2444,7 @@ var gr = {
|
|
|
2345
2444
|
return (t, n) => (T(), d("span", {
|
|
2346
2445
|
class: "og-tabs-label",
|
|
2347
2446
|
"data-tab-key": String(e.tab.key),
|
|
2348
|
-
"data-tab-id":
|
|
2447
|
+
"data-tab-id": A(N)(e.tab.key),
|
|
2349
2448
|
style: S({
|
|
2350
2449
|
minWidth: e.minWidth,
|
|
2351
2450
|
maxWidth: e.maxWidth
|
|
@@ -2353,57 +2452,57 @@ var gr = {
|
|
|
2353
2452
|
title: e.tab.remark ? `${e.tab.label}\n${e.tab.remark}` : e.tab.label
|
|
2354
2453
|
}, [
|
|
2355
2454
|
D(t.$slots, "before", { tab: e.tab }, void 0, !0),
|
|
2356
|
-
e.tab.icon ? (T(), l(
|
|
2455
|
+
e.tab.icon ? (T(), l(A(de), {
|
|
2357
2456
|
key: 0,
|
|
2358
2457
|
class: "og-tabs-label__icon",
|
|
2359
2458
|
"aria-hidden": "true"
|
|
2360
2459
|
}, {
|
|
2361
|
-
default:
|
|
2460
|
+
default: j(() => [(T(), l(te(e.tab.icon)))]),
|
|
2362
2461
|
_: 1
|
|
2363
2462
|
})) : u("", !0),
|
|
2364
|
-
e.tab.pinned ? (T(), l(
|
|
2463
|
+
e.tab.pinned ? (T(), l(A(de), {
|
|
2365
2464
|
key: 1,
|
|
2366
2465
|
class: "og-tabs-label__pin",
|
|
2367
2466
|
"aria-label": e.locale.pinned
|
|
2368
2467
|
}, {
|
|
2369
|
-
default:
|
|
2468
|
+
default: j(() => [h(A(xe))]),
|
|
2370
2469
|
_: 1
|
|
2371
2470
|
}, 8, ["aria-label"])) : u("", !0),
|
|
2372
|
-
f("span",
|
|
2471
|
+
f("span", qr, [D(t.$slots, "default", {
|
|
2373
2472
|
tab: e.tab,
|
|
2374
2473
|
active: e.active
|
|
2375
|
-
}, () => [m(
|
|
2474
|
+
}, () => [m(k(e.tab.label), 1)], !0)]),
|
|
2376
2475
|
e.tab.dirty ? (T(), d("span", {
|
|
2377
2476
|
key: 2,
|
|
2378
2477
|
class: "og-tabs-label__dirty",
|
|
2379
2478
|
"aria-label": e.locale.unsaved
|
|
2380
|
-
}, [f("span",
|
|
2381
|
-
D(t.$slots, "status", { tab: e.tab }, () => [e.tab.statusIcon || e.tab.status === "success" || e.tab.status === "warning" || e.tab.status === "error" ? (T(), l(
|
|
2479
|
+
}, [f("span", Yr, k(e.locale.unsaved), 1)], 8, Jr)) : u("", !0),
|
|
2480
|
+
D(t.$slots, "status", { tab: e.tab }, () => [e.tab.statusIcon || e.tab.status === "success" || e.tab.status === "warning" || e.tab.status === "error" ? (T(), l(A(de), {
|
|
2382
2481
|
key: 0,
|
|
2383
2482
|
class: b(["og-tabs-label__status", [`is-${e.tab.status}`]]),
|
|
2384
2483
|
"aria-hidden": "true"
|
|
2385
2484
|
}, {
|
|
2386
|
-
default:
|
|
2485
|
+
default: j(() => [(T(), l(te(e.tab.statusIcon || (e.tab.status === "success" ? A(ve) : e.tab.status === "error" ? A(ye) : A(Ee)))))]),
|
|
2387
2486
|
_: 1
|
|
2388
2487
|
}, 8, ["class"])) : e.tab.status === "loading" ? (T(), d("span", {
|
|
2389
2488
|
key: 1,
|
|
2390
2489
|
class: "og-tabs-label__loading",
|
|
2391
2490
|
"aria-label": e.locale.loading
|
|
2392
|
-
}, null, 8,
|
|
2393
|
-
e.tab.badge === void 0 ? u("", !0) : (T(), d("span",
|
|
2491
|
+
}, null, 8, Xr)) : u("", !0)], !0),
|
|
2492
|
+
e.tab.badge === void 0 ? u("", !0) : (T(), d("span", Zr, k(e.tab.badge), 1)),
|
|
2394
2493
|
D(t.$slots, "after", { tab: e.tab }, void 0, !0)
|
|
2395
|
-
], 12,
|
|
2494
|
+
], 12, Kr));
|
|
2396
2495
|
}
|
|
2397
|
-
}), [["__scopeId", "data-v-506f42f5"]]),
|
|
2496
|
+
}), [["__scopeId", "data-v-506f42f5"]]), $r = ["aria-busy"], ei = {
|
|
2398
2497
|
key: 0,
|
|
2399
2498
|
class: "og-tabs__header"
|
|
2400
|
-
},
|
|
2499
|
+
}, ti = {
|
|
2401
2500
|
key: 1,
|
|
2402
2501
|
class: "og-tabs__empty"
|
|
2403
|
-
},
|
|
2502
|
+
}, ni = {
|
|
2404
2503
|
key: 0,
|
|
2405
2504
|
class: "og-tabs__actions"
|
|
2406
|
-
},
|
|
2505
|
+
}, ri = ["aria-label"], ii = /* @__PURE__ */ g({
|
|
2407
2506
|
__name: "OgTabsSurface",
|
|
2408
2507
|
props: {
|
|
2409
2508
|
rootAttrs: {},
|
|
@@ -2443,7 +2542,7 @@ var gr = {
|
|
|
2443
2542
|
canClose: { type: Function }
|
|
2444
2543
|
},
|
|
2445
2544
|
setup(e, { expose: t }) {
|
|
2446
|
-
let n =
|
|
2545
|
+
let n = ie(), r = ae("tabsRoot"), i = ae("nativeTabs");
|
|
2447
2546
|
return t({
|
|
2448
2547
|
getRootElement: () => r.value ?? void 0,
|
|
2449
2548
|
getNativeTabs: () => i.value ?? void 0
|
|
@@ -2469,11 +2568,11 @@ var gr = {
|
|
|
2469
2568
|
"aria-busy": e.busy || e.pending,
|
|
2470
2569
|
onKeydown: o[2] ||= (...t) => e.onKeydown && e.onKeydown(...t)
|
|
2471
2570
|
}), [
|
|
2472
|
-
n.header ? (T(), d("div",
|
|
2473
|
-
e.showEmpty ? (T(), d("div",
|
|
2571
|
+
n.header ? (T(), d("div", ei, [D(t.$slots, "header")])) : u("", !0),
|
|
2572
|
+
e.showEmpty ? (T(), d("div", ti, [D(t.$slots, "empty", {}, () => [m(k(e.locale.empty), 1)])])) : (T(), d("div", {
|
|
2474
2573
|
key: 2,
|
|
2475
2574
|
class: b(["og-tabs__bar", { "has-actions": e.actionsVisible }])
|
|
2476
|
-
}, [h(
|
|
2575
|
+
}, [h(A(me), v({
|
|
2477
2576
|
ref_key: "nativeTabs",
|
|
2478
2577
|
ref: i
|
|
2479
2578
|
}, e.nativeBindings, {
|
|
@@ -2483,14 +2582,14 @@ var gr = {
|
|
|
2483
2582
|
onTabChange: e.onNativeTabChange,
|
|
2484
2583
|
onTabRemove: e.onNativeTabRemove
|
|
2485
2584
|
}), {
|
|
2486
|
-
default:
|
|
2487
|
-
key:
|
|
2488
|
-
name:
|
|
2585
|
+
default: j(() => [(T(!0), d(a, null, ee(e.orderedTabs, (n) => (T(), l(A(pe), {
|
|
2586
|
+
key: A(N)(n.key),
|
|
2587
|
+
name: A(N)(n.key),
|
|
2489
2588
|
disabled: n.disabled === !0,
|
|
2490
2589
|
closable: e.canClose(n),
|
|
2491
2590
|
lazy: n.lazy === !0
|
|
2492
2591
|
}, {
|
|
2493
|
-
label:
|
|
2592
|
+
label: j(() => [h(Qr, {
|
|
2494
2593
|
tab: n,
|
|
2495
2594
|
active: n.key === e.activeKey,
|
|
2496
2595
|
"min-width": e.minWidth,
|
|
@@ -2498,10 +2597,10 @@ var gr = {
|
|
|
2498
2597
|
locale: e.locale,
|
|
2499
2598
|
onContextmenu: (t) => e.onContextMenu(t, n)
|
|
2500
2599
|
}, {
|
|
2501
|
-
default:
|
|
2502
|
-
before:
|
|
2503
|
-
after:
|
|
2504
|
-
status:
|
|
2600
|
+
default: j((e) => [D(t.$slots, "label", v({ ref_for: !0 }, e))]),
|
|
2601
|
+
before: j((e) => [D(t.$slots, "tabBefore", v({ ref_for: !0 }, e))]),
|
|
2602
|
+
after: j((e) => [D(t.$slots, "tabAfter", v({ ref_for: !0 }, e))]),
|
|
2603
|
+
status: j((e) => [D(t.$slots, "status", v({ ref_for: !0 }, e))]),
|
|
2505
2604
|
_: 3
|
|
2506
2605
|
}, 8, [
|
|
2507
2606
|
"tab",
|
|
@@ -2511,7 +2610,7 @@ var gr = {
|
|
|
2511
2610
|
"locale",
|
|
2512
2611
|
"onContextmenu"
|
|
2513
2612
|
])]),
|
|
2514
|
-
default:
|
|
2613
|
+
default: j(() => [e.renderContent && n.key === e.activeKey ? D(t.$slots, "default", {
|
|
2515
2614
|
tab: n,
|
|
2516
2615
|
active: !0
|
|
2517
2616
|
}, void 0, void 0, 0) : u("", !0)]),
|
|
@@ -2528,8 +2627,8 @@ var gr = {
|
|
|
2528
2627
|
"onTabClick",
|
|
2529
2628
|
"onTabChange",
|
|
2530
2629
|
"onTabRemove"
|
|
2531
|
-
]), e.actionsVisible ? (T(), d("div",
|
|
2532
|
-
e.finderVisible ? (T(), l(
|
|
2630
|
+
]), e.actionsVisible ? (T(), d("div", ni, [
|
|
2631
|
+
e.finderVisible ? (T(), l(Gr, {
|
|
2533
2632
|
key: 0,
|
|
2534
2633
|
tabs: e.orderedTabs,
|
|
2535
2634
|
"active-key": e.activeKey,
|
|
@@ -2546,13 +2645,13 @@ var gr = {
|
|
|
2546
2645
|
class: "og-tabs__action",
|
|
2547
2646
|
"aria-label": e.locale.tabActions,
|
|
2548
2647
|
onClick: o[1] ||= (...t) => e.onOpenActiveMenu && e.onOpenActiveMenu(...t)
|
|
2549
|
-
}, [h(
|
|
2550
|
-
default:
|
|
2648
|
+
}, [h(A(de), { "aria-hidden": "true" }, {
|
|
2649
|
+
default: j(() => [h(A(Se))]),
|
|
2551
2650
|
_: 1
|
|
2552
|
-
})], 8,
|
|
2651
|
+
})], 8, ri)) : u("", !0),
|
|
2553
2652
|
D(t.$slots, "extra")
|
|
2554
2653
|
])) : u("", !0)], 2)),
|
|
2555
|
-
h(
|
|
2654
|
+
h(Ir, {
|
|
2556
2655
|
visible: e.menuVisible,
|
|
2557
2656
|
x: e.menuPosition.x,
|
|
2558
2657
|
y: e.menuPosition.y,
|
|
@@ -2561,8 +2660,8 @@ var gr = {
|
|
|
2561
2660
|
onClose: e.onCloseMenu,
|
|
2562
2661
|
onReposition: e.onReposition
|
|
2563
2662
|
}, {
|
|
2564
|
-
top:
|
|
2565
|
-
bottom:
|
|
2663
|
+
top: j(() => [D(t.$slots, "contextMenuTop", x(_(e.menuContext)))]),
|
|
2664
|
+
bottom: j(() => [D(t.$slots, "contextMenuBottom", x(_(e.menuContext)))]),
|
|
2566
2665
|
_: 3
|
|
2567
2666
|
}, 8, [
|
|
2568
2667
|
"visible",
|
|
@@ -2573,13 +2672,13 @@ var gr = {
|
|
|
2573
2672
|
"onClose",
|
|
2574
2673
|
"onReposition"
|
|
2575
2674
|
])
|
|
2576
|
-
], 16,
|
|
2675
|
+
], 16, $r));
|
|
2577
2676
|
}
|
|
2578
|
-
}),
|
|
2677
|
+
}), ai = /* @__PURE__ */ g({
|
|
2579
2678
|
inheritAttrs: !1,
|
|
2580
2679
|
__name: "OgTabs",
|
|
2581
2680
|
props: {
|
|
2582
|
-
...
|
|
2681
|
+
...me.props,
|
|
2583
2682
|
modelValue: {
|
|
2584
2683
|
type: [String, Number],
|
|
2585
2684
|
default: void 0
|
|
@@ -2672,12 +2771,12 @@ var gr = {
|
|
|
2672
2771
|
"tabRemove"
|
|
2673
2772
|
],
|
|
2674
2773
|
setup(e, { expose: t, emit: n }) {
|
|
2675
|
-
let i = e, a = n, o =
|
|
2774
|
+
let i = e, a = n, o = ie(), s = i, u = c(() => s.ogBusy);
|
|
2676
2775
|
function d(e) {
|
|
2677
|
-
if (
|
|
2776
|
+
if (nt(e)) throw TypeError("[OgTabs] Duplicate tab keys are not supported.");
|
|
2678
2777
|
}
|
|
2679
2778
|
d(s.ogItems);
|
|
2680
|
-
let f = r(), m =
|
|
2779
|
+
let f = r(), m = ne(), h = ae("surface"), { actionsVisible: g, activeKey: v, activeTab: y, activate: b, beforeNativeLeave: S, closeMenu: C, controller: w, deniedReason: E, density: ee, featureEnabled: te, finderVisible: O, locale: k, maxWidth: re, menuEnabled: oe, menuItems: se, menuPosition: ce, menuTab: le, menuVisible: ue, minWidth: de, nativeBindings: fe, nativeTabs: pe, onContextMenu: me, onKeydown: he, onMenuOperation: ge, onNativeTabChange: _e, onNativeTabClick: ve, onNativeTabRemove: ye, openActiveMenu: be, orderedTabs: xe, renderContent: Se, rootAttrs: Ce, sticky: we, tabs: Te, themeColor: Ee, updateMenuPosition: M, variant: De } = jr({
|
|
2681
2780
|
assertUnique: d,
|
|
2682
2781
|
attrs: m,
|
|
2683
2782
|
emit: {
|
|
@@ -2701,71 +2800,71 @@ var gr = {
|
|
|
2701
2800
|
});
|
|
2702
2801
|
return t({
|
|
2703
2802
|
...w,
|
|
2704
|
-
getNativeTabs: () =>
|
|
2705
|
-
}), (e, t) => (T(), l(
|
|
2803
|
+
getNativeTabs: () => pe.value ?? void 0
|
|
2804
|
+
}), (e, t) => (T(), l(ii, {
|
|
2706
2805
|
ref_key: "surface",
|
|
2707
2806
|
ref: h,
|
|
2708
2807
|
"root-attrs": {
|
|
2709
|
-
...
|
|
2710
|
-
"aria-busy": u.value ||
|
|
2808
|
+
...A(Ce),
|
|
2809
|
+
"aria-busy": u.value || A(w).pending.value
|
|
2711
2810
|
},
|
|
2712
|
-
"ordered-tabs":
|
|
2713
|
-
"active-key":
|
|
2714
|
-
"active-tab":
|
|
2715
|
-
variant:
|
|
2716
|
-
density:
|
|
2717
|
-
"render-content":
|
|
2718
|
-
locale:
|
|
2719
|
-
"min-width":
|
|
2720
|
-
"max-width":
|
|
2721
|
-
"theme-color":
|
|
2722
|
-
sticky:
|
|
2723
|
-
"actions-visible":
|
|
2724
|
-
"finder-visible":
|
|
2725
|
-
"show-empty": !
|
|
2726
|
-
pending:
|
|
2811
|
+
"ordered-tabs": A(xe),
|
|
2812
|
+
"active-key": A(v),
|
|
2813
|
+
"active-tab": A(y),
|
|
2814
|
+
variant: A(De),
|
|
2815
|
+
density: A(ee),
|
|
2816
|
+
"render-content": A(Se),
|
|
2817
|
+
locale: A(k),
|
|
2818
|
+
"min-width": A(de),
|
|
2819
|
+
"max-width": A(re),
|
|
2820
|
+
"theme-color": A(Ee),
|
|
2821
|
+
sticky: A(we),
|
|
2822
|
+
"actions-visible": A(g),
|
|
2823
|
+
"finder-visible": A(O),
|
|
2824
|
+
"show-empty": !A(Te).length && !A(te)("add"),
|
|
2825
|
+
pending: A(w).pending.value,
|
|
2727
2826
|
busy: u.value === !0,
|
|
2728
|
-
"menu-enabled":
|
|
2729
|
-
"menu-visible":
|
|
2730
|
-
"menu-position":
|
|
2731
|
-
"menu-items":
|
|
2732
|
-
"native-bindings":
|
|
2827
|
+
"menu-enabled": A(oe),
|
|
2828
|
+
"menu-visible": A(ue),
|
|
2829
|
+
"menu-position": A(ce),
|
|
2830
|
+
"menu-items": A(se),
|
|
2831
|
+
"native-bindings": A(fe),
|
|
2733
2832
|
"menu-context": {
|
|
2734
2833
|
operation: "refresh",
|
|
2735
2834
|
source: "menu",
|
|
2736
|
-
tab:
|
|
2737
|
-
activeKey:
|
|
2738
|
-
activeTab:
|
|
2739
|
-
items:
|
|
2835
|
+
tab: A(le),
|
|
2836
|
+
activeKey: A(v),
|
|
2837
|
+
activeTab: A(y),
|
|
2838
|
+
items: A(Te)
|
|
2740
2839
|
},
|
|
2741
|
-
"before-native-leave":
|
|
2742
|
-
"on-keydown":
|
|
2743
|
-
"on-native-tab-click":
|
|
2744
|
-
"on-native-tab-change":
|
|
2745
|
-
"on-native-tab-remove":
|
|
2746
|
-
"on-context-menu":
|
|
2747
|
-
"on-activate":
|
|
2748
|
-
"on-open-active-menu":
|
|
2749
|
-
"on-menu-operation":
|
|
2750
|
-
"on-close-menu":
|
|
2751
|
-
"on-reposition":
|
|
2752
|
-
"can-close": (e) =>
|
|
2840
|
+
"before-native-leave": A(S),
|
|
2841
|
+
"on-keydown": A(he),
|
|
2842
|
+
"on-native-tab-click": A(ve),
|
|
2843
|
+
"on-native-tab-change": A(_e),
|
|
2844
|
+
"on-native-tab-remove": A(ye),
|
|
2845
|
+
"on-context-menu": A(me),
|
|
2846
|
+
"on-activate": A(b),
|
|
2847
|
+
"on-open-active-menu": A(be),
|
|
2848
|
+
"on-menu-operation": A(ge),
|
|
2849
|
+
"on-close-menu": A(C),
|
|
2850
|
+
"on-reposition": A(M),
|
|
2851
|
+
"can-close": (e) => A(E)("close", e) === void 0
|
|
2753
2852
|
}, p({
|
|
2754
|
-
default:
|
|
2755
|
-
label:
|
|
2756
|
-
tabBefore:
|
|
2757
|
-
tabAfter:
|
|
2758
|
-
status:
|
|
2759
|
-
contextMenuTop:
|
|
2760
|
-
contextMenuBottom:
|
|
2761
|
-
extra:
|
|
2762
|
-
empty:
|
|
2853
|
+
default: j((t) => [D(e.$slots, "default", x(_(t)))]),
|
|
2854
|
+
label: j((t) => [D(e.$slots, "label", x(_(t)))]),
|
|
2855
|
+
tabBefore: j((t) => [D(e.$slots, "tabBefore", x(_(t)))]),
|
|
2856
|
+
tabAfter: j((t) => [D(e.$slots, "tabAfter", x(_(t)))]),
|
|
2857
|
+
status: j((t) => [D(e.$slots, "status", x(_(t)))]),
|
|
2858
|
+
contextMenuTop: j((t) => [D(e.$slots, "contextMenuTop", x(_(t)))]),
|
|
2859
|
+
contextMenuBottom: j((t) => [D(e.$slots, "contextMenuBottom", x(_(t)))]),
|
|
2860
|
+
extra: j(() => [D(e.$slots, "extra")]),
|
|
2861
|
+
empty: j(() => [D(e.$slots, "empty")]),
|
|
2763
2862
|
_: 2
|
|
2764
2863
|
}, [o.header ? {
|
|
2765
2864
|
name: "header",
|
|
2766
|
-
fn:
|
|
2865
|
+
fn: j(() => [D(e.$slots, "header")]),
|
|
2767
2866
|
key: "0"
|
|
2768
2867
|
} : void 0]), 1032, /* @__PURE__ */ "root-attrs.ordered-tabs.active-key.active-tab.variant.density.render-content.locale.min-width.max-width.theme-color.sticky.actions-visible.finder-visible.show-empty.pending.busy.menu-enabled.menu-visible.menu-position.menu-items.native-bindings.menu-context.before-native-leave.on-keydown.on-native-tab-click.on-native-tab-change.on-native-tab-remove.on-context-menu.on-activate.on-open-active-menu.on-menu-operation.on-close-menu.on-reposition.can-close".split(".")));
|
|
2769
2868
|
}
|
|
2770
2869
|
});
|
|
2771
|
-
export { e as OG_TABS_LOCALE_EN_US, t as OG_TABS_LOCALE_ZH_CN, n as OG_TABS_LOCALE_ZH_TW,
|
|
2870
|
+
export { e as OG_TABS_LOCALE_EN_US, t as OG_TABS_LOCALE_ZH_CN, n as OG_TABS_LOCALE_ZH_TW, ai as OgTabs, ze as canCloseTab, Ve as canMoveTab, Be as canPinTab, i as createOgTabs, Oe as createTabStateRevision, Le as filterTabs, Fe as findTab, Ke as getCloseScopeTabs, nt as hasDuplicateKeys, Ze as moveTab, $e as moveTabToEdge, tt as operationForCloseScope, Ie as orderTabs, We as removeTabs, Ye as resolveNextActive, He as setTabPinned, r as useOgTabsGlobalConfig, mt as useTabsController };
|