@mlightcad/ribbon 0.1.3 → 0.1.4
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/ml-ribbon.es.js +592 -584
- package/dist/ml-ribbon.umd.js +1 -1
- package/package.json +1 -1
package/dist/ml-ribbon.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, markRaw as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onMounted as g, onUnmounted as _, openBlock as v, provide as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, toRaw as T, unref as E, watch as D, withCtx as O, withKeys as k, withModifiers as ee } from "vue";
|
|
2
|
-
import { ElButton as
|
|
3
|
-
import { ArrowDown as
|
|
2
|
+
import { ElButton as te, ElButtonGroup as A, ElCheckbox as ne, ElColorPicker as j, ElConfigProvider as re, ElDrawer as M, ElDropdown as N, ElDropdownItem as P, ElDropdownMenu as F, ElIcon as I, ElInputNumber as ie, ElOption as L, ElPopover as R, ElSegmented as z, ElSelect as B, ElSwitch as V, ElTooltip as ae, useGlobalConfig as oe } from "element-plus";
|
|
3
|
+
import { ArrowDown as H, ArrowDownBold as se, ArrowUp as ce, ArrowUpBold as le, Bottom as ue, Grid as de, Menu as fe, Promotion as U } from "@element-plus/icons-vue";
|
|
4
4
|
//#region src/ribbon/context.ts
|
|
5
|
-
var
|
|
5
|
+
var pe = Symbol("RibbonContext");
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/ribbon/composables/useRibbonState.ts
|
|
8
|
-
function
|
|
8
|
+
function W(e) {
|
|
9
9
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function G(e) {
|
|
12
12
|
if (!e) return;
|
|
13
13
|
let t = { ...e };
|
|
14
|
-
return "component" in t && (t.component =
|
|
14
|
+
return "component" in t && (t.component = W(t.component)), "icon" in t && (t.icon = W(t.icon)), "activeIcon" in t && (t.activeIcon = W(t.activeIcon)), "inactiveIcon" in t && (t.inactiveIcon = W(t.inactiveIcon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
|
|
15
15
|
if (!e || typeof e != "object") return e;
|
|
16
16
|
let t = e;
|
|
17
17
|
return "icon" in t ? {
|
|
18
18
|
...t,
|
|
19
|
-
icon:
|
|
19
|
+
icon: W(t.icon)
|
|
20
20
|
} : t;
|
|
21
21
|
})), Array.isArray(t.categories) && (t.categories = t.categories.map((e) => {
|
|
22
22
|
if (!e || typeof e != "object") return e;
|
|
@@ -28,48 +28,48 @@ function K(e) {
|
|
|
28
28
|
let t = e;
|
|
29
29
|
return {
|
|
30
30
|
...t,
|
|
31
|
-
preview:
|
|
32
|
-
icon:
|
|
33
|
-
component:
|
|
31
|
+
preview: W(t.preview),
|
|
32
|
+
icon: W(t.icon),
|
|
33
|
+
component: W(t.component)
|
|
34
34
|
};
|
|
35
35
|
}) : t.items
|
|
36
36
|
};
|
|
37
37
|
})), t;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function me(e) {
|
|
40
40
|
return {
|
|
41
41
|
...e,
|
|
42
|
-
icon:
|
|
43
|
-
props:
|
|
42
|
+
icon: W(e.icon),
|
|
43
|
+
props: G(e.props)
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function he(e) {
|
|
47
47
|
return {
|
|
48
48
|
...e,
|
|
49
|
-
icon:
|
|
50
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
49
|
+
icon: W(e.icon),
|
|
50
|
+
footerMenuItems: e.footerMenuItems?.map(me),
|
|
51
51
|
collections: e.collections?.map((e) => ({
|
|
52
52
|
...e,
|
|
53
|
-
items: e.items.map(
|
|
53
|
+
items: e.items.map(me)
|
|
54
54
|
}))
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function K(e) {
|
|
58
58
|
return {
|
|
59
59
|
...e,
|
|
60
|
-
groups: e.groups?.map(
|
|
60
|
+
groups: e.groups?.map(he)
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function he(e) {
|
|
64
|
-
return e.map(q);
|
|
65
|
-
}
|
|
66
63
|
function ge(e) {
|
|
64
|
+
return e.map(K);
|
|
65
|
+
}
|
|
66
|
+
function _e(e) {
|
|
67
67
|
(!e.collections || e.collections.length === 0) && (e.collections = [{
|
|
68
68
|
id: `${e.id}-collection-1`,
|
|
69
69
|
items: []
|
|
70
70
|
}]);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function q(e, t, n, r, i) {
|
|
73
73
|
let a = e.find((e) => e.id === t);
|
|
74
74
|
if (!a?.groups) return;
|
|
75
75
|
let o = a.groups.find((e) => e.id === n);
|
|
@@ -78,9 +78,9 @@ function _e(e, t, n, r, i) {
|
|
|
78
78
|
s && i(s.items);
|
|
79
79
|
}
|
|
80
80
|
function ve(e, n, r, i, a, o, s, c) {
|
|
81
|
-
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(
|
|
81
|
+
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(ge(n)), m = b(!1), h = b(!1), g = b(!1), _ = b([]), v = b(""), y = b(s), x = b(c), S = t(() => p.value.filter((e) => e.visible !== !1)), C = {
|
|
82
82
|
addTab(e) {
|
|
83
|
-
p.value.push(
|
|
83
|
+
p.value.push(K(e)), f.value ||= e.id;
|
|
84
84
|
},
|
|
85
85
|
removeTab(e) {
|
|
86
86
|
p.value = p.value.filter((t) => t.id !== e), f.value === e && (f.value = S.value[0]?.id ?? "");
|
|
@@ -98,7 +98,7 @@ function ve(e, n, r, i, a, o, s, c) {
|
|
|
98
98
|
},
|
|
99
99
|
addGroup(e, t) {
|
|
100
100
|
let n = p.value.find((t) => t.id === e);
|
|
101
|
-
n && (n.groups ??= [],
|
|
101
|
+
n && (n.groups ??= [], _e(t), n.groups.push(he(t)));
|
|
102
102
|
},
|
|
103
103
|
removeGroup(e, t) {
|
|
104
104
|
let n = p.value.find((t) => t.id === e);
|
|
@@ -113,16 +113,16 @@ function ve(e, n, r, i, a, o, s, c) {
|
|
|
113
113
|
n && (n.visible = !1);
|
|
114
114
|
},
|
|
115
115
|
addItem(e, t, n, r) {
|
|
116
|
-
|
|
116
|
+
q(p.value, e, t, n, (e) => e.push(me(r)));
|
|
117
117
|
},
|
|
118
118
|
removeItem(e, t, n, r) {
|
|
119
|
-
|
|
119
|
+
q(p.value, e, t, n, (e) => {
|
|
120
120
|
let t = e.findIndex((e) => e.id === r);
|
|
121
121
|
t >= 0 && e.splice(t, 1);
|
|
122
122
|
});
|
|
123
123
|
},
|
|
124
124
|
updateItem(e, t, n, r, i) {
|
|
125
|
-
|
|
125
|
+
q(p.value, e, t, n, (e) => {
|
|
126
126
|
let t = e.find((e) => e.id === r);
|
|
127
127
|
t && Object.assign(t, i);
|
|
128
128
|
});
|
|
@@ -171,7 +171,7 @@ function ve(e, n, r, i, a, o, s, c) {
|
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region src/ribbon/modules/RibbonBackstage.vue?vue&type=script&setup=true&lang.ts
|
|
174
|
-
var ye = { class: "ml-ribbon-backstage__nav" },
|
|
174
|
+
var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backstage__content" }, J = { key: 0 }, Y = { key: 1 }, X = /* @__PURE__ */ l({
|
|
175
175
|
__name: "RibbonBackstage",
|
|
176
176
|
props: {
|
|
177
177
|
open: { type: Boolean },
|
|
@@ -186,7 +186,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
186
186
|
function d() {
|
|
187
187
|
u("close");
|
|
188
188
|
}
|
|
189
|
-
return (t, o) => (v(), n(E(
|
|
189
|
+
return (t, o) => (v(), n(E(M), {
|
|
190
190
|
"model-value": l.open,
|
|
191
191
|
size: "100%",
|
|
192
192
|
"with-header": !1,
|
|
@@ -200,24 +200,24 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
200
200
|
title: l.title,
|
|
201
201
|
description: l.description,
|
|
202
202
|
size: l.size
|
|
203
|
-
}) : (v(), i(e, { key: 1 }, [a("aside", ye, [c(E(
|
|
203
|
+
}) : (v(), i(e, { key: 1 }, [a("aside", ye, [c(E(te), {
|
|
204
204
|
type: "primary",
|
|
205
205
|
onClick: d
|
|
206
206
|
}, {
|
|
207
207
|
default: O(() => [s(w(l.backLabel), 1)]),
|
|
208
208
|
_: 1
|
|
209
|
-
})]), a("section",
|
|
209
|
+
})]), a("section", be, [l.title ? (v(), i("h2", J, w(l.title), 1)) : r("", !0), l.description ? (v(), i("p", Y, w(l.description), 1)) : r("", !0)])], 64))], 2)]),
|
|
210
210
|
_: 3
|
|
211
211
|
}, 8, ["model-value"]));
|
|
212
212
|
}
|
|
213
213
|
}), Z = {
|
|
214
214
|
class: "ml-ribbon-tabs",
|
|
215
215
|
role: "tablist"
|
|
216
|
-
},
|
|
216
|
+
}, Q = [
|
|
217
217
|
"aria-selected",
|
|
218
218
|
"disabled",
|
|
219
219
|
"onClick"
|
|
220
|
-
],
|
|
220
|
+
], xe = /* @__PURE__ */ l({
|
|
221
221
|
__name: "RibbonTabs",
|
|
222
222
|
props: {
|
|
223
223
|
tabs: {},
|
|
@@ -241,9 +241,9 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
241
241
|
"aria-selected": n.activeTab === e.id,
|
|
242
242
|
disabled: a.disabled,
|
|
243
243
|
onClick: (t) => c(e.id, t)
|
|
244
|
-
}, w(e.title), 11,
|
|
244
|
+
}, w(e.title), 11, Q))), 128))]));
|
|
245
245
|
}
|
|
246
|
-
}),
|
|
246
|
+
}), Se = { class: "ml-ribbon-contextual-tabs" }, Ce = { class: "ml-ribbon-contextual-tabs__normal" }, we = { class: "ml-ribbon-contextual-tabs__ctx" }, Te = /* @__PURE__ */ l({
|
|
247
247
|
__name: "RibbonContextualTabs",
|
|
248
248
|
props: {
|
|
249
249
|
tabs: {},
|
|
@@ -254,7 +254,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
254
254
|
emits: ["select"],
|
|
255
255
|
setup(t, { emit: n }) {
|
|
256
256
|
let r = t, o = n;
|
|
257
|
-
return (n, s) => (v(), i("div",
|
|
257
|
+
return (n, s) => (v(), i("div", Se, [a("div", Ce, [c(xe, {
|
|
258
258
|
tabs: r.tabs.filter((e) => !e.contextual),
|
|
259
259
|
"active-tab": t.activeTab,
|
|
260
260
|
disabled: r.disabled,
|
|
@@ -267,7 +267,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
267
267
|
key: e.id,
|
|
268
268
|
class: "ml-ribbon-contextual-tabs__block",
|
|
269
269
|
style: h({ "--ctx-color": e.contextualColor || "#67c23a" })
|
|
270
|
-
}, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(
|
|
270
|
+
}, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(xe, {
|
|
271
271
|
tabs: [e],
|
|
272
272
|
"active-tab": t.activeTab,
|
|
273
273
|
disabled: r.disabled,
|
|
@@ -289,7 +289,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
289
289
|
},
|
|
290
290
|
emits: ["select", "open-backstage"],
|
|
291
291
|
setup(o, { emit: l }) {
|
|
292
|
-
let u = o, d = l, f = b(!1), p =
|
|
292
|
+
let u = o, d = l, f = b(!1), p = oe("size", ""), h = t(() => p.value || "default"), g = t(() => `ml-ribbon-file-menu-dropdown ml-ribbon-popper ml-ribbon-popper--size-${h.value}`);
|
|
293
293
|
function _(e) {
|
|
294
294
|
f.value = e;
|
|
295
295
|
}
|
|
@@ -302,21 +302,21 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
302
302
|
}
|
|
303
303
|
return D(() => u.disabled, (e) => {
|
|
304
304
|
e && (f.value = !1);
|
|
305
|
-
}), (t, o) => (v(), n(E(
|
|
305
|
+
}), (t, o) => (v(), n(E(N), {
|
|
306
306
|
trigger: "click",
|
|
307
307
|
disabled: u.disabled,
|
|
308
308
|
"popper-class": g.value,
|
|
309
309
|
onCommand: y,
|
|
310
310
|
onVisibleChange: _
|
|
311
311
|
}, {
|
|
312
|
-
dropdown: O(() => [c(E(
|
|
313
|
-
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(
|
|
312
|
+
dropdown: O(() => [c(E(F), null, {
|
|
313
|
+
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(P), {
|
|
314
314
|
key: 0,
|
|
315
315
|
command: "__backstage"
|
|
316
316
|
}, {
|
|
317
317
|
default: O(() => [s(w(u.openBackstageLabel), 1)]),
|
|
318
318
|
_: 1
|
|
319
|
-
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(
|
|
319
|
+
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(P), {
|
|
320
320
|
key: e.id,
|
|
321
321
|
divided: u.showOpenBackstage !== !1 && t === 0,
|
|
322
322
|
command: e.id,
|
|
@@ -389,7 +389,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
389
389
|
function y(e) {
|
|
390
390
|
o.disabled || c("click", e);
|
|
391
391
|
}
|
|
392
|
-
return (t, a) => (v(), n(E(
|
|
392
|
+
return (t, a) => (v(), n(E(te), {
|
|
393
393
|
class: "ml-ribbon-button",
|
|
394
394
|
"data-ribbon-button-id": e.id,
|
|
395
395
|
type: e.buttonType,
|
|
@@ -405,7 +405,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
405
405
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
406
406
|
style: h(_.value),
|
|
407
407
|
"aria-hidden": "true"
|
|
408
|
-
}, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(
|
|
408
|
+
}, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(I), {
|
|
409
409
|
key: 1,
|
|
410
410
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
411
411
|
style: h(_.value)
|
|
@@ -491,8 +491,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
491
491
|
"ml-ribbon-button-group--equal-width": !t.wrap && t.equalWidth
|
|
492
492
|
}]),
|
|
493
493
|
"data-id": t.id
|
|
494
|
-
}, [!t.hideLabel && t.label ? (v(), i("div", Me, w(t.label), 1)) : r("", !0), c(E(
|
|
495
|
-
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(
|
|
494
|
+
}, [!t.hideLabel && t.label ? (v(), i("div", Me, w(t.label), 1)) : r("", !0), c(E(A), null, {
|
|
495
|
+
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(ae), {
|
|
496
496
|
key: String(e.value),
|
|
497
497
|
content: g(e),
|
|
498
498
|
disabled: !g(e),
|
|
@@ -572,125 +572,125 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
572
572
|
"tooltip-change"
|
|
573
573
|
],
|
|
574
574
|
setup(o, { emit: l }) {
|
|
575
|
-
let u = o, d = l, f =
|
|
575
|
+
let u = o, d = l, f = oe("size", ""), p = t(() => f.value || "default"), h = b(!1), g = b(void 0), _ = t(() => Array.isArray(u.options) ? u.options : []), y = t(() => _.value.find((e) => V(e) === g.value) ?? null), T = t(() => {
|
|
576
576
|
if (y.value && u.syncLabelWithSelection) {
|
|
577
|
-
let e =
|
|
577
|
+
let e = le(y.value);
|
|
578
578
|
if (e) return e;
|
|
579
579
|
}
|
|
580
|
-
return
|
|
580
|
+
return fe(u.label) ?? u.id;
|
|
581
581
|
}), D = t(() => !u.hideLabel && T.value.length > 0), k = t(() => {
|
|
582
582
|
if (y.value) {
|
|
583
|
-
let e =
|
|
583
|
+
let e = z(y.value);
|
|
584
584
|
if (e) return e;
|
|
585
585
|
}
|
|
586
586
|
return !u.icon || typeof u.icon == "string" ? null : u.icon;
|
|
587
|
-
}),
|
|
587
|
+
}), A = t(() => {
|
|
588
588
|
if (y.value) {
|
|
589
|
-
let e =
|
|
589
|
+
let e = B(y.value);
|
|
590
590
|
if (e) return e;
|
|
591
591
|
}
|
|
592
592
|
if (typeof u.icon != "string") return null;
|
|
593
593
|
let e = u.icon.trim();
|
|
594
594
|
return e.length > 0 ? e : null;
|
|
595
|
-
}),
|
|
595
|
+
}), ne = t(() => !!(k.value || A.value)), j = t(() => de(y.value) ?? fe(u.tooltip) ?? fe(T.value) ?? fe(u.label) ?? U(u.id)), re = t(() => [
|
|
596
596
|
"ml-ribbon-dropdown-menu",
|
|
597
597
|
"ml-ribbon-popper",
|
|
598
598
|
`ml-ribbon-popper--size-${p.value}`,
|
|
599
599
|
u.popperClass
|
|
600
600
|
].filter(Boolean).join(" "));
|
|
601
|
-
function
|
|
601
|
+
function M(e) {
|
|
602
602
|
if (u.disabled) {
|
|
603
603
|
h.value = !1;
|
|
604
604
|
return;
|
|
605
605
|
}
|
|
606
606
|
h.value = e;
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function ie() {
|
|
609
609
|
u.disabled || (h.value = !h.value);
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
u.disabled || (g.value = e, d("tooltip-change",
|
|
611
|
+
function L(e) {
|
|
612
|
+
u.disabled || (g.value = e, d("tooltip-change", de(y.value) ?? j.value), d("command", e), h.value = !1);
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function R() {
|
|
615
615
|
if (u.disabled) return;
|
|
616
616
|
let e = y.value;
|
|
617
617
|
if (!e) {
|
|
618
618
|
d("click");
|
|
619
619
|
return;
|
|
620
620
|
}
|
|
621
|
-
d("command",
|
|
621
|
+
d("command", V(e));
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function z(e) {
|
|
624
624
|
if (!e || typeof e != "object") return null;
|
|
625
625
|
let t = e.icon;
|
|
626
626
|
return !t || typeof t == "string" ? null : t;
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function B(e) {
|
|
629
629
|
if (!e || typeof e != "object") return null;
|
|
630
630
|
let t = e.icon;
|
|
631
631
|
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function V(e) {
|
|
634
634
|
if (!(!e || typeof e != "object")) return e.value;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
637
|
-
let t =
|
|
636
|
+
function se(e) {
|
|
637
|
+
let t = V(e);
|
|
638
638
|
if (typeof t == "string" || typeof t == "number" || t && typeof t == "object") return t;
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function le(e) {
|
|
641
641
|
if (!e || typeof e != "object") return;
|
|
642
642
|
let t = e.label;
|
|
643
643
|
return typeof t == "string" ? t : void 0;
|
|
644
644
|
}
|
|
645
|
-
function le(e) {
|
|
646
|
-
if (typeof e == "string") return W(e);
|
|
647
|
-
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
648
|
-
}
|
|
649
645
|
function ue(e) {
|
|
650
|
-
if (
|
|
646
|
+
if (typeof e == "string") return U(e);
|
|
647
|
+
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
651
648
|
}
|
|
652
649
|
function de(e) {
|
|
650
|
+
if (!(!e || typeof e != "object")) return fe(e.tooltip) ?? le(e) ?? ue(V(e));
|
|
651
|
+
}
|
|
652
|
+
function fe(e) {
|
|
653
653
|
if (typeof e != "string") return;
|
|
654
654
|
let t = e.trim();
|
|
655
655
|
return t.length > 0 ? t : void 0;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function U(e) {
|
|
658
658
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
659
659
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
660
660
|
}
|
|
661
|
-
return (t, l) => (v(), n(E(
|
|
661
|
+
return (t, l) => (v(), n(E(N), {
|
|
662
662
|
class: m(["ml-ribbon-dropdown", [`ml-ribbon-dropdown--item-${o.itemSize}`, { "is-label-hidden": o.hideLabel }]]),
|
|
663
663
|
trigger: "click",
|
|
664
664
|
disabled: o.disabled,
|
|
665
|
-
"popper-class":
|
|
666
|
-
onVisibleChange:
|
|
667
|
-
onCommand:
|
|
665
|
+
"popper-class": re.value,
|
|
666
|
+
onVisibleChange: M,
|
|
667
|
+
onCommand: L
|
|
668
668
|
}, {
|
|
669
|
-
dropdown: O(() => [c(E(
|
|
670
|
-
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(
|
|
671
|
-
key: String(
|
|
672
|
-
command:
|
|
669
|
+
dropdown: O(() => [c(E(F), null, {
|
|
670
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(P), {
|
|
671
|
+
key: String(V(e)),
|
|
672
|
+
command: se(e),
|
|
673
673
|
disabled: e.disabled === !0
|
|
674
674
|
}, {
|
|
675
|
-
default: O(() => [c(E(
|
|
676
|
-
content:
|
|
677
|
-
disabled: !
|
|
675
|
+
default: O(() => [c(E(ae), {
|
|
676
|
+
content: de(e),
|
|
677
|
+
disabled: !de(e),
|
|
678
678
|
"show-after": o.tooltipShowAfter,
|
|
679
679
|
"hide-after": o.tooltipHideAfter,
|
|
680
680
|
placement: "top",
|
|
681
681
|
effect: "dark"
|
|
682
682
|
}, {
|
|
683
|
-
default: O(() => [a("span", Re, [S(t.$slots, "option", { option: e }, () => [
|
|
683
|
+
default: O(() => [a("span", Re, [S(t.$slots, "option", { option: e }, () => [z(e) ? (v(), n(E(I), {
|
|
684
684
|
key: 0,
|
|
685
685
|
class: "ml-ribbon-dropdown-item__icon"
|
|
686
686
|
}, {
|
|
687
|
-
default: O(() => [(v(), n(C(
|
|
687
|
+
default: O(() => [(v(), n(C(z(e))))]),
|
|
688
688
|
_: 2
|
|
689
|
-
}, 1024)) :
|
|
689
|
+
}, 1024)) : B(e) ? (v(), i("i", {
|
|
690
690
|
key: 1,
|
|
691
|
-
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class",
|
|
691
|
+
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", B(e)]),
|
|
692
692
|
"aria-hidden": "true"
|
|
693
|
-
}, null, 2)) : r("", !0), a("span", ze, w(
|
|
693
|
+
}, null, 2)) : r("", !0), a("span", ze, w(le(e)), 1)])])]),
|
|
694
694
|
_: 2
|
|
695
695
|
}, 1032, [
|
|
696
696
|
"content",
|
|
@@ -702,28 +702,28 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
702
702
|
}, 1032, ["command", "disabled"]))), 128))]),
|
|
703
703
|
_: 3
|
|
704
704
|
})]),
|
|
705
|
-
default: O(() => [c(E(
|
|
705
|
+
default: O(() => [c(E(te), {
|
|
706
706
|
type: "default",
|
|
707
707
|
disabled: o.disabled,
|
|
708
|
-
"aria-label":
|
|
709
|
-
onClick:
|
|
708
|
+
"aria-label": j.value,
|
|
709
|
+
onClick: ie
|
|
710
710
|
}, {
|
|
711
|
-
default: O(() => [a("span", Fe, [t.$slots.icon ||
|
|
711
|
+
default: O(() => [a("span", Fe, [t.$slots.icon || ne.value ? (v(), i("span", {
|
|
712
712
|
key: 0,
|
|
713
|
-
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class":
|
|
714
|
-
onClick: ee(
|
|
715
|
-
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [k.value ? (v(), n(E(
|
|
713
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class": A.value && !k.value && !t.$slots.icon }]),
|
|
714
|
+
onClick: ee(R, ["stop"])
|
|
715
|
+
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [k.value ? (v(), n(E(I), { key: 0 }, {
|
|
716
716
|
default: O(() => [(v(), n(C(k.value)))]),
|
|
717
717
|
_: 1
|
|
718
|
-
})) :
|
|
718
|
+
})) : A.value ? (v(), i("i", {
|
|
719
719
|
key: 1,
|
|
720
|
-
class: m(
|
|
720
|
+
class: m(A.value),
|
|
721
721
|
"aria-hidden": "true"
|
|
722
722
|
}, null, 2)) : r("", !0)])], 2)) : r("", !0), a("span", Ie, [D.value ? (v(), i("span", Le, [S(t.$slots, "label", {
|
|
723
723
|
selectedOption: y.value,
|
|
724
724
|
label: T.value
|
|
725
|
-
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(
|
|
726
|
-
default: O(() => [(v(), n(C(h.value ? E(
|
|
725
|
+
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(I), { class: m(["ml-ribbon-item-host__dropdown-arrow ml-ribbon-dropdown__arrow", { "is-open": h.value }]) }, {
|
|
726
|
+
default: O(() => [(v(), n(C(h.value ? E(ce) : E(H))))]),
|
|
727
727
|
_: 1
|
|
728
728
|
}, 8, ["class"])])])]),
|
|
729
729
|
_: 3
|
|
@@ -799,70 +799,78 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
799
799
|
},
|
|
800
800
|
emits: ["select"],
|
|
801
801
|
setup(o, { emit: l }) {
|
|
802
|
-
let u = o, g = l, _ = b(""), y = b(!1), k = b(0), ee = b(null),
|
|
803
|
-
let e =
|
|
804
|
-
return
|
|
805
|
-
}),
|
|
806
|
-
"--ml-ribbon-gallery-panel-columns": String(
|
|
807
|
-
"--ml-ribbon-gallery-panel-item-width": `${
|
|
808
|
-
})),
|
|
802
|
+
let u = o, g = l, _ = b(""), y = b(!1), k = b(0), ee = b(null), te = b(null), A = b(null), ne = b(0), j = oe("size", ""), re = t(() => j.value || "default"), M = t(() => re.value === "small" ? .92 : re.value === "large" ? 1.08 : 1), N = t(() => Math.round(_t * M.value)), P = t(() => Math.round(xt * M.value)), F = t(() => u.label?.trim() ?? ""), ie = t(() => u.categories.filter((e) => e.items.length > 0).length), L = t(() => u.categories.flatMap((e) => e.items)), z = t(() => L.value.find((e) => e.id === _.value) ?? L.value[0]), B = t(() => !Number.isFinite(u.inlineItemLimit) || u.inlineItemLimit <= 0 ? 4 : Math.floor(u.inlineItemLimit)), V = t(() => Math.max(1, Math.ceil(L.value.length / B.value))), ae = t(() => Math.min(k.value, V.value - 1)), se = t(() => U.value && ae.value > 0), le = t(() => U.value && ae.value < V.value - 1), de = t(() => {
|
|
803
|
+
let e = ae.value * B.value;
|
|
804
|
+
return L.value.slice(e, e + B.value);
|
|
805
|
+
}), fe = t(() => new Set(de.value.map((e) => e.id))), U = t(() => L.value.length > B.value), pe = t(() => `ml-ribbon-gallery-panel ml-ribbon-gallery-panel--${u.collapsed ? "collapsed" : "inline"} ml-ribbon-gallery-panel--size-${re.value}`), W = t(() => ({
|
|
806
|
+
"--ml-ribbon-gallery-panel-columns": String(B.value),
|
|
807
|
+
"--ml-ribbon-gallery-panel-item-width": `${N.value}px`
|
|
808
|
+
})), G = t(() => B.value * N.value + Math.max(0, B.value - 1) * vt + gt * 2 + (u.collapsed ? yt : bt + P.value)), me = t(() => ({ modifiers: [{
|
|
809
809
|
name: "offset",
|
|
810
|
-
options: { offset: [
|
|
810
|
+
options: { offset: [ne.value, 0] }
|
|
811
811
|
}] }));
|
|
812
812
|
D(() => u.modelValue, (e) => {
|
|
813
|
-
typeof e == "string" && (_.value = e);
|
|
814
|
-
}, { immediate: !0 }), D(() => [
|
|
815
|
-
|
|
813
|
+
typeof e == "string" && (_.value = e, ve(e));
|
|
814
|
+
}, { immediate: !0 }), D(() => [
|
|
815
|
+
L.value.map((e) => e.id).join("\0"),
|
|
816
|
+
B.value,
|
|
817
|
+
_.value
|
|
818
|
+
], () => {
|
|
819
|
+
ve() || (k.value = Math.min(k.value, V.value - 1));
|
|
816
820
|
}), D(y, async (e) => {
|
|
817
|
-
!e || u.collapsed || (
|
|
821
|
+
!e || u.collapsed || (ye(), await p(), await p(), be());
|
|
818
822
|
});
|
|
819
|
-
function
|
|
823
|
+
function he(e) {
|
|
820
824
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
821
825
|
}
|
|
822
|
-
function
|
|
823
|
-
let t =
|
|
824
|
-
return
|
|
825
|
-
}
|
|
826
|
-
function he(e) {
|
|
827
|
-
return W.value ? e.items.filter((e) => de.value.has(e.id)) : e.items;
|
|
826
|
+
function K(e) {
|
|
827
|
+
let t = F.value.toLowerCase(), n = e.title.trim().toLowerCase();
|
|
828
|
+
return ie.value > 1 || !t || n !== t;
|
|
828
829
|
}
|
|
829
830
|
function ge(e) {
|
|
830
|
-
|
|
831
|
-
let t = ie.value + e;
|
|
832
|
-
k.value = Math.min(Math.max(t, 0), H.value - 1);
|
|
831
|
+
return U.value ? e.items.filter((e) => fe.value.has(e.id)) : e.items;
|
|
833
832
|
}
|
|
834
833
|
function _e(e) {
|
|
835
|
-
|
|
836
|
-
|
|
834
|
+
if (u.disabled || !U.value) return;
|
|
835
|
+
let t = ae.value + e;
|
|
836
|
+
k.value = Math.min(Math.max(t, 0), V.value - 1);
|
|
837
837
|
}
|
|
838
|
-
function
|
|
839
|
-
let
|
|
838
|
+
function q(e) {
|
|
839
|
+
let t = L.value.findIndex((t) => t.id === e.id);
|
|
840
|
+
return t < 0 ? 0 : Math.floor(t / B.value);
|
|
841
|
+
}
|
|
842
|
+
function ve(e = _.value) {
|
|
843
|
+
let t = L.value.find((t) => t.id === e);
|
|
844
|
+
return t ? (k.value = q(t), !0) : !1;
|
|
845
|
+
}
|
|
846
|
+
function ye() {
|
|
847
|
+
let e = ee.value, t = te.value;
|
|
840
848
|
if (!e || !t) {
|
|
841
|
-
|
|
849
|
+
ne.value = 0;
|
|
842
850
|
return;
|
|
843
851
|
}
|
|
844
852
|
let n = e.querySelector(".ml-ribbon-gallery__grid .ml-ribbon-gallery__item")?.getBoundingClientRect().left ?? e.getBoundingClientRect().left;
|
|
845
|
-
|
|
853
|
+
ne.value = Math.round(n - t.getBoundingClientRect().left - gt);
|
|
846
854
|
}
|
|
847
|
-
function
|
|
848
|
-
let e =
|
|
849
|
-
e && e.querySelector(`[data-gallery-row-index="${
|
|
855
|
+
function be() {
|
|
856
|
+
let e = A.value;
|
|
857
|
+
e && e.querySelector(`[data-gallery-row-index="${ae.value}"]`)?.scrollIntoView?.({ block: "start" });
|
|
850
858
|
}
|
|
851
859
|
function J(e) {
|
|
852
|
-
return e.preview && typeof e.preview != "string" ?
|
|
853
|
-
}
|
|
854
|
-
function be(e) {
|
|
855
|
-
return e.component ? me(e.component) : null;
|
|
860
|
+
return e.preview && typeof e.preview != "string" ? he(e.preview) : e.icon && typeof e.icon != "string" ? he(e.icon) : null;
|
|
856
861
|
}
|
|
857
862
|
function Y(e) {
|
|
858
|
-
return
|
|
863
|
+
return e.component ? he(e.component) : null;
|
|
859
864
|
}
|
|
860
865
|
function X(e) {
|
|
866
|
+
return u.disabled || e.disabled === !0;
|
|
867
|
+
}
|
|
868
|
+
function Z(e) {
|
|
861
869
|
if (typeof e.icon != "string") return null;
|
|
862
870
|
let t = e.icon.trim();
|
|
863
871
|
return t.length > 0 ? t : null;
|
|
864
872
|
}
|
|
865
|
-
function
|
|
873
|
+
function Q(e) {
|
|
866
874
|
let t = e.previewSvg ?? e.svg;
|
|
867
875
|
if (typeof t != "string") return null;
|
|
868
876
|
let n = t.trim();
|
|
@@ -872,14 +880,14 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
872
880
|
return e.startsWith("data:image/svg+xml") || e.endsWith(".svg");
|
|
873
881
|
}
|
|
874
882
|
function Se(e) {
|
|
875
|
-
let t =
|
|
883
|
+
let t = Q(e);
|
|
876
884
|
return t ? xe(t) : !1;
|
|
877
885
|
}
|
|
878
886
|
function Ce(e) {
|
|
879
887
|
return typeof e.preview == "string" ? e.preview : u.previewFallback;
|
|
880
888
|
}
|
|
881
|
-
function
|
|
882
|
-
|
|
889
|
+
function we(e) {
|
|
890
|
+
X(e) || (_.value = e.id, k.value = q(e), y.value = !1, g("select", e.id));
|
|
883
891
|
}
|
|
884
892
|
return (t, l) => (v(), i("div", {
|
|
885
893
|
ref_key: "galleryRef",
|
|
@@ -887,103 +895,103 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
887
895
|
class: m(["ml-ribbon-gallery", {
|
|
888
896
|
"is-disabled": o.disabled,
|
|
889
897
|
"is-collapsed": o.collapsed,
|
|
890
|
-
"is-unlabeled": !o.collapsed && !
|
|
898
|
+
"is-unlabeled": !o.collapsed && !F.value
|
|
891
899
|
}])
|
|
892
900
|
}, [
|
|
893
|
-
o.collapsed &&
|
|
901
|
+
o.collapsed && z.value ? (v(), n(E(R), {
|
|
894
902
|
key: 0,
|
|
895
903
|
visible: y.value,
|
|
896
904
|
"onUpdate:visible": l[0] ||= (e) => y.value = e,
|
|
897
905
|
trigger: "click",
|
|
898
906
|
placement: "bottom-start",
|
|
899
907
|
disabled: o.disabled,
|
|
900
|
-
width:
|
|
901
|
-
"popper-class":
|
|
908
|
+
width: G.value,
|
|
909
|
+
"popper-class": pe.value
|
|
902
910
|
}, {
|
|
903
911
|
reference: O(() => [a("button", {
|
|
904
912
|
type: "button",
|
|
905
913
|
class: m(["ml-ribbon-gallery__collapsed-button", {
|
|
906
|
-
"is-selected": _.value ===
|
|
914
|
+
"is-selected": _.value === z.value.id,
|
|
907
915
|
"is-open": y.value
|
|
908
916
|
}]),
|
|
909
|
-
disabled:
|
|
910
|
-
}, [
|
|
911
|
-
item:
|
|
912
|
-
selected: _.value ===
|
|
913
|
-
disabled:
|
|
917
|
+
disabled: X(z.value)
|
|
918
|
+
}, [Y(z.value) ? (v(), n(C(Y(z.value)), f({ key: 0 }, z.value.componentProps, {
|
|
919
|
+
item: z.value,
|
|
920
|
+
selected: _.value === z.value.id,
|
|
921
|
+
disabled: X(z.value)
|
|
914
922
|
}), null, 16, [
|
|
915
923
|
"item",
|
|
916
924
|
"selected",
|
|
917
925
|
"disabled"
|
|
918
926
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview ml-ribbon-gallery__collapsed-preview", {
|
|
919
|
-
"ml-ribbon-gallery__preview--icon": J(
|
|
920
|
-
"ml-ribbon-gallery__preview--svg":
|
|
921
|
-
}]) }, [J(
|
|
927
|
+
"ml-ribbon-gallery__preview--icon": J(z.value) || Z(z.value),
|
|
928
|
+
"ml-ribbon-gallery__preview--svg": Q(z.value)
|
|
929
|
+
}]) }, [J(z.value) ? (v(), n(E(I), {
|
|
922
930
|
key: 0,
|
|
923
931
|
class: "ml-ribbon-gallery__preview-icon"
|
|
924
932
|
}, {
|
|
925
|
-
default: O(() => [(v(), n(C(J(
|
|
933
|
+
default: O(() => [(v(), n(C(J(z.value))))]),
|
|
926
934
|
_: 1
|
|
927
|
-
})) :
|
|
935
|
+
})) : Z(z.value) ? (v(), i("i", {
|
|
928
936
|
key: 1,
|
|
929
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class",
|
|
937
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(z.value)]),
|
|
930
938
|
"aria-hidden": "true"
|
|
931
|
-
}, null, 2)) :
|
|
939
|
+
}, null, 2)) : Q(z.value) && Se(z.value) ? (v(), i("img", {
|
|
932
940
|
key: 2,
|
|
933
941
|
class: "ml-ribbon-gallery__preview-svg",
|
|
934
|
-
src:
|
|
942
|
+
src: Q(z.value) ?? "",
|
|
935
943
|
alt: ""
|
|
936
|
-
}, null, 8, He)) :
|
|
944
|
+
}, null, 8, He)) : Q(z.value) ? (v(), i("svg", Ue, [a("use", { href: Q(z.value) ?? "" }, null, 8, We)])) : (v(), i(e, { key: 4 }, [s(w(Ce(z.value)), 1)], 64))], 2), a("div", Ge, w(z.value.label), 1)], 64))], 10, Ve)]),
|
|
937
945
|
default: O(() => [a("div", Ke, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
938
946
|
key: o.id,
|
|
939
947
|
class: "ml-ribbon-gallery__panel-category"
|
|
940
|
-
}, [
|
|
948
|
+
}, [K(o) ? (v(), i("h4", qe, w(o.title), 1)) : r("", !0), a("div", {
|
|
941
949
|
class: "ml-ribbon-gallery__panel-grid",
|
|
942
|
-
style: h(
|
|
950
|
+
style: h(W.value)
|
|
943
951
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
944
952
|
key: r.id,
|
|
945
953
|
type: "button",
|
|
946
954
|
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
947
|
-
disabled:
|
|
948
|
-
onClick: (e) =>
|
|
955
|
+
disabled: X(r),
|
|
956
|
+
onClick: (e) => we(r)
|
|
949
957
|
}, [S(t.$slots, "item", {
|
|
950
958
|
item: r,
|
|
951
959
|
category: o,
|
|
952
960
|
selected: _.value === r.id,
|
|
953
|
-
disabled:
|
|
954
|
-
select: () =>
|
|
955
|
-
}, () => [
|
|
961
|
+
disabled: X(r),
|
|
962
|
+
select: () => we(r)
|
|
963
|
+
}, () => [Y(r) ? (v(), n(C(Y(r)), f({
|
|
956
964
|
key: 0,
|
|
957
965
|
ref_for: !0
|
|
958
966
|
}, r.componentProps, {
|
|
959
967
|
item: r,
|
|
960
968
|
category: o,
|
|
961
969
|
selected: _.value === r.id,
|
|
962
|
-
disabled:
|
|
970
|
+
disabled: X(r)
|
|
963
971
|
}), null, 16, [
|
|
964
972
|
"item",
|
|
965
973
|
"category",
|
|
966
974
|
"selected",
|
|
967
975
|
"disabled"
|
|
968
976
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
969
|
-
"ml-ribbon-gallery__preview--icon": J(r) ||
|
|
970
|
-
"ml-ribbon-gallery__preview--svg":
|
|
971
|
-
}]) }, [J(r) ? (v(), n(E(
|
|
977
|
+
"ml-ribbon-gallery__preview--icon": J(r) || Z(r),
|
|
978
|
+
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
979
|
+
}]) }, [J(r) ? (v(), n(E(I), {
|
|
972
980
|
key: 0,
|
|
973
981
|
class: "ml-ribbon-gallery__preview-icon"
|
|
974
982
|
}, {
|
|
975
983
|
default: O(() => [(v(), n(C(J(r))))]),
|
|
976
984
|
_: 2
|
|
977
|
-
}, 1024)) :
|
|
985
|
+
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
978
986
|
key: 1,
|
|
979
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class",
|
|
987
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(r)]),
|
|
980
988
|
"aria-hidden": "true"
|
|
981
|
-
}, null, 2)) :
|
|
989
|
+
}, null, 2)) : Q(r) && Se(r) ? (v(), i("img", {
|
|
982
990
|
key: 2,
|
|
983
991
|
class: "ml-ribbon-gallery__preview-svg",
|
|
984
|
-
src:
|
|
992
|
+
src: Q(r) ?? "",
|
|
985
993
|
alt: ""
|
|
986
|
-
}, null, 8, Ye)) :
|
|
994
|
+
}, null, 8, Ye)) : Q(r) ? (v(), i("svg", Xe, [a("use", { href: Q(r) ?? "" }, null, 8, Ze)])) : (v(), i(e, { key: 4 }, [s(w(Ce(r)), 1)], 64))], 2), a("div", $, w(r.label), 1)], 64))])], 10, Je))), 128))], 4)]))), 128))])]),
|
|
987
995
|
_: 3
|
|
988
996
|
}, 8, [
|
|
989
997
|
"visible",
|
|
@@ -991,154 +999,154 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
991
999
|
"width",
|
|
992
1000
|
"popper-class"
|
|
993
1001
|
])) : r("", !0),
|
|
994
|
-
!o.collapsed &&
|
|
1002
|
+
!o.collapsed && F.value ? (v(), i("div", Qe, w(F.value), 1)) : r("", !0),
|
|
995
1003
|
o.collapsed ? r("", !0) : (v(), i("div", $e, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
996
1004
|
key: o.id,
|
|
997
1005
|
class: "ml-ribbon-gallery__category"
|
|
998
|
-
}, [
|
|
1006
|
+
}, [F.value && K(o) ? (v(), i("h4", et, w(o.title), 1)) : r("", !0), a("div", {
|
|
999
1007
|
class: "ml-ribbon-gallery__grid",
|
|
1000
|
-
style: h({ "--ml-ribbon-gallery-inline-columns": String(
|
|
1001
|
-
}, [(v(!0), i(e, null, x(
|
|
1008
|
+
style: h({ "--ml-ribbon-gallery-inline-columns": String(B.value) })
|
|
1009
|
+
}, [(v(!0), i(e, null, x(ge(o), (r) => (v(), i("button", {
|
|
1002
1010
|
key: r.id,
|
|
1003
1011
|
type: "button",
|
|
1004
1012
|
class: m(["ml-ribbon-gallery__item", { "is-selected": _.value === r.id }]),
|
|
1005
|
-
disabled:
|
|
1006
|
-
onClick: (e) =>
|
|
1013
|
+
disabled: X(r),
|
|
1014
|
+
onClick: (e) => we(r)
|
|
1007
1015
|
}, [S(t.$slots, "item", {
|
|
1008
1016
|
item: r,
|
|
1009
1017
|
category: o,
|
|
1010
1018
|
selected: _.value === r.id,
|
|
1011
|
-
disabled:
|
|
1012
|
-
select: () =>
|
|
1013
|
-
}, () => [
|
|
1019
|
+
disabled: X(r),
|
|
1020
|
+
select: () => we(r)
|
|
1021
|
+
}, () => [Y(r) ? (v(), n(C(Y(r)), f({
|
|
1014
1022
|
key: 0,
|
|
1015
1023
|
ref_for: !0
|
|
1016
1024
|
}, r.componentProps, {
|
|
1017
1025
|
item: r,
|
|
1018
1026
|
category: o,
|
|
1019
1027
|
selected: _.value === r.id,
|
|
1020
|
-
disabled:
|
|
1028
|
+
disabled: X(r)
|
|
1021
1029
|
}), null, 16, [
|
|
1022
1030
|
"item",
|
|
1023
1031
|
"category",
|
|
1024
1032
|
"selected",
|
|
1025
1033
|
"disabled"
|
|
1026
1034
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1027
|
-
"ml-ribbon-gallery__preview--icon": J(r) ||
|
|
1028
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1029
|
-
}]) }, [J(r) ? (v(), n(E(
|
|
1035
|
+
"ml-ribbon-gallery__preview--icon": J(r) || Z(r),
|
|
1036
|
+
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
1037
|
+
}]) }, [J(r) ? (v(), n(E(I), {
|
|
1030
1038
|
key: 0,
|
|
1031
1039
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1032
1040
|
}, {
|
|
1033
1041
|
default: O(() => [(v(), n(C(J(r))))]),
|
|
1034
1042
|
_: 2
|
|
1035
|
-
}, 1024)) :
|
|
1043
|
+
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1036
1044
|
key: 1,
|
|
1037
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class",
|
|
1045
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(r)]),
|
|
1038
1046
|
"aria-hidden": "true"
|
|
1039
|
-
}, null, 2)) :
|
|
1047
|
+
}, null, 2)) : Q(r) && Se(r) ? (v(), i("img", {
|
|
1040
1048
|
key: 2,
|
|
1041
1049
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1042
|
-
src:
|
|
1050
|
+
src: Q(r) ?? "",
|
|
1043
1051
|
alt: ""
|
|
1044
|
-
}, null, 8, nt)) :
|
|
1052
|
+
}, null, 8, nt)) : Q(r) ? (v(), i("svg", rt, [a("use", { href: Q(r) ?? "" }, null, 8, it)])) : (v(), i(e, { key: 4 }, [s(w(Ce(r)), 1)], 64))], 2), a("div", at, w(r.label), 1)], 64))])], 10, tt))), 128))], 4)]))), 128)), U.value ? (v(), i("div", ot, [
|
|
1045
1053
|
a("button", {
|
|
1046
1054
|
type: "button",
|
|
1047
1055
|
class: "ml-ribbon-gallery__control-button",
|
|
1048
|
-
disabled: o.disabled || !
|
|
1056
|
+
disabled: o.disabled || !se.value,
|
|
1049
1057
|
"aria-label": "Show previous gallery row",
|
|
1050
|
-
onClick: l[1] ||= (e) =>
|
|
1051
|
-
}, [c(E(
|
|
1052
|
-
default: O(() => [c(E(
|
|
1058
|
+
onClick: l[1] ||= (e) => _e(-1)
|
|
1059
|
+
}, [c(E(I), null, {
|
|
1060
|
+
default: O(() => [c(E(ce))]),
|
|
1053
1061
|
_: 1
|
|
1054
1062
|
})], 8, st),
|
|
1055
1063
|
a("button", {
|
|
1056
1064
|
type: "button",
|
|
1057
1065
|
class: "ml-ribbon-gallery__control-button",
|
|
1058
|
-
disabled: o.disabled || !
|
|
1066
|
+
disabled: o.disabled || !le.value,
|
|
1059
1067
|
"aria-label": "Show next gallery row",
|
|
1060
|
-
onClick: l[2] ||= (e) =>
|
|
1061
|
-
}, [c(E(
|
|
1062
|
-
default: O(() => [c(E(
|
|
1068
|
+
onClick: l[2] ||= (e) => _e(1)
|
|
1069
|
+
}, [c(E(I), null, {
|
|
1070
|
+
default: O(() => [c(E(H))]),
|
|
1063
1071
|
_: 1
|
|
1064
1072
|
})], 8, ct),
|
|
1065
|
-
c(E(
|
|
1073
|
+
c(E(R), {
|
|
1066
1074
|
visible: y.value,
|
|
1067
1075
|
"onUpdate:visible": l[3] ||= (e) => y.value = e,
|
|
1068
1076
|
trigger: "click",
|
|
1069
1077
|
placement: "bottom-start",
|
|
1070
1078
|
disabled: o.disabled,
|
|
1071
|
-
width:
|
|
1072
|
-
"popper-class":
|
|
1073
|
-
"popper-options":
|
|
1079
|
+
width: G.value,
|
|
1080
|
+
"popper-class": pe.value,
|
|
1081
|
+
"popper-options": me.value
|
|
1074
1082
|
}, {
|
|
1075
1083
|
reference: O(() => [a("button", {
|
|
1076
1084
|
ref_key: "inlineMoreButtonRef",
|
|
1077
|
-
ref:
|
|
1085
|
+
ref: te,
|
|
1078
1086
|
type: "button",
|
|
1079
1087
|
class: m(["ml-ribbon-gallery__control-button ml-ribbon-gallery__more-button", { "is-open": y.value }]),
|
|
1080
1088
|
disabled: o.disabled,
|
|
1081
1089
|
"aria-label": "Show more gallery items",
|
|
1082
|
-
onClick:
|
|
1083
|
-
}, [c(E(
|
|
1084
|
-
default: O(() => [c(E(
|
|
1090
|
+
onClick: ye
|
|
1091
|
+
}, [c(E(I), null, {
|
|
1092
|
+
default: O(() => [c(E(ue))]),
|
|
1085
1093
|
_: 1
|
|
1086
1094
|
})], 10, lt)]),
|
|
1087
1095
|
default: O(() => [a("div", {
|
|
1088
1096
|
ref_key: "inlinePanelRef",
|
|
1089
|
-
ref:
|
|
1097
|
+
ref: A,
|
|
1090
1098
|
class: "ml-ribbon-gallery__panel"
|
|
1091
1099
|
}, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1092
1100
|
key: o.id,
|
|
1093
1101
|
class: "ml-ribbon-gallery__panel-category"
|
|
1094
|
-
}, [
|
|
1102
|
+
}, [K(o) ? (v(), i("h4", ut, w(o.title), 1)) : r("", !0), a("div", {
|
|
1095
1103
|
class: "ml-ribbon-gallery__panel-grid",
|
|
1096
|
-
style: h(
|
|
1104
|
+
style: h(W.value)
|
|
1097
1105
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
1098
1106
|
key: r.id,
|
|
1099
1107
|
type: "button",
|
|
1100
1108
|
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
1101
|
-
"data-gallery-row-index":
|
|
1102
|
-
disabled:
|
|
1103
|
-
onClick: (e) =>
|
|
1109
|
+
"data-gallery-row-index": q(r),
|
|
1110
|
+
disabled: X(r),
|
|
1111
|
+
onClick: (e) => we(r)
|
|
1104
1112
|
}, [S(t.$slots, "item", {
|
|
1105
1113
|
item: r,
|
|
1106
1114
|
category: o,
|
|
1107
1115
|
selected: _.value === r.id,
|
|
1108
|
-
disabled:
|
|
1109
|
-
select: () =>
|
|
1110
|
-
}, () => [
|
|
1116
|
+
disabled: X(r),
|
|
1117
|
+
select: () => we(r)
|
|
1118
|
+
}, () => [Y(r) ? (v(), n(C(Y(r)), f({
|
|
1111
1119
|
key: 0,
|
|
1112
1120
|
ref_for: !0
|
|
1113
1121
|
}, r.componentProps, {
|
|
1114
1122
|
item: r,
|
|
1115
1123
|
category: o,
|
|
1116
1124
|
selected: _.value === r.id,
|
|
1117
|
-
disabled:
|
|
1125
|
+
disabled: X(r)
|
|
1118
1126
|
}), null, 16, [
|
|
1119
1127
|
"item",
|
|
1120
1128
|
"category",
|
|
1121
1129
|
"selected",
|
|
1122
1130
|
"disabled"
|
|
1123
1131
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1124
|
-
"ml-ribbon-gallery__preview--icon": J(r) ||
|
|
1125
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1126
|
-
}]) }, [J(r) ? (v(), n(E(
|
|
1132
|
+
"ml-ribbon-gallery__preview--icon": J(r) || Z(r),
|
|
1133
|
+
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
1134
|
+
}]) }, [J(r) ? (v(), n(E(I), {
|
|
1127
1135
|
key: 0,
|
|
1128
1136
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1129
1137
|
}, {
|
|
1130
1138
|
default: O(() => [(v(), n(C(J(r))))]),
|
|
1131
1139
|
_: 2
|
|
1132
|
-
}, 1024)) :
|
|
1140
|
+
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1133
1141
|
key: 1,
|
|
1134
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class",
|
|
1142
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(r)]),
|
|
1135
1143
|
"aria-hidden": "true"
|
|
1136
|
-
}, null, 2)) :
|
|
1144
|
+
}, null, 2)) : Q(r) && Se(r) ? (v(), i("img", {
|
|
1137
1145
|
key: 2,
|
|
1138
1146
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1139
|
-
src:
|
|
1147
|
+
src: Q(r) ?? "",
|
|
1140
1148
|
alt: ""
|
|
1141
|
-
}, null, 8, ft)) :
|
|
1149
|
+
}, null, 8, ft)) : Q(r) ? (v(), i("svg", pt, [a("use", { href: Q(r) ?? "" }, null, 8, mt)])) : (v(), i(e, { key: 4 }, [s(w(Ce(r)), 1)], 64))], 2), a("div", ht, w(r.label), 1)], 64))])], 10, dt))), 128))], 4)]))), 128))], 512)]),
|
|
1142
1150
|
_: 3
|
|
1143
1151
|
}, 8, [
|
|
1144
1152
|
"visible",
|
|
@@ -1174,32 +1182,32 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1174
1182
|
},
|
|
1175
1183
|
emits: ["change"],
|
|
1176
1184
|
setup(e, { emit: a }) {
|
|
1177
|
-
let o = e, s = a, l = t(() =>
|
|
1185
|
+
let o = e, s = a, l = t(() => re(o.width, "96px")), u = t(() => l.value === "100%"), d = t(() => u.value ? { width: "100%" } : {}), p = t(() => u.value ? {} : { width: l.value }), g = t(() => j(o.prefixLabel)), _ = t(() => !o.prefixIcon || typeof o.prefixIcon == "string" ? null : o.prefixIcon), y = t(() => j(o.prefixIconClass ?? (typeof o.prefixIcon == "string" ? o.prefixIcon : void 0)) ?? null), x = t(() => !!(g.value || _.value || y.value)), S = t(() => g.value ?? o.id), T = b(void 0);
|
|
1178
1186
|
function D(e) {
|
|
1179
|
-
|
|
1187
|
+
A(e);
|
|
1180
1188
|
}
|
|
1181
|
-
function
|
|
1189
|
+
function te(e) {
|
|
1182
1190
|
e.preventDefault(), e.stopPropagation();
|
|
1183
1191
|
let t = e.target;
|
|
1184
1192
|
if (!(t instanceof HTMLInputElement)) return;
|
|
1185
|
-
let n =
|
|
1186
|
-
n === void 0 && t.value.trim().length > 0 ||
|
|
1193
|
+
let n = ne(t.value);
|
|
1194
|
+
n === void 0 && t.value.trim().length > 0 || A(n);
|
|
1187
1195
|
}
|
|
1188
|
-
function
|
|
1196
|
+
function A(e) {
|
|
1189
1197
|
Object.is(T.value, e) || (T.value = e, s("change", e));
|
|
1190
1198
|
}
|
|
1191
|
-
function
|
|
1199
|
+
function ne(e) {
|
|
1192
1200
|
let t = e.trim();
|
|
1193
1201
|
if (!t) return;
|
|
1194
1202
|
let n = Number(t);
|
|
1195
1203
|
return Number.isFinite(n) ? n : void 0;
|
|
1196
1204
|
}
|
|
1197
|
-
function
|
|
1205
|
+
function j(e) {
|
|
1198
1206
|
if (typeof e != "string") return;
|
|
1199
1207
|
let t = e.trim();
|
|
1200
1208
|
return t.length > 0 ? t : void 0;
|
|
1201
1209
|
}
|
|
1202
|
-
function
|
|
1210
|
+
function re(e, t) {
|
|
1203
1211
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1204
1212
|
if (typeof e == "string") {
|
|
1205
1213
|
let n = e.trim();
|
|
@@ -1214,8 +1222,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1214
1222
|
}]),
|
|
1215
1223
|
style: h(d.value),
|
|
1216
1224
|
"data-id": e.id,
|
|
1217
|
-
onKeydown: k(ee(
|
|
1218
|
-
}, [x.value ? (v(), i("span", wt, [_.value ? (v(), n(E(
|
|
1225
|
+
onKeydown: k(ee(te, ["stop", "prevent"]), ["enter"])
|
|
1226
|
+
}, [x.value ? (v(), i("span", wt, [_.value ? (v(), n(E(I), {
|
|
1219
1227
|
key: 0,
|
|
1220
1228
|
class: "ml-ribbon-input-number__prefix-icon",
|
|
1221
1229
|
"aria-hidden": "true"
|
|
@@ -1226,7 +1234,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1226
1234
|
key: 1,
|
|
1227
1235
|
class: m(["ml-ribbon-input-number__prefix-icon ml-ribbon-input-number__prefix-icon--class", y.value]),
|
|
1228
1236
|
"aria-hidden": "true"
|
|
1229
|
-
}, null, 2)) : r("", !0), g.value ? (v(), i("span", Tt, w(g.value), 1)) : r("", !0)])) : r("", !0), c(E(
|
|
1237
|
+
}, null, 2)) : r("", !0), g.value ? (v(), i("span", Tt, w(g.value), 1)) : r("", !0)])) : r("", !0), c(E(ie), f(e.controlProps, {
|
|
1230
1238
|
"model-value": e.modelValue,
|
|
1231
1239
|
disabled: e.disabled,
|
|
1232
1240
|
style: p.value,
|
|
@@ -1304,7 +1312,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1304
1312
|
return (t, o) => (v(), i("div", {
|
|
1305
1313
|
class: "ml-ribbon-segmented",
|
|
1306
1314
|
"data-id": e.id
|
|
1307
|
-
}, [d.value ? (v(), i("div", Ot, w(u.value), 1)) : r("", !0), c(E(
|
|
1315
|
+
}, [d.value ? (v(), i("div", Ot, w(u.value), 1)) : r("", !0), c(E(z), {
|
|
1308
1316
|
class: "ml-ribbon-segmented__control",
|
|
1309
1317
|
options: e.options,
|
|
1310
1318
|
"model-value": e.modelValue,
|
|
@@ -1317,7 +1325,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1317
1325
|
default: O(({ item: e }) => [a("span", {
|
|
1318
1326
|
class: "ml-ribbon-segmented__option",
|
|
1319
1327
|
"data-option-value": y(e)
|
|
1320
|
-
}, [h(e) ? (v(), n(E(
|
|
1328
|
+
}, [h(e) ? (v(), n(E(I), {
|
|
1321
1329
|
key: 0,
|
|
1322
1330
|
class: "ml-ribbon-segmented__option-icon",
|
|
1323
1331
|
"aria-hidden": "true"
|
|
@@ -1425,41 +1433,41 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1425
1433
|
},
|
|
1426
1434
|
emits: ["item-click"],
|
|
1427
1435
|
setup(o, { emit: c }) {
|
|
1428
|
-
let l = o, p = c, g = u(
|
|
1429
|
-
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !
|
|
1436
|
+
let l = o, p = c, g = u(pe, null), _ = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), y = oe("size", ""), k = t(() => y.value || "default"), ee = t(() => je(g?.tooltipShowAfter.value, 1e3)), te = t(() => je(g?.tooltipHideAfter.value, 0)), A = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${k.value}`), re = t(() => l.item.props?.icon || l.item.icon), M = t(() => l.item.hideLabel !== !0), N = b(void 0), P = t(() => l.item.type === "dropdown" && N.value ? N.value : ke(l.item.tooltip) ?? ke(l.item.label) ?? Le(l.item) ?? Re(l.item.id)), F = t(() => l.item.type !== "buttonGroup"), I = t(() => !F.value || !P.value), ie = t(() => P.value ?? l.item.id), R = t(() => l.item.keyTip?.trim().toUpperCase() ?? ""), z = t(() => {
|
|
1437
|
+
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !R.value) return !1;
|
|
1430
1438
|
let e = g.keyTipsSequence.value.toLowerCase();
|
|
1431
|
-
return e ?
|
|
1432
|
-
}),
|
|
1439
|
+
return e ? R.value.toLowerCase().startsWith(e) : !0;
|
|
1440
|
+
}), V = t(() => l.disabled === !0 || l.item.disabled === !0 || g?.disabled.value === !0), H = t(() => l.item.props?.modelValue), se = t(() => l.item.props?.activeLabel), ce = t(() => l.item.props?.inactiveLabel), le = t(() => Array.isArray(l.item.props?.categories) ? l.item.props.categories : []), ue = t(() => {
|
|
1433
1441
|
let e = l.item.props?.modelValue;
|
|
1434
1442
|
return typeof e == "string" ? e : void 0;
|
|
1435
|
-
}),
|
|
1443
|
+
}), de = t(() => {
|
|
1436
1444
|
let e = l.item.props?.inlineItemLimit;
|
|
1437
1445
|
return typeof e == "number" ? e : void 0;
|
|
1438
|
-
}),
|
|
1446
|
+
}), fe = t(() => {
|
|
1439
1447
|
let e = l.item.props?.component;
|
|
1440
1448
|
return !e || typeof e == "string" ? null : d(T(e));
|
|
1441
|
-
}),
|
|
1449
|
+
}), U = t(() => {
|
|
1442
1450
|
let e = l.item.props?.componentProps;
|
|
1443
1451
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
1444
|
-
}),
|
|
1452
|
+
}), W = t(() => l.item.props?.wrap !== !1), G = t(() => l.item.props?.equalWidth === !0), me = t(() => {
|
|
1445
1453
|
let e = l.item.props?.buttonSize;
|
|
1446
1454
|
if (e === "large" || e === "default" || e === "small") return e;
|
|
1447
|
-
}),
|
|
1455
|
+
}), he = t(() => Fe(l.item.props?.iconSize)), K = t(() => Me(l.item.props?.width ?? l.item.props?.comboWidth, "92px")), ge = t(() => l.item.props?.modelValue), _e = t(() => Me(l.item.props?.width ?? l.item.props?.inputNumberWidth, "96px")), q = t(() => l.item.props?.modelValue), ve = t(() => {
|
|
1448
1456
|
let e = { ...l.item.props ?? {} };
|
|
1449
1457
|
return delete e.modelValue, delete e.width, delete e.inputNumberWidth, delete e.prefixLabel, delete e.prefixIcon, delete e.prefixIconClass, delete e.emitValueOnChange, delete e.valuePrefix, delete e.options, delete e.component, delete e.componentProps, e;
|
|
1450
|
-
}), ye = t(() => Ie(l.item.props?.labelWrapLines)),
|
|
1451
|
-
if (!
|
|
1458
|
+
}), ye = t(() => Ie(l.item.props?.labelWrapLines)), be = t(() => Ne(l.item.props?.labelWrapWidth)), J = t(() => l.item.type === "button" && l.item.size === "large" && M.value && (ye.value ?? 0) > 1), Y = t(() => {
|
|
1459
|
+
if (!J.value) return {};
|
|
1452
1460
|
let e = { "--ml-rb-item-label-max-lines": String(ye.value ?? 2) };
|
|
1453
|
-
return
|
|
1461
|
+
return be.value && (e["--ml-rb-item-label-wrap-width"] = be.value), e;
|
|
1454
1462
|
});
|
|
1455
1463
|
D(() => l.item.id, () => {
|
|
1456
|
-
|
|
1464
|
+
N.value = void 0;
|
|
1457
1465
|
});
|
|
1458
1466
|
function X() {
|
|
1459
|
-
|
|
1467
|
+
V.value || p("item-click", l.id);
|
|
1460
1468
|
}
|
|
1461
1469
|
function Z(e) {
|
|
1462
|
-
if (!
|
|
1470
|
+
if (!V.value) {
|
|
1463
1471
|
if (typeof e == "string" || typeof e == "number") {
|
|
1464
1472
|
p("item-click", String(e));
|
|
1465
1473
|
return;
|
|
@@ -1467,11 +1475,11 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1467
1475
|
X();
|
|
1468
1476
|
}
|
|
1469
1477
|
}
|
|
1470
|
-
function
|
|
1471
|
-
|
|
1478
|
+
function Q(e) {
|
|
1479
|
+
N.value = e;
|
|
1472
1480
|
}
|
|
1473
|
-
function
|
|
1474
|
-
if (!
|
|
1481
|
+
function xe(e) {
|
|
1482
|
+
if (!V.value) {
|
|
1475
1483
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1476
1484
|
p("item-click", String(e));
|
|
1477
1485
|
return;
|
|
@@ -1479,8 +1487,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1479
1487
|
X();
|
|
1480
1488
|
}
|
|
1481
1489
|
}
|
|
1482
|
-
function
|
|
1483
|
-
if (
|
|
1490
|
+
function Se(e) {
|
|
1491
|
+
if (V.value) return;
|
|
1484
1492
|
let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
|
|
1485
1493
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
1486
1494
|
p("item-click", String(t));
|
|
@@ -1488,8 +1496,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1488
1496
|
}
|
|
1489
1497
|
p("item-click", String(e));
|
|
1490
1498
|
}
|
|
1491
|
-
function
|
|
1492
|
-
if (!
|
|
1499
|
+
function Ce(e) {
|
|
1500
|
+
if (!V.value) {
|
|
1493
1501
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1494
1502
|
p("item-click", String(e));
|
|
1495
1503
|
return;
|
|
@@ -1498,10 +1506,10 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1498
1506
|
}
|
|
1499
1507
|
}
|
|
1500
1508
|
function we(e) {
|
|
1501
|
-
|
|
1509
|
+
V.value || p("item-click", e);
|
|
1502
1510
|
}
|
|
1503
1511
|
function Te(e) {
|
|
1504
|
-
if (!
|
|
1512
|
+
if (!V.value) {
|
|
1505
1513
|
if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
|
|
1506
1514
|
p("item-click", String(e));
|
|
1507
1515
|
return;
|
|
@@ -1510,7 +1518,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1510
1518
|
}
|
|
1511
1519
|
}
|
|
1512
1520
|
function Ee(e) {
|
|
1513
|
-
if (!
|
|
1521
|
+
if (!V.value) {
|
|
1514
1522
|
if (l.item.props?.emitValueOnChange === !0 && typeof e == "number" && Number.isFinite(e)) {
|
|
1515
1523
|
let t = l.item.props?.valuePrefix;
|
|
1516
1524
|
p("item-click", `${typeof t == "string" ? t : ""}${e}`);
|
|
@@ -1520,7 +1528,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1520
1528
|
}
|
|
1521
1529
|
}
|
|
1522
1530
|
function De(e) {
|
|
1523
|
-
if (!
|
|
1531
|
+
if (!V.value) {
|
|
1524
1532
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1525
1533
|
p("item-click", String(e));
|
|
1526
1534
|
return;
|
|
@@ -1573,11 +1581,11 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1573
1581
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
1574
1582
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
1575
1583
|
}
|
|
1576
|
-
return (t, c) => (v(), n(E(
|
|
1577
|
-
content:
|
|
1578
|
-
disabled:
|
|
1584
|
+
return (t, c) => (v(), n(E(ae), {
|
|
1585
|
+
content: P.value,
|
|
1586
|
+
disabled: I.value,
|
|
1579
1587
|
"show-after": ee.value,
|
|
1580
|
-
"hide-after":
|
|
1588
|
+
"hide-after": te.value,
|
|
1581
1589
|
placement: "top",
|
|
1582
1590
|
effect: "dark"
|
|
1583
1591
|
}, {
|
|
@@ -1587,26 +1595,26 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1587
1595
|
`type-${o.item.type}`,
|
|
1588
1596
|
{
|
|
1589
1597
|
"is-label-hidden": o.item.hideLabel === !0,
|
|
1590
|
-
"is-label-wrap":
|
|
1598
|
+
"is-label-wrap": J.value
|
|
1591
1599
|
}
|
|
1592
1600
|
]]),
|
|
1593
1601
|
style: h(Y.value),
|
|
1594
1602
|
"data-item-id": o.id,
|
|
1595
1603
|
role: "group"
|
|
1596
|
-
}, [
|
|
1604
|
+
}, [z.value ? (v(), i("span", Lt, w(R.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Pe, {
|
|
1597
1605
|
key: 1,
|
|
1598
1606
|
id: o.item.id,
|
|
1599
1607
|
label: o.item.label ?? "",
|
|
1600
1608
|
options: o.item.props?.options ?? [],
|
|
1601
1609
|
"hide-label": o.item.hideLabel === !0,
|
|
1602
|
-
wrap:
|
|
1603
|
-
"equal-width":
|
|
1604
|
-
"button-size":
|
|
1605
|
-
"icon-size":
|
|
1610
|
+
wrap: W.value,
|
|
1611
|
+
"equal-width": G.value,
|
|
1612
|
+
"button-size": me.value,
|
|
1613
|
+
"icon-size": he.value,
|
|
1606
1614
|
"tooltip-show-after": ee.value,
|
|
1607
|
-
"tooltip-hide-after":
|
|
1608
|
-
disabled:
|
|
1609
|
-
onChange:
|
|
1615
|
+
"tooltip-hide-after": te.value,
|
|
1616
|
+
disabled: V.value,
|
|
1617
|
+
onChange: Ce
|
|
1610
1618
|
}, null, 8, [
|
|
1611
1619
|
"id",
|
|
1612
1620
|
"label",
|
|
@@ -1627,9 +1635,9 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1627
1635
|
"model-value": o.item.props?.modelValue,
|
|
1628
1636
|
direction: o.item.props?.direction ?? "horizontal",
|
|
1629
1637
|
block: o.item.props?.block === !0,
|
|
1630
|
-
disabled:
|
|
1638
|
+
disabled: V.value,
|
|
1631
1639
|
"hide-label": o.item.hideLabel === !0,
|
|
1632
|
-
onChange:
|
|
1640
|
+
onChange: xe
|
|
1633
1641
|
}, null, 8, [
|
|
1634
1642
|
"id",
|
|
1635
1643
|
"label",
|
|
@@ -1643,14 +1651,14 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1643
1651
|
key: 3,
|
|
1644
1652
|
id: o.item.id,
|
|
1645
1653
|
label: o.item.label ?? o.item.id,
|
|
1646
|
-
"model-value":
|
|
1654
|
+
"model-value": H.value,
|
|
1647
1655
|
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1648
1656
|
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1649
|
-
"active-label":
|
|
1650
|
-
"inactive-label":
|
|
1651
|
-
disabled:
|
|
1657
|
+
"active-label": se.value,
|
|
1658
|
+
"inactive-label": ce.value,
|
|
1659
|
+
disabled: V.value,
|
|
1652
1660
|
"hide-label": o.item.hideLabel === !0,
|
|
1653
|
-
onChange:
|
|
1661
|
+
onChange: Se
|
|
1654
1662
|
}, null, 8, [
|
|
1655
1663
|
"id",
|
|
1656
1664
|
"label",
|
|
@@ -1665,12 +1673,12 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1665
1673
|
key: 4,
|
|
1666
1674
|
id: o.item.id,
|
|
1667
1675
|
label: o.item.label ?? "",
|
|
1668
|
-
categories:
|
|
1669
|
-
"model-value":
|
|
1676
|
+
categories: le.value,
|
|
1677
|
+
"model-value": ue.value,
|
|
1670
1678
|
collapsed: o.item.props?.collapsed === !0,
|
|
1671
|
-
"inline-item-limit":
|
|
1679
|
+
"inline-item-limit": de.value,
|
|
1672
1680
|
"preview-fallback": l.galleryPreviewFallback,
|
|
1673
|
-
disabled:
|
|
1681
|
+
disabled: V.value,
|
|
1674
1682
|
onSelect: we
|
|
1675
1683
|
}, null, 8, [
|
|
1676
1684
|
"id",
|
|
@@ -1685,12 +1693,12 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1685
1693
|
key: 5,
|
|
1686
1694
|
id: o.item.id,
|
|
1687
1695
|
item: o.item,
|
|
1688
|
-
disabled:
|
|
1696
|
+
disabled: V.value
|
|
1689
1697
|
}, {
|
|
1690
|
-
default: O(() => [
|
|
1698
|
+
default: O(() => [fe.value ? (v(), n(C(fe.value), f({ key: 0 }, U.value, {
|
|
1691
1699
|
item: o.item,
|
|
1692
1700
|
"group-id": o.groupId,
|
|
1693
|
-
disabled:
|
|
1701
|
+
disabled: V.value,
|
|
1694
1702
|
"emit-item-click": De
|
|
1695
1703
|
}), null, 16, [
|
|
1696
1704
|
"item",
|
|
@@ -1699,7 +1707,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1699
1707
|
])) : S(t.$slots, "template", {
|
|
1700
1708
|
key: 1,
|
|
1701
1709
|
item: o.item,
|
|
1702
|
-
disabled:
|
|
1710
|
+
disabled: V.value
|
|
1703
1711
|
})]),
|
|
1704
1712
|
_: 3
|
|
1705
1713
|
}, 8, [
|
|
@@ -1711,16 +1719,16 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1711
1719
|
id: o.item.id,
|
|
1712
1720
|
label: o.item.label ?? o.item.id,
|
|
1713
1721
|
tooltip: o.item.tooltip,
|
|
1714
|
-
icon:
|
|
1722
|
+
icon: re.value,
|
|
1715
1723
|
options: o.item.props?.options ?? [],
|
|
1716
|
-
disabled:
|
|
1724
|
+
disabled: V.value,
|
|
1717
1725
|
"hide-label": o.item.hideLabel === !0,
|
|
1718
1726
|
"item-size": o.item.size ?? "medium",
|
|
1719
1727
|
"sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
|
|
1720
1728
|
"tooltip-show-after": ee.value,
|
|
1721
|
-
"tooltip-hide-after":
|
|
1729
|
+
"tooltip-hide-after": te.value,
|
|
1722
1730
|
onCommand: Z,
|
|
1723
|
-
onTooltipChange:
|
|
1731
|
+
onTooltipChange: Q,
|
|
1724
1732
|
onClick: X
|
|
1725
1733
|
}, null, 8, [
|
|
1726
1734
|
"id",
|
|
@@ -1734,26 +1742,26 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1734
1742
|
"sync-label-with-selection",
|
|
1735
1743
|
"tooltip-show-after",
|
|
1736
1744
|
"tooltip-hide-after"
|
|
1737
|
-
])) : o.item.type === "checkbox" ? (v(), n(E(
|
|
1745
|
+
])) : o.item.type === "checkbox" ? (v(), n(E(ne), {
|
|
1738
1746
|
key: 7,
|
|
1739
|
-
disabled:
|
|
1747
|
+
disabled: V.value,
|
|
1740
1748
|
onChange: X
|
|
1741
1749
|
}, {
|
|
1742
1750
|
default: O(() => [s(w(o.item.label), 1)]),
|
|
1743
1751
|
_: 1
|
|
1744
|
-
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(
|
|
1752
|
+
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(j), {
|
|
1745
1753
|
key: 8,
|
|
1746
|
-
disabled:
|
|
1754
|
+
disabled: V.value,
|
|
1747
1755
|
onChange: X
|
|
1748
|
-
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(
|
|
1756
|
+
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(B), {
|
|
1749
1757
|
key: 9,
|
|
1750
|
-
"model-value":
|
|
1751
|
-
disabled:
|
|
1752
|
-
"popper-class":
|
|
1753
|
-
style: h({ width:
|
|
1758
|
+
"model-value": ge.value,
|
|
1759
|
+
disabled: V.value,
|
|
1760
|
+
"popper-class": A.value,
|
|
1761
|
+
style: h({ width: K.value }),
|
|
1754
1762
|
onChange: Te
|
|
1755
1763
|
}, {
|
|
1756
|
-
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(
|
|
1764
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(L), {
|
|
1757
1765
|
key: String(e.value),
|
|
1758
1766
|
label: String(e.label),
|
|
1759
1767
|
value: e.value
|
|
@@ -1767,13 +1775,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1767
1775
|
])) : o.item.type === "inputNumber" ? (v(), n(Et, {
|
|
1768
1776
|
key: 10,
|
|
1769
1777
|
id: o.item.id,
|
|
1770
|
-
"model-value":
|
|
1771
|
-
width:
|
|
1778
|
+
"model-value": q.value,
|
|
1779
|
+
width: _e.value,
|
|
1772
1780
|
"prefix-label": o.item.props?.prefixLabel,
|
|
1773
1781
|
"prefix-icon": o.item.props?.prefixIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1774
1782
|
"prefix-icon-class": o.item.props?.prefixIconClass,
|
|
1775
1783
|
"control-props": ve.value,
|
|
1776
|
-
disabled:
|
|
1784
|
+
disabled: V.value,
|
|
1777
1785
|
onChange: Ee
|
|
1778
1786
|
}, null, 8, [
|
|
1779
1787
|
"id",
|
|
@@ -1788,10 +1796,10 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1788
1796
|
key: 11,
|
|
1789
1797
|
id: o.item.id,
|
|
1790
1798
|
label: o.item.label ?? o.item.id,
|
|
1791
|
-
icon:
|
|
1792
|
-
disabled:
|
|
1793
|
-
"hide-label": !
|
|
1794
|
-
"aria-label":
|
|
1799
|
+
icon: re.value,
|
|
1800
|
+
disabled: V.value,
|
|
1801
|
+
"hide-label": !M.value,
|
|
1802
|
+
"aria-label": ie.value,
|
|
1795
1803
|
onClick: X
|
|
1796
1804
|
}, null, 8, [
|
|
1797
1805
|
"id",
|
|
@@ -1877,7 +1885,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1877
1885
|
},
|
|
1878
1886
|
emits: ["item-click"],
|
|
1879
1887
|
setup(e, { emit: o }) {
|
|
1880
|
-
let s = e, l = o, d = u(
|
|
1888
|
+
let s = e, l = o, d = u(pe, null), f = t(() => s.width == null), y = t(() => {
|
|
1881
1889
|
if (typeof s.width != "number" || Number.isNaN(s.width) || s.width <= 0) return;
|
|
1882
1890
|
let e = `${s.width}px`;
|
|
1883
1891
|
return {
|
|
@@ -1886,13 +1894,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1886
1894
|
maxWidth: e,
|
|
1887
1895
|
flex: `0 0 ${e}`
|
|
1888
1896
|
};
|
|
1889
|
-
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), ee = b(null),
|
|
1897
|
+
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), ee = b(null), A = b(null), ne = b(0), j = b(0), re = oe("size", ""), M = t(() => re.value || "default"), N = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${M.value}`), P = t(() => ({ modifiers: [{
|
|
1890
1898
|
name: "offset",
|
|
1891
|
-
options: { offset: [
|
|
1892
|
-
}] })),
|
|
1899
|
+
options: { offset: [ne.value, 8] }
|
|
1900
|
+
}] })), F = t(() => ({ modifiers: [{
|
|
1893
1901
|
name: "offset",
|
|
1894
|
-
options: { offset: [
|
|
1895
|
-
}] })),
|
|
1902
|
+
options: { offset: [j.value, 8] }
|
|
1903
|
+
}] })), ie = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), L = t(() => k.value.length > 0), z = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), B = b(!1), V = b(!1), ae = t(() => {
|
|
1896
1904
|
if (!s.groupModel || !k.value.length) return null;
|
|
1897
1905
|
let e = new Set(k.value), t = s.groupModel.collections?.map((t) => ({
|
|
1898
1906
|
...t,
|
|
@@ -1902,7 +1910,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1902
1910
|
...s.groupModel,
|
|
1903
1911
|
collections: t
|
|
1904
1912
|
} : null;
|
|
1905
|
-
}),
|
|
1913
|
+
}), se = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
1906
1914
|
id: `${s.groupModel.id}-footer-menu`,
|
|
1907
1915
|
title: "",
|
|
1908
1916
|
orientation: "row",
|
|
@@ -1912,7 +1920,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1912
1920
|
items: s.groupModel.footerMenuItems
|
|
1913
1921
|
}]
|
|
1914
1922
|
} : null);
|
|
1915
|
-
function
|
|
1923
|
+
function le() {
|
|
1916
1924
|
let e = T.value?.querySelector(".ml-ribbon-group__content");
|
|
1917
1925
|
if (!e) {
|
|
1918
1926
|
k.value.length > 0 && (k.value = []);
|
|
@@ -1931,57 +1939,57 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1931
1939
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
1932
1940
|
}), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
|
|
1933
1941
|
}
|
|
1934
|
-
function
|
|
1942
|
+
function ue() {
|
|
1935
1943
|
p(() => {
|
|
1936
|
-
|
|
1944
|
+
_e(), de(), fe(), le();
|
|
1937
1945
|
});
|
|
1938
1946
|
}
|
|
1939
|
-
function
|
|
1947
|
+
function de() {
|
|
1940
1948
|
let e = T.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
|
|
1941
1949
|
if (!e || !t) {
|
|
1942
|
-
|
|
1950
|
+
ne.value !== 0 && (ne.value = 0);
|
|
1943
1951
|
return;
|
|
1944
1952
|
}
|
|
1945
1953
|
let n = Math.round(e.left - t.left);
|
|
1946
|
-
|
|
1954
|
+
ne.value !== n && (ne.value = n);
|
|
1947
1955
|
}
|
|
1948
|
-
function
|
|
1949
|
-
let e = T.value?.getBoundingClientRect(), t =
|
|
1956
|
+
function fe() {
|
|
1957
|
+
let e = T.value?.getBoundingClientRect(), t = A.value?.getBoundingClientRect();
|
|
1950
1958
|
if (!e || !t) {
|
|
1951
|
-
|
|
1959
|
+
j.value !== 0 && (j.value = 0);
|
|
1952
1960
|
return;
|
|
1953
1961
|
}
|
|
1954
1962
|
let n = Math.round(e.left - t.left);
|
|
1955
|
-
|
|
1963
|
+
j.value !== n && (j.value = n);
|
|
1964
|
+
}
|
|
1965
|
+
function W(e) {
|
|
1966
|
+
B.value = e;
|
|
1956
1967
|
}
|
|
1957
1968
|
function G(e) {
|
|
1958
1969
|
V.value = e;
|
|
1959
1970
|
}
|
|
1960
|
-
function
|
|
1961
|
-
|
|
1971
|
+
function me() {
|
|
1972
|
+
x.value || (B.value = !B.value);
|
|
1962
1973
|
}
|
|
1963
|
-
function
|
|
1974
|
+
function he() {
|
|
1964
1975
|
x.value || (V.value = !V.value);
|
|
1965
1976
|
}
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
let q = null, he = null;
|
|
1970
|
-
function ge() {
|
|
1971
|
-
if (!q) return;
|
|
1977
|
+
let K = null, ge = null;
|
|
1978
|
+
function _e() {
|
|
1979
|
+
if (!K) return;
|
|
1972
1980
|
let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
1973
|
-
|
|
1981
|
+
ge !== e && (ge && K.unobserve(ge), e && K.observe(e), ge = e);
|
|
1974
1982
|
}
|
|
1975
1983
|
return D(() => s.groupModel, () => {
|
|
1976
|
-
|
|
1984
|
+
ue();
|
|
1977
1985
|
}, { deep: !0 }), D(x, (e) => {
|
|
1978
|
-
e && (
|
|
1986
|
+
e && (B.value = !1, V.value = !1);
|
|
1979
1987
|
}), g(() => {
|
|
1980
|
-
typeof ResizeObserver < "u" && (
|
|
1981
|
-
|
|
1982
|
-
}), T.value &&
|
|
1988
|
+
typeof ResizeObserver < "u" && (K = new ResizeObserver(() => {
|
|
1989
|
+
de(), fe(), le();
|
|
1990
|
+
}), T.value && K.observe(T.value), _e()), ue();
|
|
1983
1991
|
}), _(() => {
|
|
1984
|
-
|
|
1992
|
+
K?.disconnect();
|
|
1985
1993
|
}), (t, o) => (v(), i("section", {
|
|
1986
1994
|
ref_key: "groupSectionRef",
|
|
1987
1995
|
ref: T,
|
|
@@ -1989,39 +1997,39 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
1989
1997
|
"data-priority": e.priority ?? 100,
|
|
1990
1998
|
style: h(y.value)
|
|
1991
1999
|
}, [a("div", Vt, [S(t.$slots, "default")]), a("footer", Ht, [
|
|
1992
|
-
|
|
2000
|
+
ie.value ? (v(), n(E(I), {
|
|
1993
2001
|
key: 0,
|
|
1994
2002
|
class: "ml-ribbon-group__icon"
|
|
1995
2003
|
}, {
|
|
1996
|
-
default: O(() => [(v(), n(C(
|
|
2004
|
+
default: O(() => [(v(), n(C(ie.value)))]),
|
|
1997
2005
|
_: 1
|
|
1998
2006
|
})) : r("", !0),
|
|
1999
2007
|
a("span", Ut, w(e.title), 1),
|
|
2000
|
-
|
|
2008
|
+
z.value && se.value ? (v(), n(E(R), {
|
|
2001
2009
|
key: 1,
|
|
2002
2010
|
trigger: "click",
|
|
2003
2011
|
placement: "bottom-start",
|
|
2004
2012
|
disabled: x.value,
|
|
2005
|
-
"popper-class":
|
|
2006
|
-
"popper-options":
|
|
2007
|
-
onShow: o[1] ||= (e) =>
|
|
2008
|
-
onHide: o[2] ||= (e) =>
|
|
2013
|
+
"popper-class": N.value,
|
|
2014
|
+
"popper-options": F.value,
|
|
2015
|
+
onShow: o[1] ||= (e) => W(!0),
|
|
2016
|
+
onHide: o[2] ||= (e) => W(!1)
|
|
2009
2017
|
}, {
|
|
2010
2018
|
reference: O(() => [a("button", {
|
|
2011
2019
|
ref_key: "footerTriggerRef",
|
|
2012
|
-
ref:
|
|
2020
|
+
ref: A,
|
|
2013
2021
|
type: "button",
|
|
2014
|
-
class: m(["ml-ribbon-group__footer-trigger", { "is-open":
|
|
2022
|
+
class: m(["ml-ribbon-group__footer-trigger", { "is-open": B.value }]),
|
|
2015
2023
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2016
|
-
"aria-expanded":
|
|
2024
|
+
"aria-expanded": B.value,
|
|
2017
2025
|
disabled: x.value,
|
|
2018
|
-
onClick:
|
|
2019
|
-
}, [c(E(
|
|
2020
|
-
default: O(() => [(v(), n(C(
|
|
2026
|
+
onClick: me
|
|
2027
|
+
}, [c(E(I), null, {
|
|
2028
|
+
default: O(() => [(v(), n(C(B.value ? E(ce) : E(H))))]),
|
|
2021
2029
|
_: 1
|
|
2022
2030
|
})], 10, Wt)]),
|
|
2023
2031
|
default: O(() => [a("div", Gt, [c(zt, {
|
|
2024
|
-
group:
|
|
2032
|
+
group: se.value,
|
|
2025
2033
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2026
2034
|
disabled: x.value,
|
|
2027
2035
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
@@ -2036,31 +2044,31 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2036
2044
|
"popper-class",
|
|
2037
2045
|
"popper-options"
|
|
2038
2046
|
])) : r("", !0),
|
|
2039
|
-
|
|
2047
|
+
L.value && ae.value ? (v(), n(E(R), {
|
|
2040
2048
|
key: 2,
|
|
2041
2049
|
trigger: "click",
|
|
2042
2050
|
placement: "bottom-start",
|
|
2043
2051
|
disabled: x.value,
|
|
2044
|
-
"popper-class":
|
|
2045
|
-
"popper-options":
|
|
2046
|
-
onShow: o[4] ||= (e) =>
|
|
2047
|
-
onHide: o[5] ||= (e) =>
|
|
2052
|
+
"popper-class": N.value,
|
|
2053
|
+
"popper-options": P.value,
|
|
2054
|
+
onShow: o[4] ||= (e) => G(!0),
|
|
2055
|
+
onHide: o[5] ||= (e) => G(!1)
|
|
2048
2056
|
}, {
|
|
2049
2057
|
reference: O(() => [a("button", {
|
|
2050
2058
|
ref_key: "overflowTriggerRef",
|
|
2051
2059
|
ref: ee,
|
|
2052
2060
|
type: "button",
|
|
2053
|
-
class: m(["ml-ribbon-group__overflow-trigger", { "is-open":
|
|
2061
|
+
class: m(["ml-ribbon-group__overflow-trigger", { "is-open": V.value }]),
|
|
2054
2062
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2055
|
-
"aria-expanded":
|
|
2063
|
+
"aria-expanded": V.value,
|
|
2056
2064
|
disabled: x.value,
|
|
2057
|
-
onClick:
|
|
2058
|
-
}, [c(E(
|
|
2059
|
-
default: O(() => [(v(), n(C(
|
|
2065
|
+
onClick: he
|
|
2066
|
+
}, [c(E(I), null, {
|
|
2067
|
+
default: O(() => [(v(), n(C(V.value ? E(ce) : E(H))))]),
|
|
2060
2068
|
_: 1
|
|
2061
2069
|
})], 10, Kt)]),
|
|
2062
2070
|
default: O(() => [a("div", qt, [c(zt, {
|
|
2063
|
-
group:
|
|
2071
|
+
group: ae.value,
|
|
2064
2072
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2065
2073
|
disabled: x.value,
|
|
2066
2074
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
@@ -2075,14 +2083,14 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2075
2083
|
"popper-class",
|
|
2076
2084
|
"popper-options"
|
|
2077
2085
|
])) : r("", !0),
|
|
2078
|
-
e.showLauncherIcon ?? e.launcher ? (v(), n(E(
|
|
2086
|
+
e.showLauncherIcon ?? e.launcher ? (v(), n(E(te), {
|
|
2079
2087
|
key: 3,
|
|
2080
2088
|
link: "",
|
|
2081
2089
|
class: "ml-ribbon-group__launcher",
|
|
2082
2090
|
disabled: x.value
|
|
2083
2091
|
}, {
|
|
2084
|
-
default: O(() => [c(E(
|
|
2085
|
-
default: O(() => [c(E(
|
|
2092
|
+
default: O(() => [c(E(I), null, {
|
|
2093
|
+
default: O(() => [c(E(U))]),
|
|
2086
2094
|
_: 1
|
|
2087
2095
|
})]),
|
|
2088
2096
|
_: 1
|
|
@@ -2192,7 +2200,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2192
2200
|
props: k(e.props)
|
|
2193
2201
|
};
|
|
2194
2202
|
}
|
|
2195
|
-
function
|
|
2203
|
+
function A(e) {
|
|
2196
2204
|
return {
|
|
2197
2205
|
...e,
|
|
2198
2206
|
icon: f(e.icon),
|
|
@@ -2203,16 +2211,16 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2203
2211
|
}))
|
|
2204
2212
|
};
|
|
2205
2213
|
}
|
|
2206
|
-
function
|
|
2214
|
+
function ne(e) {
|
|
2207
2215
|
return e.map((e) => ({
|
|
2208
2216
|
...e,
|
|
2209
|
-
groups: e.groups?.map(
|
|
2217
|
+
groups: e.groups?.map(A)
|
|
2210
2218
|
}));
|
|
2211
2219
|
}
|
|
2212
|
-
function
|
|
2220
|
+
function j(e, t) {
|
|
2213
2221
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
2214
2222
|
}
|
|
2215
|
-
let
|
|
2223
|
+
let M = {
|
|
2216
2224
|
layoutSwitcherTooltip: "Switch ribbon layout",
|
|
2217
2225
|
minimizeTooltip: "Minimize ribbon",
|
|
2218
2226
|
keyTipsToggleText: "Key Tips",
|
|
@@ -2227,62 +2235,62 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2227
2235
|
keyTipsEmptySequence: "No key sequence",
|
|
2228
2236
|
contextualTabDefaultTitle: "Contextual",
|
|
2229
2237
|
galleryPreviewFallback: "Preview unavailable"
|
|
2230
|
-
},
|
|
2231
|
-
y(
|
|
2232
|
-
|
|
2233
|
-
}, { deep: !0 }), D(() =>
|
|
2234
|
-
e !==
|
|
2235
|
-
}), D(() =>
|
|
2238
|
+
}, N = s, P = u, { context: F, visibleTabs: ie } = ve(N.id, N.tabs, N.disabled, N.activeLayout ? String(N.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : N.layout, N.minimized, N.activeTab || N.tabs[0]?.id || "", j(N.tooltipShowAfter, 1e3), j(N.tooltipHideAfter, 0));
|
|
2239
|
+
y(pe, F), D(() => N.tabs, (e) => {
|
|
2240
|
+
F.tabs.value = ne(e), F.tabs.value.some((e) => e.id === F.activeTab.value) || (F.activeTab.value = F.tabs.value[0]?.id || "");
|
|
2241
|
+
}, { deep: !0 }), D(() => N.layout, (e) => {
|
|
2242
|
+
e !== F.layout.value && (F.layout.value = e);
|
|
2243
|
+
}), D(() => N.activeLayout, (e) => {
|
|
2236
2244
|
if (!e) return;
|
|
2237
2245
|
let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
|
|
2238
|
-
t !==
|
|
2239
|
-
}), D(() =>
|
|
2240
|
-
e !==
|
|
2241
|
-
}), D(() =>
|
|
2242
|
-
e !==
|
|
2243
|
-
}), D(() =>
|
|
2244
|
-
e && e !==
|
|
2245
|
-
}), D(() =>
|
|
2246
|
-
let t =
|
|
2247
|
-
t !==
|
|
2248
|
-
}), D(() =>
|
|
2249
|
-
let t =
|
|
2250
|
-
t !==
|
|
2251
|
-
}), D(
|
|
2252
|
-
|
|
2253
|
-
}), D(
|
|
2254
|
-
|
|
2255
|
-
}), D(
|
|
2256
|
-
|
|
2257
|
-
}), D(
|
|
2258
|
-
|
|
2259
|
-
}), D(
|
|
2260
|
-
|
|
2246
|
+
t !== F.layout.value && (F.layout.value = t);
|
|
2247
|
+
}), D(() => N.minimized, (e) => {
|
|
2248
|
+
e !== F.minimized.value && (F.minimized.value = e);
|
|
2249
|
+
}), D(() => N.disabled, (e) => {
|
|
2250
|
+
e !== F.disabled.value && (F.disabled.value = e);
|
|
2251
|
+
}), D(() => N.activeTab, (e) => {
|
|
2252
|
+
e && e !== F.activeTab.value && (F.activeTab.value = e);
|
|
2253
|
+
}), D(() => N.tooltipShowAfter, (e) => {
|
|
2254
|
+
let t = j(e, 1e3);
|
|
2255
|
+
t !== F.tooltipShowAfter.value && (F.tooltipShowAfter.value = t);
|
|
2256
|
+
}), D(() => N.tooltipHideAfter, (e) => {
|
|
2257
|
+
let t = j(e, 0);
|
|
2258
|
+
t !== F.tooltipHideAfter.value && (F.tooltipHideAfter.value = t);
|
|
2259
|
+
}), D(F.activeTab, (e) => {
|
|
2260
|
+
P("update:activeTab", e), P("tabChange", e);
|
|
2261
|
+
}), D(F.layout, (e) => {
|
|
2262
|
+
P("update:layout", e), P("layoutChange", e);
|
|
2263
|
+
}), D(F.minimized, (e) => {
|
|
2264
|
+
P("update:minimized", e);
|
|
2265
|
+
}), D(F.overflowOpen, (e) => {
|
|
2266
|
+
P(e ? "overflowOpen" : "overflowClose");
|
|
2267
|
+
}), D(F.backdropOpen, (e) => {
|
|
2268
|
+
P(e ? "backstageOpen" : "backstageClose");
|
|
2261
2269
|
});
|
|
2262
|
-
let
|
|
2270
|
+
let L = t(() => ie.value.find((e) => e.id === F.activeTab.value)), z = t(() => new Set(ie.value.filter((e) => e.contextual && e.contextualMode === "exclusive").map((e) => e.id))), B = t(() => Le(L.value)), H = t(() => L.value?.groups?.filter((e) => e.visible !== !1) ?? []), ce = b(null), ue = b(null), U = b(null), W = b(null), G = b(!1), me = b(0), he = b({
|
|
2263
2271
|
left: "0px",
|
|
2264
2272
|
top: "0px",
|
|
2265
2273
|
width: "1px",
|
|
2266
2274
|
height: "0px"
|
|
2267
|
-
}),
|
|
2268
|
-
layoutSwitcherTooltip:
|
|
2269
|
-
minimizeTooltip:
|
|
2270
|
-
keyTipsToggleText:
|
|
2271
|
-
overflowTriggerAriaLabel:
|
|
2272
|
-
groupOverflowTriggerAriaLabel:
|
|
2273
|
-
fileMenuLabel:
|
|
2274
|
-
fileMenuOpenBackstageLabel:
|
|
2275
|
-
backstageBackLabel:
|
|
2276
|
-
backstageTitle:
|
|
2277
|
-
backstageDescription:
|
|
2278
|
-
keyTipsSequencePrefix:
|
|
2279
|
-
keyTipsEmptySequence:
|
|
2280
|
-
contextualTabDefaultTitle:
|
|
2281
|
-
galleryPreviewFallback:
|
|
2282
|
-
})), Z = t(() =>
|
|
2283
|
-
if (!
|
|
2284
|
-
let e =
|
|
2285
|
-
let n =
|
|
2275
|
+
}), K = b(/* @__PURE__ */ new Set()), ge = b({}), _e = oe("size", ""), q = t(() => N.size || _e.value || "default"), ye = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${q.value}`), be = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${q.value}`), J = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${q.value}`), Y = t(() => ({
|
|
2276
|
+
layoutSwitcherTooltip: N.texts.layoutSwitcherTooltip || M.layoutSwitcherTooltip,
|
|
2277
|
+
minimizeTooltip: N.texts.minimizeTooltip || M.minimizeTooltip,
|
|
2278
|
+
keyTipsToggleText: N.texts.keyTipsToggleText || M.keyTipsToggleText,
|
|
2279
|
+
overflowTriggerAriaLabel: N.texts.overflowTriggerAriaLabel || M.overflowTriggerAriaLabel,
|
|
2280
|
+
groupOverflowTriggerAriaLabel: N.texts.groupOverflowTriggerAriaLabel || M.groupOverflowTriggerAriaLabel,
|
|
2281
|
+
fileMenuLabel: N.texts.fileMenuLabel || M.fileMenuLabel,
|
|
2282
|
+
fileMenuOpenBackstageLabel: N.texts.fileMenuOpenBackstageLabel || M.fileMenuOpenBackstageLabel,
|
|
2283
|
+
backstageBackLabel: N.texts.backstageBackLabel || M.backstageBackLabel,
|
|
2284
|
+
backstageTitle: N.texts.backstageTitle || M.backstageTitle,
|
|
2285
|
+
backstageDescription: N.texts.backstageDescription || M.backstageDescription,
|
|
2286
|
+
keyTipsSequencePrefix: N.texts.keyTipsSequencePrefix || M.keyTipsSequencePrefix,
|
|
2287
|
+
keyTipsEmptySequence: N.texts.keyTipsEmptySequence || M.keyTipsEmptySequence,
|
|
2288
|
+
contextualTabDefaultTitle: N.texts.contextualTabDefaultTitle || M.contextualTabDefaultTitle,
|
|
2289
|
+
galleryPreviewFallback: N.texts.galleryPreviewFallback || M.galleryPreviewFallback
|
|
2290
|
+
})), Z = t(() => j(N.tooltipShowAfter, 1e3)), Q = t(() => j(N.tooltipHideAfter, 0)), xe = t(() => F.minimized.value ? le : se), Se = t(() => H.value.filter((e) => !K.value.has(e.id))), Ce = t(() => H.value.filter((e) => K.value.has(e.id))), we = t(() => {
|
|
2291
|
+
if (!Ce.value.length) return 220;
|
|
2292
|
+
let e = Ce.value.reduce((e, t) => {
|
|
2293
|
+
let n = ge.value[t.id] ?? ke(t);
|
|
2286
2294
|
return Math.max(e, n);
|
|
2287
2295
|
}, 0), t = Math.ceil(e + 40);
|
|
2288
2296
|
return Math.max(220, Math.min(720, t));
|
|
@@ -2318,8 +2326,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2318
2326
|
}), t;
|
|
2319
2327
|
}
|
|
2320
2328
|
function je() {
|
|
2321
|
-
let e =
|
|
2322
|
-
let n =
|
|
2329
|
+
let e = H.value.reduce((e, t) => {
|
|
2330
|
+
let n = ge.value[t.id] ?? ke(t);
|
|
2323
2331
|
return e + Math.max(n, ke(t));
|
|
2324
2332
|
}, 0);
|
|
2325
2333
|
return Math.max(220, e);
|
|
@@ -2329,20 +2337,20 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2329
2337
|
return Number.isFinite(t) && t > 0 ? t : vn;
|
|
2330
2338
|
}
|
|
2331
2339
|
function Ne() {
|
|
2332
|
-
if (
|
|
2333
|
-
|
|
2340
|
+
if (F.layout.value !== "classic") {
|
|
2341
|
+
K.value = /* @__PURE__ */ new Set();
|
|
2334
2342
|
return;
|
|
2335
2343
|
}
|
|
2336
|
-
let e =
|
|
2344
|
+
let e = F.minimized.value ? W.value : U.value;
|
|
2337
2345
|
if (!e) return;
|
|
2338
|
-
let t =
|
|
2346
|
+
let t = H.value;
|
|
2339
2347
|
if (!t.length) {
|
|
2340
|
-
|
|
2348
|
+
K.value = /* @__PURE__ */ new Set();
|
|
2341
2349
|
return;
|
|
2342
2350
|
}
|
|
2343
2351
|
let n = Math.round(e.getBoundingClientRect().width), r = Me(e), i = Ae(e);
|
|
2344
|
-
|
|
2345
|
-
...
|
|
2352
|
+
ge.value = {
|
|
2353
|
+
...ge.value,
|
|
2346
2354
|
...i
|
|
2347
2355
|
};
|
|
2348
2356
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
@@ -2356,28 +2364,28 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2356
2364
|
let e = c[p].group;
|
|
2357
2365
|
s.add(e.id), p += 1;
|
|
2358
2366
|
}
|
|
2359
|
-
|
|
2367
|
+
K.value = s;
|
|
2360
2368
|
}
|
|
2361
2369
|
function Pe() {
|
|
2362
2370
|
p(() => {
|
|
2363
|
-
if (
|
|
2371
|
+
if (F.layout.value !== "classic" || F.minimized.value) {
|
|
2364
2372
|
Ne();
|
|
2365
2373
|
return;
|
|
2366
2374
|
}
|
|
2367
|
-
if (
|
|
2375
|
+
if (K.value.size === 0) {
|
|
2368
2376
|
Ne();
|
|
2369
2377
|
return;
|
|
2370
2378
|
}
|
|
2371
|
-
|
|
2379
|
+
K.value = /* @__PURE__ */ new Set(), p(() => {
|
|
2372
2380
|
Ne();
|
|
2373
2381
|
});
|
|
2374
2382
|
});
|
|
2375
2383
|
}
|
|
2376
2384
|
function Fe() {
|
|
2377
|
-
let e =
|
|
2385
|
+
let e = ce.value, t = ue.value;
|
|
2378
2386
|
if (!e || !t) return;
|
|
2379
2387
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = Number.parseFloat(getComputedStyle(e).borderLeftWidth || "0") || 0, a = Math.max(n.width - i * 2, e.clientWidth, r.width, t.clientWidth);
|
|
2380
|
-
|
|
2388
|
+
me.value = Math.round(a > 0 ? a : F.layout.value === "classic" ? je() : Math.max(360, H.value.length * 120)), he.value = {
|
|
2381
2389
|
left: `${Math.round(n.left - r.left + i)}px`,
|
|
2382
2390
|
top: "0px",
|
|
2383
2391
|
width: "1px",
|
|
@@ -2385,41 +2393,41 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2385
2393
|
};
|
|
2386
2394
|
}
|
|
2387
2395
|
function Ie() {
|
|
2388
|
-
|
|
2396
|
+
G.value = !1;
|
|
2389
2397
|
}
|
|
2390
2398
|
function Le(e) {
|
|
2391
|
-
return
|
|
2399
|
+
return F.disabled.value ? !0 : !e || z.value.size === 0 ? !1 : !z.value.has(e.id);
|
|
2392
2400
|
}
|
|
2393
2401
|
function Re(e) {
|
|
2394
|
-
if (
|
|
2395
|
-
let t =
|
|
2396
|
-
if (
|
|
2402
|
+
if (F.disabled.value) return;
|
|
2403
|
+
let t = F.activeTab.value === e.id;
|
|
2404
|
+
if (F.activeTab.value = e.id, !F.minimized.value) {
|
|
2397
2405
|
Ie();
|
|
2398
2406
|
return;
|
|
2399
2407
|
}
|
|
2400
|
-
Fe(),
|
|
2408
|
+
Fe(), G.value = t ? !G.value : !0;
|
|
2401
2409
|
}
|
|
2402
2410
|
function ze() {
|
|
2403
|
-
|
|
2411
|
+
F.disabled.value || F.api.toggleSimplified();
|
|
2404
2412
|
}
|
|
2405
2413
|
function Be() {
|
|
2406
|
-
|
|
2414
|
+
F.disabled.value || (F.minimized.value || Ie(), F.minimized.value = !F.minimized.value);
|
|
2407
2415
|
}
|
|
2408
2416
|
function Ve(e) {
|
|
2409
|
-
|
|
2417
|
+
F.disabled.value || (Ie(), P("fileMenuSelect", e));
|
|
2410
2418
|
}
|
|
2411
2419
|
function He() {
|
|
2412
|
-
|
|
2420
|
+
F.disabled.value || (Ie(), F.backdropOpen.value = !0);
|
|
2413
2421
|
}
|
|
2414
2422
|
function Ue() {
|
|
2415
|
-
|
|
2423
|
+
F.disabled.value || (F.backdropOpen.value = !1);
|
|
2416
2424
|
}
|
|
2417
2425
|
function We(e, t) {
|
|
2418
|
-
|
|
2419
|
-
tabId:
|
|
2426
|
+
B.value || (P("itemClick", {
|
|
2427
|
+
tabId: F.activeTab.value,
|
|
2420
2428
|
groupId: e,
|
|
2421
2429
|
itemId: t
|
|
2422
|
-
}),
|
|
2430
|
+
}), F.minimized.value && Ie());
|
|
2423
2431
|
}
|
|
2424
2432
|
function Ge(e) {
|
|
2425
2433
|
if (!(e instanceof HTMLElement)) return !1;
|
|
@@ -2428,13 +2436,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2428
2436
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
2429
2437
|
}
|
|
2430
2438
|
function Ke() {
|
|
2431
|
-
if (
|
|
2432
|
-
|
|
2439
|
+
if (B.value) {
|
|
2440
|
+
F.keyTips.value = [];
|
|
2433
2441
|
return;
|
|
2434
2442
|
}
|
|
2435
|
-
let e =
|
|
2443
|
+
let e = L.value;
|
|
2436
2444
|
if (!e?.groups?.length) {
|
|
2437
|
-
|
|
2445
|
+
F.keyTips.value = [];
|
|
2438
2446
|
return;
|
|
2439
2447
|
}
|
|
2440
2448
|
let t = e.groups.filter((e) => e.visible !== !1).flatMap((t) => (t.collections ?? []).flatMap((n) => n.items.filter((e) => e.keyTip && e.disabled !== !0).map((n) => {
|
|
@@ -2447,87 +2455,87 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2447
2455
|
scope: "item"
|
|
2448
2456
|
} : null;
|
|
2449
2457
|
}).filter((e) => !!e)));
|
|
2450
|
-
|
|
2458
|
+
F.keyTips.value = t;
|
|
2451
2459
|
}
|
|
2452
2460
|
function qe(e) {
|
|
2453
|
-
if (
|
|
2454
|
-
let t =
|
|
2461
|
+
if (F.disabled.value) return;
|
|
2462
|
+
let t = L.value;
|
|
2455
2463
|
if (t?.groups?.length) {
|
|
2456
2464
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
2457
2465
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
2458
2466
|
if (r) {
|
|
2459
|
-
We(n.id, r.id),
|
|
2467
|
+
We(n.id, r.id), F.keyTipsOpen.value = !1, F.keyTipsSequence.value = "";
|
|
2460
2468
|
return;
|
|
2461
2469
|
}
|
|
2462
2470
|
}
|
|
2463
2471
|
}
|
|
2464
2472
|
}
|
|
2465
2473
|
function Je() {
|
|
2466
|
-
|
|
2474
|
+
F.keyTipsSequence.value = "";
|
|
2467
2475
|
}
|
|
2468
2476
|
function Ye(e) {
|
|
2469
|
-
if (!
|
|
2477
|
+
if (!F.disabled.value && !Ge(e.target)) {
|
|
2470
2478
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
2471
|
-
e.preventDefault(),
|
|
2479
|
+
e.preventDefault(), F.keyTipsOpen.value = !F.keyTipsOpen.value, F.keyTipsOpen.value || Je();
|
|
2472
2480
|
return;
|
|
2473
2481
|
}
|
|
2474
|
-
if (
|
|
2482
|
+
if (F.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
2475
2483
|
if (e.key === "Escape") {
|
|
2476
|
-
e.preventDefault(),
|
|
2484
|
+
e.preventDefault(), F.keyTipsOpen.value = !1, Je();
|
|
2477
2485
|
return;
|
|
2478
2486
|
}
|
|
2479
2487
|
if (e.key === "Backspace") {
|
|
2480
|
-
e.preventDefault(),
|
|
2488
|
+
e.preventDefault(), F.keyTipsSequence.value = F.keyTipsSequence.value.slice(0, -1);
|
|
2481
2489
|
return;
|
|
2482
2490
|
}
|
|
2483
2491
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
2484
2492
|
e.preventDefault();
|
|
2485
|
-
let t = `${
|
|
2486
|
-
|
|
2487
|
-
let n = t.toLowerCase(), r =
|
|
2493
|
+
let t = `${F.keyTipsSequence.value}${e.key.toUpperCase()}`;
|
|
2494
|
+
F.keyTipsSequence.value = t;
|
|
2495
|
+
let n = t.toLowerCase(), r = F.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
2488
2496
|
if (r) {
|
|
2489
2497
|
qe(r);
|
|
2490
2498
|
return;
|
|
2491
2499
|
}
|
|
2492
|
-
|
|
2500
|
+
F.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Je();
|
|
2493
2501
|
}
|
|
2494
2502
|
}
|
|
2495
2503
|
}
|
|
2496
2504
|
}
|
|
2497
2505
|
function Xe(e) {
|
|
2498
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
2506
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? de : null;
|
|
2499
2507
|
}
|
|
2500
2508
|
function Ze(e) {
|
|
2501
|
-
|
|
2509
|
+
G.value = e;
|
|
2502
2510
|
}
|
|
2503
2511
|
D([
|
|
2504
|
-
|
|
2505
|
-
() =>
|
|
2506
|
-
() =>
|
|
2512
|
+
H,
|
|
2513
|
+
() => F.layout.value,
|
|
2514
|
+
() => F.minimized.value
|
|
2507
2515
|
], () => {
|
|
2508
2516
|
Pe();
|
|
2509
2517
|
}), D([
|
|
2510
|
-
|
|
2511
|
-
() =>
|
|
2512
|
-
() =>
|
|
2518
|
+
L,
|
|
2519
|
+
() => F.tabs.value,
|
|
2520
|
+
() => F.disabled.value
|
|
2513
2521
|
], () => {
|
|
2514
2522
|
Ke(), Je();
|
|
2515
2523
|
}, {
|
|
2516
2524
|
deep: !0,
|
|
2517
2525
|
immediate: !0
|
|
2518
|
-
}), D(() =>
|
|
2526
|
+
}), D(() => F.keyTipsOpen.value, (e) => {
|
|
2519
2527
|
e || Je();
|
|
2520
|
-
}), D(() =>
|
|
2521
|
-
e && (
|
|
2528
|
+
}), D(() => F.disabled.value, (e) => {
|
|
2529
|
+
e && (F.overflowOpen.value = !1, F.backdropOpen.value = !1, F.keyTipsOpen.value = !1, Ie(), Je());
|
|
2522
2530
|
}), D([
|
|
2523
|
-
() =>
|
|
2524
|
-
() =>
|
|
2525
|
-
|
|
2531
|
+
() => F.minimized.value,
|
|
2532
|
+
() => F.layout.value,
|
|
2533
|
+
L
|
|
2526
2534
|
], ([e, , t]) => {
|
|
2527
2535
|
(!e || !t) && Ie();
|
|
2528
|
-
}), D([
|
|
2536
|
+
}), D([U, W], ([e, t], [n, r]) => {
|
|
2529
2537
|
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) && Pe();
|
|
2530
|
-
}, { flush: "post" }), D(
|
|
2538
|
+
}, { flush: "post" }), D(G, (e) => {
|
|
2531
2539
|
e && p(() => {
|
|
2532
2540
|
Fe(), Pe();
|
|
2533
2541
|
});
|
|
@@ -2536,40 +2544,40 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2536
2544
|
g(() => {
|
|
2537
2545
|
window.addEventListener("keydown", Ye), window.addEventListener("resize", Qe), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
2538
2546
|
Fe(), Pe();
|
|
2539
|
-
}),
|
|
2547
|
+
}), U.value && $.observe(U.value), W.value && $.observe(W.value)), Fe(), Pe();
|
|
2540
2548
|
}), _(() => {
|
|
2541
2549
|
window.removeEventListener("keydown", Ye), window.removeEventListener("resize", Qe), $?.disconnect();
|
|
2542
2550
|
});
|
|
2543
2551
|
function Qe() {
|
|
2544
|
-
|
|
2552
|
+
G.value && Fe();
|
|
2545
2553
|
}
|
|
2546
|
-
return l(
|
|
2554
|
+
return l(F.api), (t, l) => (v(), n(E(re), { size: N.size }, {
|
|
2547
2555
|
default: O(() => [(v(), i("section", {
|
|
2548
2556
|
ref_key: "ribbonRootRef",
|
|
2549
|
-
ref:
|
|
2550
|
-
key: E(
|
|
2557
|
+
ref: ce,
|
|
2558
|
+
key: E(F).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
2551
2559
|
class: m(["ml-ribbon", [
|
|
2552
|
-
`ml-ribbon--${E(
|
|
2553
|
-
`ml-ribbon--size-${
|
|
2560
|
+
`ml-ribbon--${E(F).layout.value}`,
|
|
2561
|
+
`ml-ribbon--size-${q.value}`,
|
|
2554
2562
|
{
|
|
2555
|
-
"ml-ribbon--disabled": E(
|
|
2556
|
-
"ml-ribbon--minimized": E(
|
|
2557
|
-
"ml-ribbon--keytips-open": E(
|
|
2563
|
+
"ml-ribbon--disabled": E(F).disabled.value,
|
|
2564
|
+
"ml-ribbon--minimized": E(F).minimized.value,
|
|
2565
|
+
"ml-ribbon--keytips-open": E(F).keyTipsOpen.value
|
|
2558
2566
|
}
|
|
2559
2567
|
]]),
|
|
2560
|
-
inert: E(
|
|
2561
|
-
"aria-disabled": E(
|
|
2568
|
+
inert: E(F).disabled.value,
|
|
2569
|
+
"aria-disabled": E(F).disabled.value
|
|
2562
2570
|
}, [
|
|
2563
2571
|
a("header", {
|
|
2564
2572
|
ref_key: "ribbonHeaderRef",
|
|
2565
|
-
ref:
|
|
2573
|
+
ref: ue,
|
|
2566
2574
|
class: "ml-ribbon__header"
|
|
2567
2575
|
}, [
|
|
2568
2576
|
a("div", Xt, [
|
|
2569
2577
|
s.showFileMenu ? (v(), n(De, {
|
|
2570
2578
|
key: 0,
|
|
2571
2579
|
items: s.fileMenuItems,
|
|
2572
|
-
disabled: E(
|
|
2580
|
+
disabled: E(F).disabled.value,
|
|
2573
2581
|
label: Y.value.fileMenuLabel,
|
|
2574
2582
|
"open-backstage-label": Y.value.fileMenuOpenBackstageLabel,
|
|
2575
2583
|
"show-open-backstage": s.showOpenBackstage,
|
|
@@ -2583,9 +2591,9 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2583
2591
|
"show-open-backstage"
|
|
2584
2592
|
])) : r("", !0),
|
|
2585
2593
|
c(Te, {
|
|
2586
|
-
tabs: E(
|
|
2587
|
-
"active-tab": E(
|
|
2588
|
-
disabled: E(
|
|
2594
|
+
tabs: E(ie),
|
|
2595
|
+
"active-tab": E(F).activeTab.value,
|
|
2596
|
+
disabled: E(F).disabled.value,
|
|
2589
2597
|
"default-contextual-title": Y.value.contextualTabDefaultTitle,
|
|
2590
2598
|
onSelect: Re
|
|
2591
2599
|
}, null, 8, [
|
|
@@ -2594,20 +2602,20 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2594
2602
|
"disabled",
|
|
2595
2603
|
"default-contextual-title"
|
|
2596
2604
|
]),
|
|
2597
|
-
|
|
2605
|
+
N.hideMinimizeButton ? r("", !0) : (v(), n(E(ae), {
|
|
2598
2606
|
key: 1,
|
|
2599
2607
|
content: Y.value.minimizeTooltip,
|
|
2600
2608
|
"show-after": Z.value,
|
|
2601
|
-
"hide-after":
|
|
2609
|
+
"hide-after": Q.value
|
|
2602
2610
|
}, {
|
|
2603
|
-
default: O(() => [c(E(
|
|
2611
|
+
default: O(() => [c(E(te), {
|
|
2604
2612
|
class: m([
|
|
2605
2613
|
"ml-ribbon__control",
|
|
2606
2614
|
"ml-ribbon__control--minimize",
|
|
2607
|
-
E(
|
|
2615
|
+
E(F).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
2608
2616
|
]),
|
|
2609
|
-
icon:
|
|
2610
|
-
disabled: E(
|
|
2617
|
+
icon: xe.value,
|
|
2618
|
+
disabled: E(F).disabled.value,
|
|
2611
2619
|
onClick: Be
|
|
2612
2620
|
}, null, 8, [
|
|
2613
2621
|
"class",
|
|
@@ -2622,17 +2630,17 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2622
2630
|
]))
|
|
2623
2631
|
]),
|
|
2624
2632
|
a("div", Zt, [
|
|
2625
|
-
|
|
2633
|
+
N.hideLayoutSwitcher ? r("", !0) : (v(), n(E(ae), {
|
|
2626
2634
|
key: 0,
|
|
2627
2635
|
content: Y.value.layoutSwitcherTooltip,
|
|
2628
2636
|
"show-after": Z.value,
|
|
2629
|
-
"hide-after":
|
|
2637
|
+
"hide-after": Q.value
|
|
2630
2638
|
}, {
|
|
2631
|
-
default: O(() => [c(E(
|
|
2639
|
+
default: O(() => [c(E(te), {
|
|
2632
2640
|
circle: "",
|
|
2633
2641
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
2634
|
-
icon: E(
|
|
2635
|
-
disabled: E(
|
|
2642
|
+
icon: E(fe),
|
|
2643
|
+
disabled: E(F).disabled.value,
|
|
2636
2644
|
onClick: ze
|
|
2637
2645
|
}, null, 8, ["icon", "disabled"])]),
|
|
2638
2646
|
_: 1
|
|
@@ -2641,15 +2649,15 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2641
2649
|
"show-after",
|
|
2642
2650
|
"hide-after"
|
|
2643
2651
|
])),
|
|
2644
|
-
|
|
2652
|
+
N.hideKeyTipsToggle ? r("", !0) : (v(), n(E(V), {
|
|
2645
2653
|
key: 1,
|
|
2646
2654
|
"inline-prompt": "",
|
|
2647
2655
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
2648
2656
|
"active-text": Y.value.keyTipsToggleText,
|
|
2649
2657
|
"inactive-text": Y.value.keyTipsToggleText,
|
|
2650
|
-
"model-value": E(
|
|
2651
|
-
disabled: E(
|
|
2652
|
-
onChange: l[0] ||= (e) => E(
|
|
2658
|
+
"model-value": E(F).keyTipsOpen.value,
|
|
2659
|
+
disabled: E(F).disabled.value,
|
|
2660
|
+
onChange: l[0] ||= (e) => E(F).keyTipsOpen.value = !E(F).keyTipsOpen.value
|
|
2653
2661
|
}, null, 8, [
|
|
2654
2662
|
"active-text",
|
|
2655
2663
|
"inactive-text",
|
|
@@ -2657,35 +2665,35 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2657
2665
|
"disabled"
|
|
2658
2666
|
])),
|
|
2659
2667
|
t.$slots["tabs-extra"] ? (v(), i("div", Qt, [S(t.$slots, "tabs-extra", {
|
|
2660
|
-
activeTab: E(
|
|
2661
|
-
layout: E(
|
|
2662
|
-
minimized: E(
|
|
2663
|
-
disabled: E(
|
|
2668
|
+
activeTab: E(F).activeTab.value,
|
|
2669
|
+
layout: E(F).layout.value,
|
|
2670
|
+
minimized: E(F).minimized.value,
|
|
2671
|
+
disabled: E(F).disabled.value
|
|
2664
2672
|
})])) : r("", !0)
|
|
2665
2673
|
]),
|
|
2666
|
-
|
|
2674
|
+
L.value ? (v(), n(E(R), {
|
|
2667
2675
|
key: 0,
|
|
2668
2676
|
placement: "bottom-start",
|
|
2669
|
-
visible:
|
|
2670
|
-
width:
|
|
2671
|
-
disabled: E(
|
|
2677
|
+
visible: G.value,
|
|
2678
|
+
width: me.value || void 0,
|
|
2679
|
+
disabled: E(F).disabled.value || !E(F).minimized.value,
|
|
2672
2680
|
"show-arrow": !1,
|
|
2673
2681
|
offset: 0,
|
|
2674
|
-
"popper-class":
|
|
2682
|
+
"popper-class": J.value,
|
|
2675
2683
|
"onUpdate:visible": Ze
|
|
2676
2684
|
}, {
|
|
2677
2685
|
reference: O(() => [a("span", {
|
|
2678
2686
|
"aria-hidden": "true",
|
|
2679
2687
|
class: "ml-ribbon__minimized-anchor",
|
|
2680
|
-
style: h(
|
|
2688
|
+
style: h(he.value)
|
|
2681
2689
|
}, null, 4)]),
|
|
2682
|
-
default: O(() => [E(
|
|
2690
|
+
default: O(() => [E(F).layout.value === "classic" ? (v(), i("main", {
|
|
2683
2691
|
key: 0,
|
|
2684
2692
|
ref_key: "minimizedClassicPanelRef",
|
|
2685
|
-
ref:
|
|
2693
|
+
ref: W,
|
|
2686
2694
|
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
2687
|
-
"data-active-tab":
|
|
2688
|
-
}, [(v(!0), i(e, null, x(
|
|
2695
|
+
"data-active-tab": L.value.id
|
|
2696
|
+
}, [(v(!0), i(e, null, x(Se.value, (e) => (v(), n(Jt, {
|
|
2689
2697
|
id: e.id,
|
|
2690
2698
|
key: e.id,
|
|
2691
2699
|
"data-group-id": e.id,
|
|
@@ -2700,13 +2708,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2700
2708
|
"group-model": e,
|
|
2701
2709
|
"overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
|
|
2702
2710
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2703
|
-
disabled:
|
|
2711
|
+
disabled: B.value,
|
|
2704
2712
|
onItemClick: l[2] ||= (e) => We(e.groupId, e.itemId)
|
|
2705
2713
|
}, {
|
|
2706
2714
|
default: O(() => [c(zt, {
|
|
2707
2715
|
group: e,
|
|
2708
2716
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2709
|
-
disabled:
|
|
2717
|
+
disabled: B.value,
|
|
2710
2718
|
onItemClick: l[1] ||= (e) => We(e.groupId, e.itemId)
|
|
2711
2719
|
}, null, 8, [
|
|
2712
2720
|
"group",
|
|
@@ -2729,29 +2737,29 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2729
2737
|
"overflow-trigger-aria-label",
|
|
2730
2738
|
"gallery-preview-fallback",
|
|
2731
2739
|
"disabled"
|
|
2732
|
-
]))), 128)),
|
|
2740
|
+
]))), 128)), Ce.value.length ? (v(), i("section", en, [a("div", tn, [c(E(R), {
|
|
2733
2741
|
trigger: "click",
|
|
2734
2742
|
placement: "bottom-end",
|
|
2735
2743
|
width: we.value,
|
|
2736
|
-
disabled:
|
|
2744
|
+
disabled: B.value,
|
|
2737
2745
|
"show-arrow": !1,
|
|
2738
|
-
"popper-class":
|
|
2739
|
-
onShow: l[4] ||= (e) => E(
|
|
2740
|
-
onHide: l[5] ||= (e) => E(
|
|
2746
|
+
"popper-class": be.value,
|
|
2747
|
+
onShow: l[4] ||= (e) => E(F).overflowOpen.value = !0,
|
|
2748
|
+
onHide: l[5] ||= (e) => E(F).overflowOpen.value = !1
|
|
2741
2749
|
}, {
|
|
2742
2750
|
reference: O(() => [a("button", {
|
|
2743
2751
|
type: "button",
|
|
2744
2752
|
class: "ml-ribbon-overflow-trigger",
|
|
2745
2753
|
"aria-label": Y.value.overflowTriggerAriaLabel,
|
|
2746
|
-
disabled:
|
|
2754
|
+
disabled: B.value
|
|
2747
2755
|
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, nn)]),
|
|
2748
|
-
default: O(() => [a("div", rn, [(v(!0), i(e, null, x(
|
|
2756
|
+
default: O(() => [a("div", rn, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), i("section", {
|
|
2749
2757
|
key: e.id,
|
|
2750
2758
|
class: "ml-ribbon-overflow-group"
|
|
2751
2759
|
}, [a("header", an, w(e.title), 1), c(zt, {
|
|
2752
2760
|
group: e,
|
|
2753
2761
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2754
|
-
disabled:
|
|
2762
|
+
disabled: B.value,
|
|
2755
2763
|
onItemClick: l[3] ||= (e) => We(e.groupId, e.itemId)
|
|
2756
2764
|
}, null, 8, [
|
|
2757
2765
|
"group",
|
|
@@ -2766,21 +2774,21 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2766
2774
|
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, $t)) : (v(), i("main", {
|
|
2767
2775
|
key: 1,
|
|
2768
2776
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
2769
|
-
"data-active-tab":
|
|
2770
|
-
}, [(v(!0), i(e, null, x(
|
|
2777
|
+
"data-active-tab": L.value.id
|
|
2778
|
+
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(R), {
|
|
2771
2779
|
key: e.id,
|
|
2772
2780
|
trigger: "click",
|
|
2773
2781
|
placement: "bottom-start",
|
|
2774
2782
|
width: 340,
|
|
2775
|
-
disabled:
|
|
2783
|
+
disabled: B.value,
|
|
2776
2784
|
"show-arrow": !1,
|
|
2777
2785
|
"popper-class": ye.value
|
|
2778
2786
|
}, {
|
|
2779
2787
|
reference: O(() => [a("button", {
|
|
2780
2788
|
class: "ml-ribbon-simplified-group",
|
|
2781
2789
|
type: "button",
|
|
2782
|
-
disabled:
|
|
2783
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2790
|
+
disabled: B.value
|
|
2791
|
+
}, [Xe(e) ? (v(), n(E(I), {
|
|
2784
2792
|
key: 0,
|
|
2785
2793
|
class: "ml-ribbon-simplified-group__icon"
|
|
2786
2794
|
}, {
|
|
@@ -2790,7 +2798,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2790
2798
|
default: O(() => [a("div", cn, [c(zt, {
|
|
2791
2799
|
group: Ee(e),
|
|
2792
2800
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2793
|
-
disabled:
|
|
2801
|
+
disabled: B.value,
|
|
2794
2802
|
onItemClick: l[6] ||= (e) => We(e.groupId, e.itemId)
|
|
2795
2803
|
}, null, 8, [
|
|
2796
2804
|
"group",
|
|
@@ -2807,13 +2815,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2807
2815
|
"popper-class"
|
|
2808
2816
|
])) : r("", !0)
|
|
2809
2817
|
], 512),
|
|
2810
|
-
!E(
|
|
2818
|
+
!E(F).minimized.value && L.value && E(F).layout.value === "classic" ? (v(), i("main", {
|
|
2811
2819
|
key: 0,
|
|
2812
2820
|
class: "ml-ribbon__panel",
|
|
2813
|
-
"data-active-tab":
|
|
2821
|
+
"data-active-tab": L.value.id,
|
|
2814
2822
|
ref_key: "classicPanelRef",
|
|
2815
|
-
ref:
|
|
2816
|
-
}, [(v(!0), i(e, null, x(
|
|
2823
|
+
ref: U
|
|
2824
|
+
}, [(v(!0), i(e, null, x(Se.value, (e) => (v(), n(Jt, {
|
|
2817
2825
|
id: e.id,
|
|
2818
2826
|
key: e.id,
|
|
2819
2827
|
"data-group-id": e.id,
|
|
@@ -2828,13 +2836,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2828
2836
|
"group-model": e,
|
|
2829
2837
|
"overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
|
|
2830
2838
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2831
|
-
disabled:
|
|
2839
|
+
disabled: B.value,
|
|
2832
2840
|
onItemClick: l[8] ||= (e) => We(e.groupId, e.itemId)
|
|
2833
2841
|
}, {
|
|
2834
2842
|
default: O(() => [c(zt, {
|
|
2835
2843
|
group: e,
|
|
2836
2844
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2837
|
-
disabled:
|
|
2845
|
+
disabled: B.value,
|
|
2838
2846
|
onItemClick: l[7] ||= (e) => We(e.groupId, e.itemId)
|
|
2839
2847
|
}, null, 8, [
|
|
2840
2848
|
"group",
|
|
@@ -2857,28 +2865,28 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2857
2865
|
"overflow-trigger-aria-label",
|
|
2858
2866
|
"gallery-preview-fallback",
|
|
2859
2867
|
"disabled"
|
|
2860
|
-
]))), 128)),
|
|
2868
|
+
]))), 128)), Ce.value.length ? (v(), i("section", un, [a("div", dn, [c(E(R), {
|
|
2861
2869
|
trigger: "click",
|
|
2862
2870
|
placement: "bottom-end",
|
|
2863
2871
|
width: we.value,
|
|
2864
|
-
disabled:
|
|
2865
|
-
"popper-class":
|
|
2866
|
-
onShow: l[10] ||= (e) => E(
|
|
2867
|
-
onHide: l[11] ||= (e) => E(
|
|
2872
|
+
disabled: B.value,
|
|
2873
|
+
"popper-class": be.value,
|
|
2874
|
+
onShow: l[10] ||= (e) => E(F).overflowOpen.value = !0,
|
|
2875
|
+
onHide: l[11] ||= (e) => E(F).overflowOpen.value = !1
|
|
2868
2876
|
}, {
|
|
2869
2877
|
reference: O(() => [a("button", {
|
|
2870
2878
|
type: "button",
|
|
2871
2879
|
class: "ml-ribbon-overflow-trigger",
|
|
2872
2880
|
"aria-label": Y.value.overflowTriggerAriaLabel,
|
|
2873
|
-
disabled:
|
|
2881
|
+
disabled: B.value
|
|
2874
2882
|
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, fn)]),
|
|
2875
|
-
default: O(() => [a("div", pn, [(v(!0), i(e, null, x(
|
|
2883
|
+
default: O(() => [a("div", pn, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), i("section", {
|
|
2876
2884
|
key: e.id,
|
|
2877
2885
|
class: "ml-ribbon-overflow-group"
|
|
2878
2886
|
}, [a("header", mn, w(e.title), 1), c(zt, {
|
|
2879
2887
|
group: e,
|
|
2880
2888
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2881
|
-
disabled:
|
|
2889
|
+
disabled: B.value,
|
|
2882
2890
|
onItemClick: l[9] ||= (e) => We(e.groupId, e.itemId)
|
|
2883
2891
|
}, null, 8, [
|
|
2884
2892
|
"group",
|
|
@@ -2891,23 +2899,23 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2891
2899
|
"disabled",
|
|
2892
2900
|
"popper-class"
|
|
2893
2901
|
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, ln)) : r("", !0),
|
|
2894
|
-
!E(
|
|
2902
|
+
!E(F).minimized.value && L.value && E(F).layout.value === "simplified" ? (v(), i("main", {
|
|
2895
2903
|
key: 1,
|
|
2896
2904
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
2897
|
-
"data-active-tab":
|
|
2898
|
-
}, [(v(!0), i(e, null, x(
|
|
2905
|
+
"data-active-tab": L.value.id
|
|
2906
|
+
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(R), {
|
|
2899
2907
|
key: e.id,
|
|
2900
2908
|
trigger: "click",
|
|
2901
2909
|
placement: "bottom-start",
|
|
2902
2910
|
width: 340,
|
|
2903
|
-
disabled:
|
|
2911
|
+
disabled: B.value,
|
|
2904
2912
|
"popper-class": ye.value
|
|
2905
2913
|
}, {
|
|
2906
2914
|
reference: O(() => [a("button", {
|
|
2907
2915
|
class: "ml-ribbon-simplified-group",
|
|
2908
2916
|
type: "button",
|
|
2909
|
-
disabled:
|
|
2910
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2917
|
+
disabled: B.value
|
|
2918
|
+
}, [Xe(e) ? (v(), n(E(I), {
|
|
2911
2919
|
key: 0,
|
|
2912
2920
|
class: "ml-ribbon-simplified-group__icon"
|
|
2913
2921
|
}, {
|
|
@@ -2917,7 +2925,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2917
2925
|
default: O(() => [a("div", _n, [c(zt, {
|
|
2918
2926
|
group: Ee(e),
|
|
2919
2927
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2920
|
-
disabled:
|
|
2928
|
+
disabled: B.value,
|
|
2921
2929
|
onItemClick: l[12] ||= (e) => We(e.groupId, e.itemId)
|
|
2922
2930
|
}, null, 8, [
|
|
2923
2931
|
"group",
|
|
@@ -2927,8 +2935,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2927
2935
|
_: 2
|
|
2928
2936
|
}, 1032, ["disabled", "popper-class"]))), 128))], 8, hn)) : r("", !0),
|
|
2929
2937
|
c(X, {
|
|
2930
|
-
open: E(
|
|
2931
|
-
size:
|
|
2938
|
+
open: E(F).backdropOpen.value,
|
|
2939
|
+
size: q.value,
|
|
2932
2940
|
"back-label": Y.value.backstageBackLabel,
|
|
2933
2941
|
title: Y.value.backstageTitle,
|
|
2934
2942
|
description: Y.value.backstageDescription,
|
|
@@ -2937,12 +2945,12 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
2937
2945
|
name: "default",
|
|
2938
2946
|
fn: O(() => [S(t.$slots, "backstage", {
|
|
2939
2947
|
close: Ue,
|
|
2940
|
-
open: E(
|
|
2941
|
-
size:
|
|
2948
|
+
open: E(F).backdropOpen.value,
|
|
2949
|
+
size: q.value,
|
|
2942
2950
|
backLabel: Y.value.backstageBackLabel,
|
|
2943
2951
|
title: Y.value.backstageTitle,
|
|
2944
2952
|
description: Y.value.backstageDescription,
|
|
2945
|
-
disabled: E(
|
|
2953
|
+
disabled: E(F).disabled.value
|
|
2946
2954
|
})]),
|
|
2947
2955
|
key: "0"
|
|
2948
2956
|
} : void 0]), 1032, [
|
|
@@ -3018,4 +3026,4 @@ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstag
|
|
|
3018
3026
|
}
|
|
3019
3027
|
});
|
|
3020
3028
|
//#endregion
|
|
3021
|
-
export { yn as MlRibbon, X as MlRibbonBackstage, Ae as MlRibbonButton, Pe as MlRibbonButtonGroup, Oe as MlRibbonCollection, Te as MlRibbonContextualTabs, Be as MlRibbonDropdown, De as MlRibbonFileMenu, St as MlRibbonGallery, Jt as MlRibbonGroup, Et as MlRibbonInputNumber, Rt as MlRibbonItemHost, wn as MlRibbonKeyTips, Mt as MlRibbonSegmented, xn as MlRibbonTab,
|
|
3029
|
+
export { yn as MlRibbon, X as MlRibbonBackstage, Ae as MlRibbonButton, Pe as MlRibbonButtonGroup, Oe as MlRibbonCollection, Te as MlRibbonContextualTabs, Be as MlRibbonDropdown, De as MlRibbonFileMenu, St as MlRibbonGallery, Jt as MlRibbonGroup, Et as MlRibbonInputNumber, Rt as MlRibbonItemHost, wn as MlRibbonKeyTips, Mt as MlRibbonSegmented, xn as MlRibbonTab, xe as MlRibbonTabs, Ft as MlRibbonTemplateItem, Nt as MlRibbonToggleButton };
|