@mlightcad/ribbon 0.1.4 → 0.1.5
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/README.md +21 -1
- package/dist/items/RibbonGallery.vue.d.ts +5 -0
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +556 -537
- package/dist/ml-ribbon.umd.js +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/ml-ribbon.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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 A, ElButtonGroup as j, ElCheckbox as te, ElColorPicker as M, ElConfigProvider as ne, ElDrawer as N, ElDropdown as P, ElDropdownItem as F, ElDropdownMenu as I, ElIcon as L, ElInputNumber as re, ElOption as R, ElPopover as z, ElSegmented as B, ElSelect as V, ElSwitch as H, ElTooltip as ie, useGlobalConfig as ae } from "element-plus";
|
|
3
|
+
import { ArrowDown as U, ArrowDownBold as oe, ArrowUp as se, ArrowUpBold as ce, Bottom as le, Grid as ue, Menu as de, Promotion as fe } from "@element-plus/icons-vue";
|
|
4
4
|
//#region src/ribbon/context.ts
|
|
5
5
|
var pe = Symbol("RibbonContext");
|
|
6
6
|
//#endregion
|
|
@@ -60,16 +60,16 @@ function K(e) {
|
|
|
60
60
|
groups: e.groups?.map(he)
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function q(e) {
|
|
64
64
|
return e.map(K);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function ge(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 J(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);
|
|
@@ -77,8 +77,8 @@ function q(e, t, n, r, i) {
|
|
|
77
77
|
let s = o.collections.find((e) => e.id === r);
|
|
78
78
|
s && i(s.items);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(
|
|
80
|
+
function _e(e, n, r, i, a, o, s, c) {
|
|
81
|
+
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(q(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
83
|
p.value.push(K(e)), f.value ||= e.id;
|
|
84
84
|
},
|
|
@@ -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 ??= [], ge(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
|
+
J(p.value, e, t, n, (e) => e.push(me(r)));
|
|
117
117
|
},
|
|
118
118
|
removeItem(e, t, n, r) {
|
|
119
|
-
|
|
119
|
+
J(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
|
+
J(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
|
|
174
|
+
var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backstage__content" }, be = { key: 0 }, Y = { key: 1 }, xe = /* @__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" }, be = { class: "ml-ribbon-backsta
|
|
|
186
186
|
function d() {
|
|
187
187
|
u("close");
|
|
188
188
|
}
|
|
189
|
-
return (t, o) => (v(), n(E(
|
|
189
|
+
return (t, o) => (v(), n(E(N), {
|
|
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" }, be = { class: "ml-ribbon-backsta
|
|
|
200
200
|
title: l.title,
|
|
201
201
|
description: l.description,
|
|
202
202
|
size: l.size
|
|
203
|
-
}) : (v(), i(e, { key: 1 }, [a("aside",
|
|
203
|
+
}) : (v(), i(e, { key: 1 }, [a("aside", ve, [c(E(A), {
|
|
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", ye, [l.title ? (v(), i("h2", be, 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
|
+
}), X = {
|
|
214
214
|
class: "ml-ribbon-tabs",
|
|
215
215
|
role: "tablist"
|
|
216
|
-
},
|
|
216
|
+
}, Z = [
|
|
217
217
|
"aria-selected",
|
|
218
218
|
"disabled",
|
|
219
219
|
"onClick"
|
|
220
|
-
],
|
|
220
|
+
], Q = /* @__PURE__ */ l({
|
|
221
221
|
__name: "RibbonTabs",
|
|
222
222
|
props: {
|
|
223
223
|
tabs: {},
|
|
@@ -233,7 +233,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
233
233
|
triggerEl: t.currentTarget instanceof HTMLElement ? t.currentTarget : null
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
|
-
return (t, r) => (v(), i("div",
|
|
236
|
+
return (t, r) => (v(), i("div", X, [(v(!0), i(e, null, x(s.value, (e) => (v(), i("button", {
|
|
237
237
|
key: e.id,
|
|
238
238
|
type: "button",
|
|
239
239
|
class: m(["ml-ribbon-tab", { "is-active": n.activeTab === e.id }]),
|
|
@@ -241,7 +241,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
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, Z))), 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",
|
|
@@ -254,7 +254,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
254
254
|
emits: ["select"],
|
|
255
255
|
setup(t, { emit: n }) {
|
|
256
256
|
let r = t, o = n;
|
|
257
|
-
return (n, s) => (v(), i("div", Se, [a("div", Ce, [c(
|
|
257
|
+
return (n, s) => (v(), i("div", Se, [a("div", Ce, [c(Q, {
|
|
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" }, be = { class: "ml-ribbon-backsta
|
|
|
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(Q, {
|
|
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" }, be = { class: "ml-ribbon-backsta
|
|
|
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 = ae("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" }, be = { class: "ml-ribbon-backsta
|
|
|
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(P), {
|
|
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(I), null, {
|
|
313
|
+
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(F), {
|
|
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(F), {
|
|
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" }, be = { class: "ml-ribbon-backsta
|
|
|
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(A), {
|
|
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" }, be = { class: "ml-ribbon-backsta
|
|
|
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(L), {
|
|
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" }, be = { class: "ml-ribbon-backsta
|
|
|
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(j), null, {
|
|
495
|
+
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(ie), {
|
|
496
496
|
key: String(e.value),
|
|
497
497
|
content: g(e),
|
|
498
498
|
disabled: !g(e),
|
|
@@ -572,125 +572,126 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
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 = ae("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) => H(e) === g.value) ?? null), T = t(() => {
|
|
576
576
|
if (y.value && u.syncLabelWithSelection) {
|
|
577
|
-
let e =
|
|
577
|
+
let e = ce(y.value);
|
|
578
578
|
if (e) return e;
|
|
579
579
|
}
|
|
580
|
-
return
|
|
580
|
+
return de(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 = B(y.value);
|
|
584
584
|
if (e) return e;
|
|
585
585
|
}
|
|
586
586
|
return !u.icon || typeof u.icon == "string" ? null : u.icon;
|
|
587
|
-
}),
|
|
587
|
+
}), j = t(() => {
|
|
588
588
|
if (y.value) {
|
|
589
|
-
let e =
|
|
589
|
+
let e = V(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
|
+
}), te = t(() => !!(k.value || j.value)), M = t(() => ue(y.value) ?? de(u.tooltip) ?? de(T.value) ?? de(u.label) ?? fe(u.id)), ne = 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 N(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 re() {
|
|
609
609
|
u.disabled || (h.value = !h.value);
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
u.disabled || (g.value = e, d("tooltip-change",
|
|
611
|
+
function R(e) {
|
|
612
|
+
u.disabled || (g.value = e, d("tooltip-change", ue(y.value) ?? M.value), d("command", e), h.value = !1);
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function z() {
|
|
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", H(e));
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function B(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 V(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 H(e) {
|
|
634
634
|
if (!(!e || typeof e != "object")) return e.value;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
637
|
-
let t =
|
|
636
|
+
function oe(e) {
|
|
637
|
+
let t = H(e);
|
|
638
638
|
if (typeof t == "string" || typeof t == "number" || t && typeof t == "object") return t;
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function ce(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
|
|
646
|
-
if (typeof e == "string") return
|
|
645
|
+
function le(e) {
|
|
646
|
+
if (typeof e == "string") return fe(e);
|
|
647
647
|
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
if (!(!e || typeof e != "object")) return
|
|
649
|
+
function ue(e) {
|
|
650
|
+
if (!(!e || typeof e != "object")) return de(e.tooltip) ?? ce(e) ?? le(H(e));
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function de(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 fe(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(P), {
|
|
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": ne.value,
|
|
666
|
+
onVisibleChange: N,
|
|
667
|
+
onCommand: R
|
|
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:
|
|
673
|
-
disabled: e.disabled === !0
|
|
669
|
+
dropdown: O(() => [c(E(I), null, {
|
|
670
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(F), {
|
|
671
|
+
key: String(H(e)),
|
|
672
|
+
command: oe(e),
|
|
673
|
+
disabled: e.disabled === !0,
|
|
674
|
+
divided: e.divided === !0
|
|
674
675
|
}, {
|
|
675
|
-
default: O(() => [c(E(
|
|
676
|
-
content:
|
|
677
|
-
disabled: !
|
|
676
|
+
default: O(() => [c(E(ie), {
|
|
677
|
+
content: ue(e),
|
|
678
|
+
disabled: !ue(e),
|
|
678
679
|
"show-after": o.tooltipShowAfter,
|
|
679
680
|
"hide-after": o.tooltipHideAfter,
|
|
680
681
|
placement: "top",
|
|
681
682
|
effect: "dark"
|
|
682
683
|
}, {
|
|
683
|
-
default: O(() => [a("span", Re, [S(t.$slots, "option", { option: e }, () => [
|
|
684
|
+
default: O(() => [a("span", Re, [S(t.$slots, "option", { option: e }, () => [B(e) ? (v(), n(E(L), {
|
|
684
685
|
key: 0,
|
|
685
686
|
class: "ml-ribbon-dropdown-item__icon"
|
|
686
687
|
}, {
|
|
687
|
-
default: O(() => [(v(), n(C(
|
|
688
|
+
default: O(() => [(v(), n(C(B(e))))]),
|
|
688
689
|
_: 2
|
|
689
|
-
}, 1024)) :
|
|
690
|
+
}, 1024)) : V(e) ? (v(), i("i", {
|
|
690
691
|
key: 1,
|
|
691
|
-
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class",
|
|
692
|
+
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", V(e)]),
|
|
692
693
|
"aria-hidden": "true"
|
|
693
|
-
}, null, 2)) : r("", !0), a("span", ze, w(
|
|
694
|
+
}, null, 2)) : r("", !0), a("span", ze, w(ce(e)), 1)])])]),
|
|
694
695
|
_: 2
|
|
695
696
|
}, 1032, [
|
|
696
697
|
"content",
|
|
@@ -699,31 +700,35 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
699
700
|
"hide-after"
|
|
700
701
|
])]),
|
|
701
702
|
_: 2
|
|
702
|
-
}, 1032, [
|
|
703
|
+
}, 1032, [
|
|
704
|
+
"command",
|
|
705
|
+
"disabled",
|
|
706
|
+
"divided"
|
|
707
|
+
]))), 128))]),
|
|
703
708
|
_: 3
|
|
704
709
|
})]),
|
|
705
|
-
default: O(() => [c(E(
|
|
710
|
+
default: O(() => [c(E(A), {
|
|
706
711
|
type: "default",
|
|
707
712
|
disabled: o.disabled,
|
|
708
|
-
"aria-label":
|
|
709
|
-
onClick:
|
|
713
|
+
"aria-label": M.value,
|
|
714
|
+
onClick: re
|
|
710
715
|
}, {
|
|
711
|
-
default: O(() => [a("span", Fe, [t.$slots.icon ||
|
|
716
|
+
default: O(() => [a("span", Fe, [t.$slots.icon || te.value ? (v(), i("span", {
|
|
712
717
|
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(
|
|
718
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class": j.value && !k.value && !t.$slots.icon }]),
|
|
719
|
+
onClick: ee(z, ["stop"])
|
|
720
|
+
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [k.value ? (v(), n(E(L), { key: 0 }, {
|
|
716
721
|
default: O(() => [(v(), n(C(k.value)))]),
|
|
717
722
|
_: 1
|
|
718
|
-
})) :
|
|
723
|
+
})) : j.value ? (v(), i("i", {
|
|
719
724
|
key: 1,
|
|
720
|
-
class: m(
|
|
725
|
+
class: m(j.value),
|
|
721
726
|
"aria-hidden": "true"
|
|
722
727
|
}, null, 2)) : r("", !0)])], 2)) : r("", !0), a("span", Ie, [D.value ? (v(), i("span", Le, [S(t.$slots, "label", {
|
|
723
728
|
selectedOption: y.value,
|
|
724
729
|
label: T.value
|
|
725
|
-
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(
|
|
726
|
-
default: O(() => [(v(), n(C(h.value ? E(
|
|
730
|
+
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(L), { class: m(["ml-ribbon-item-host__dropdown-arrow ml-ribbon-dropdown__arrow", { "is-open": h.value }]) }, {
|
|
731
|
+
default: O(() => [(v(), n(C(h.value ? E(se) : E(U))))]),
|
|
727
732
|
_: 1
|
|
728
733
|
}, 8, ["class"])])])]),
|
|
729
734
|
_: 3
|
|
@@ -795,72 +800,83 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
795
800
|
default: !1
|
|
796
801
|
},
|
|
797
802
|
inlineItemLimit: { default: 4 },
|
|
803
|
+
inlineItemWidthMode: { default: "fixed" },
|
|
798
804
|
previewFallback: {}
|
|
799
805
|
},
|
|
800
806
|
emits: ["select"],
|
|
801
807
|
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
|
-
|
|
807
|
-
|
|
808
|
-
})
|
|
808
|
+
let u = o, g = l, _ = b(""), y = b(!1), k = b(0), ee = b(null), A = b(null), j = b(null), te = b(0), M = ae("size", ""), ne = t(() => M.value || "default"), N = t(() => ne.value === "small" ? .92 : ne.value === "large" ? 1.08 : 1), P = t(() => Math.round(_t * N.value)), F = t(() => Math.round(xt * N.value)), I = t(() => u.label?.trim() ?? ""), re = t(() => u.categories.filter((e) => e.items.length > 0).length), R = t(() => u.categories.flatMap((e) => e.items)), B = t(() => R.value.find((e) => e.id === _.value) ?? R.value[0]), V = t(() => !Number.isFinite(u.inlineItemLimit) || u.inlineItemLimit <= 0 ? 4 : Math.floor(u.inlineItemLimit)), H = t(() => {
|
|
809
|
+
let e = V.value, t = R.value.length;
|
|
810
|
+
return t === 0 ? Math.min(e, 1) : Math.min(e, t);
|
|
811
|
+
}), ie = t(() => Math.max(1, Math.ceil(R.value.length / H.value))), oe = t(() => Math.min(k.value, ie.value - 1)), ce = t(() => pe.value && oe.value > 0), ue = t(() => pe.value && oe.value < ie.value - 1), de = t(() => {
|
|
812
|
+
let e = oe.value * H.value;
|
|
813
|
+
return R.value.slice(e, e + H.value);
|
|
814
|
+
}), fe = t(() => new Set(de.value.map((e) => e.id))), pe = t(() => R.value.length > H.value), W = t(() => {
|
|
815
|
+
let e = [
|
|
816
|
+
"ml-ribbon-gallery-panel",
|
|
817
|
+
`ml-ribbon-gallery-panel--${u.collapsed ? "collapsed" : "inline"}`,
|
|
818
|
+
`ml-ribbon-gallery-panel--size-${ne.value}`
|
|
819
|
+
];
|
|
820
|
+
return u.inlineItemWidthMode === "auto" && e.push("ml-ribbon-gallery-panel--item-width-auto"), e.join(" ");
|
|
821
|
+
}), G = t(() => ({
|
|
822
|
+
"--ml-ribbon-gallery-panel-columns": String(H.value),
|
|
823
|
+
"--ml-ribbon-gallery-panel-item-width": `${P.value}px`
|
|
824
|
+
})), me = t(() => u.inlineItemWidthMode === "auto" ? "fit-content" : H.value * P.value + Math.max(0, H.value - 1) * vt + gt * 2 + (u.collapsed ? yt : bt + F.value)), he = t(() => ({ modifiers: [{
|
|
809
825
|
name: "offset",
|
|
810
|
-
options: { offset: [
|
|
826
|
+
options: { offset: [te.value, 0] }
|
|
811
827
|
}] }));
|
|
812
828
|
D(() => u.modelValue, (e) => {
|
|
813
829
|
typeof e == "string" && (_.value = e, ve(e));
|
|
814
830
|
}, { immediate: !0 }), D(() => [
|
|
815
|
-
|
|
816
|
-
|
|
831
|
+
R.value.map((e) => e.id).join("\0"),
|
|
832
|
+
H.value,
|
|
817
833
|
_.value
|
|
818
834
|
], () => {
|
|
819
|
-
ve() || (k.value = Math.min(k.value,
|
|
835
|
+
ve() || (k.value = Math.min(k.value, ie.value - 1));
|
|
820
836
|
}), D(y, async (e) => {
|
|
821
837
|
!e || u.collapsed || (ye(), await p(), await p(), be());
|
|
822
838
|
});
|
|
823
|
-
function
|
|
839
|
+
function K(e) {
|
|
824
840
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
825
841
|
}
|
|
826
|
-
function
|
|
827
|
-
let t =
|
|
828
|
-
return
|
|
842
|
+
function q(e) {
|
|
843
|
+
let t = I.value.toLowerCase(), n = e.title.trim().toLowerCase();
|
|
844
|
+
return re.value > 1 || !t || n !== t;
|
|
829
845
|
}
|
|
830
846
|
function ge(e) {
|
|
831
|
-
return
|
|
847
|
+
return pe.value ? e.items.filter((e) => fe.value.has(e.id)) : e.items;
|
|
832
848
|
}
|
|
833
|
-
function
|
|
834
|
-
if (u.disabled || !
|
|
835
|
-
let t =
|
|
836
|
-
k.value = Math.min(Math.max(t, 0),
|
|
849
|
+
function J(e) {
|
|
850
|
+
if (u.disabled || !pe.value) return;
|
|
851
|
+
let t = oe.value + e;
|
|
852
|
+
k.value = Math.min(Math.max(t, 0), ie.value - 1);
|
|
837
853
|
}
|
|
838
|
-
function
|
|
839
|
-
let t =
|
|
840
|
-
return t < 0 ? 0 : Math.floor(t /
|
|
854
|
+
function _e(e) {
|
|
855
|
+
let t = R.value.findIndex((t) => t.id === e.id);
|
|
856
|
+
return t < 0 ? 0 : Math.floor(t / H.value);
|
|
841
857
|
}
|
|
842
858
|
function ve(e = _.value) {
|
|
843
|
-
let t =
|
|
844
|
-
return t ? (k.value =
|
|
859
|
+
let t = R.value.find((t) => t.id === e);
|
|
860
|
+
return t ? (k.value = _e(t), !0) : !1;
|
|
845
861
|
}
|
|
846
862
|
function ye() {
|
|
847
|
-
let e = ee.value, t =
|
|
863
|
+
let e = ee.value, t = A.value;
|
|
848
864
|
if (!e || !t) {
|
|
849
|
-
|
|
865
|
+
te.value = 0;
|
|
850
866
|
return;
|
|
851
867
|
}
|
|
852
868
|
let n = e.querySelector(".ml-ribbon-gallery__grid .ml-ribbon-gallery__item")?.getBoundingClientRect().left ?? e.getBoundingClientRect().left;
|
|
853
|
-
|
|
869
|
+
te.value = Math.round(n - t.getBoundingClientRect().left - gt);
|
|
854
870
|
}
|
|
855
871
|
function be() {
|
|
856
|
-
let e =
|
|
857
|
-
e && e.querySelector(`[data-gallery-row-index="${
|
|
858
|
-
}
|
|
859
|
-
function J(e) {
|
|
860
|
-
return e.preview && typeof e.preview != "string" ? he(e.preview) : e.icon && typeof e.icon != "string" ? he(e.icon) : null;
|
|
872
|
+
let e = j.value;
|
|
873
|
+
e && e.querySelector(`[data-gallery-row-index="${oe.value}"]`)?.scrollIntoView?.({ block: "start" });
|
|
861
874
|
}
|
|
862
875
|
function Y(e) {
|
|
863
|
-
return e.
|
|
876
|
+
return e.preview && typeof e.preview != "string" ? K(e.preview) : e.icon && typeof e.icon != "string" ? K(e.icon) : null;
|
|
877
|
+
}
|
|
878
|
+
function xe(e) {
|
|
879
|
+
return e.component ? K(e.component) : null;
|
|
864
880
|
}
|
|
865
881
|
function X(e) {
|
|
866
882
|
return u.disabled || e.disabled === !0;
|
|
@@ -876,18 +892,18 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
876
892
|
let n = t.trim();
|
|
877
893
|
return n.length > 0 ? n : null;
|
|
878
894
|
}
|
|
879
|
-
function
|
|
895
|
+
function Se(e) {
|
|
880
896
|
return e.startsWith("data:image/svg+xml") || e.endsWith(".svg");
|
|
881
897
|
}
|
|
882
|
-
function
|
|
898
|
+
function Ce(e) {
|
|
883
899
|
let t = Q(e);
|
|
884
|
-
return t ?
|
|
900
|
+
return t ? Se(t) : !1;
|
|
885
901
|
}
|
|
886
|
-
function
|
|
902
|
+
function we(e) {
|
|
887
903
|
return typeof e.preview == "string" ? e.preview : u.previewFallback;
|
|
888
904
|
}
|
|
889
|
-
function
|
|
890
|
-
X(e) || (_.value = e.id, k.value =
|
|
905
|
+
function Te(e) {
|
|
906
|
+
X(e) || (_.value = e.id, k.value = _e(e), y.value = !1, g("select", e.id));
|
|
891
907
|
}
|
|
892
908
|
return (t, l) => (v(), i("div", {
|
|
893
909
|
ref_key: "galleryRef",
|
|
@@ -895,72 +911,73 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
895
911
|
class: m(["ml-ribbon-gallery", {
|
|
896
912
|
"is-disabled": o.disabled,
|
|
897
913
|
"is-collapsed": o.collapsed,
|
|
898
|
-
"is-unlabeled": !o.collapsed && !
|
|
914
|
+
"is-unlabeled": !o.collapsed && !I.value,
|
|
915
|
+
"is-inline-item-width-auto": !o.collapsed && o.inlineItemWidthMode === "auto"
|
|
899
916
|
}])
|
|
900
917
|
}, [
|
|
901
|
-
o.collapsed &&
|
|
918
|
+
o.collapsed && B.value ? (v(), n(E(z), {
|
|
902
919
|
key: 0,
|
|
903
920
|
visible: y.value,
|
|
904
921
|
"onUpdate:visible": l[0] ||= (e) => y.value = e,
|
|
905
922
|
trigger: "click",
|
|
906
923
|
placement: "bottom-start",
|
|
907
924
|
disabled: o.disabled,
|
|
908
|
-
width:
|
|
909
|
-
"popper-class":
|
|
925
|
+
width: me.value,
|
|
926
|
+
"popper-class": W.value
|
|
910
927
|
}, {
|
|
911
928
|
reference: O(() => [a("button", {
|
|
912
929
|
type: "button",
|
|
913
930
|
class: m(["ml-ribbon-gallery__collapsed-button", {
|
|
914
|
-
"is-selected": _.value ===
|
|
931
|
+
"is-selected": _.value === B.value.id,
|
|
915
932
|
"is-open": y.value
|
|
916
933
|
}]),
|
|
917
|
-
disabled: X(
|
|
918
|
-
}, [
|
|
919
|
-
item:
|
|
920
|
-
selected: _.value ===
|
|
921
|
-
disabled: X(
|
|
934
|
+
disabled: X(B.value)
|
|
935
|
+
}, [xe(B.value) ? (v(), n(C(xe(B.value)), f({ key: 0 }, B.value.componentProps, {
|
|
936
|
+
item: B.value,
|
|
937
|
+
selected: _.value === B.value.id,
|
|
938
|
+
disabled: X(B.value)
|
|
922
939
|
}), null, 16, [
|
|
923
940
|
"item",
|
|
924
941
|
"selected",
|
|
925
942
|
"disabled"
|
|
926
943
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview ml-ribbon-gallery__collapsed-preview", {
|
|
927
|
-
"ml-ribbon-gallery__preview--icon":
|
|
928
|
-
"ml-ribbon-gallery__preview--svg": Q(
|
|
929
|
-
}]) }, [
|
|
944
|
+
"ml-ribbon-gallery__preview--icon": Y(B.value) || Z(B.value),
|
|
945
|
+
"ml-ribbon-gallery__preview--svg": Q(B.value)
|
|
946
|
+
}]) }, [Y(B.value) ? (v(), n(E(L), {
|
|
930
947
|
key: 0,
|
|
931
948
|
class: "ml-ribbon-gallery__preview-icon"
|
|
932
949
|
}, {
|
|
933
|
-
default: O(() => [(v(), n(C(
|
|
950
|
+
default: O(() => [(v(), n(C(Y(B.value))))]),
|
|
934
951
|
_: 1
|
|
935
|
-
})) : Z(
|
|
952
|
+
})) : Z(B.value) ? (v(), i("i", {
|
|
936
953
|
key: 1,
|
|
937
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(
|
|
954
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(B.value)]),
|
|
938
955
|
"aria-hidden": "true"
|
|
939
|
-
}, null, 2)) : Q(
|
|
956
|
+
}, null, 2)) : Q(B.value) && Ce(B.value) ? (v(), i("img", {
|
|
940
957
|
key: 2,
|
|
941
958
|
class: "ml-ribbon-gallery__preview-svg",
|
|
942
|
-
src: Q(
|
|
959
|
+
src: Q(B.value) ?? "",
|
|
943
960
|
alt: ""
|
|
944
|
-
}, null, 8, He)) : Q(
|
|
961
|
+
}, null, 8, He)) : Q(B.value) ? (v(), i("svg", Ue, [a("use", { href: Q(B.value) ?? "" }, null, 8, We)])) : (v(), i(e, { key: 4 }, [s(w(we(B.value)), 1)], 64))], 2), a("div", Ge, w(B.value.label), 1)], 64))], 10, Ve)]),
|
|
945
962
|
default: O(() => [a("div", Ke, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
946
963
|
key: o.id,
|
|
947
964
|
class: "ml-ribbon-gallery__panel-category"
|
|
948
|
-
}, [
|
|
965
|
+
}, [q(o) ? (v(), i("h4", qe, w(o.title), 1)) : r("", !0), a("div", {
|
|
949
966
|
class: "ml-ribbon-gallery__panel-grid",
|
|
950
|
-
style: h(
|
|
967
|
+
style: h(G.value)
|
|
951
968
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
952
969
|
key: r.id,
|
|
953
970
|
type: "button",
|
|
954
971
|
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
955
972
|
disabled: X(r),
|
|
956
|
-
onClick: (e) =>
|
|
973
|
+
onClick: (e) => Te(r)
|
|
957
974
|
}, [S(t.$slots, "item", {
|
|
958
975
|
item: r,
|
|
959
976
|
category: o,
|
|
960
977
|
selected: _.value === r.id,
|
|
961
978
|
disabled: X(r),
|
|
962
|
-
select: () =>
|
|
963
|
-
}, () => [
|
|
979
|
+
select: () => Te(r)
|
|
980
|
+
}, () => [xe(r) ? (v(), n(C(xe(r)), f({
|
|
964
981
|
key: 0,
|
|
965
982
|
ref_for: !0
|
|
966
983
|
}, r.componentProps, {
|
|
@@ -974,24 +991,24 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
974
991
|
"selected",
|
|
975
992
|
"disabled"
|
|
976
993
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
977
|
-
"ml-ribbon-gallery__preview--icon":
|
|
994
|
+
"ml-ribbon-gallery__preview--icon": Y(r) || Z(r),
|
|
978
995
|
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
979
|
-
}]) }, [
|
|
996
|
+
}]) }, [Y(r) ? (v(), n(E(L), {
|
|
980
997
|
key: 0,
|
|
981
998
|
class: "ml-ribbon-gallery__preview-icon"
|
|
982
999
|
}, {
|
|
983
|
-
default: O(() => [(v(), n(C(
|
|
1000
|
+
default: O(() => [(v(), n(C(Y(r))))]),
|
|
984
1001
|
_: 2
|
|
985
1002
|
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
986
1003
|
key: 1,
|
|
987
1004
|
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(r)]),
|
|
988
1005
|
"aria-hidden": "true"
|
|
989
|
-
}, null, 2)) : Q(r) &&
|
|
1006
|
+
}, null, 2)) : Q(r) && Ce(r) ? (v(), i("img", {
|
|
990
1007
|
key: 2,
|
|
991
1008
|
class: "ml-ribbon-gallery__preview-svg",
|
|
992
1009
|
src: Q(r) ?? "",
|
|
993
1010
|
alt: ""
|
|
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(
|
|
1011
|
+
}, null, 8, Ye)) : Q(r) ? (v(), i("svg", Xe, [a("use", { href: Q(r) ?? "" }, null, 8, Ze)])) : (v(), i(e, { key: 4 }, [s(w(we(r)), 1)], 64))], 2), a("div", $, w(r.label), 1)], 64))])], 10, Je))), 128))], 4)]))), 128))])]),
|
|
995
1012
|
_: 3
|
|
996
1013
|
}, 8, [
|
|
997
1014
|
"visible",
|
|
@@ -999,26 +1016,26 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
999
1016
|
"width",
|
|
1000
1017
|
"popper-class"
|
|
1001
1018
|
])) : r("", !0),
|
|
1002
|
-
!o.collapsed &&
|
|
1019
|
+
!o.collapsed && I.value ? (v(), i("div", Qe, w(I.value), 1)) : r("", !0),
|
|
1003
1020
|
o.collapsed ? r("", !0) : (v(), i("div", $e, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1004
1021
|
key: o.id,
|
|
1005
1022
|
class: "ml-ribbon-gallery__category"
|
|
1006
|
-
}, [
|
|
1023
|
+
}, [I.value && q(o) ? (v(), i("h4", et, w(o.title), 1)) : r("", !0), a("div", {
|
|
1007
1024
|
class: "ml-ribbon-gallery__grid",
|
|
1008
|
-
style: h({ "--ml-ribbon-gallery-inline-columns": String(
|
|
1025
|
+
style: h({ "--ml-ribbon-gallery-inline-columns": String(H.value) })
|
|
1009
1026
|
}, [(v(!0), i(e, null, x(ge(o), (r) => (v(), i("button", {
|
|
1010
1027
|
key: r.id,
|
|
1011
1028
|
type: "button",
|
|
1012
1029
|
class: m(["ml-ribbon-gallery__item", { "is-selected": _.value === r.id }]),
|
|
1013
1030
|
disabled: X(r),
|
|
1014
|
-
onClick: (e) =>
|
|
1031
|
+
onClick: (e) => Te(r)
|
|
1015
1032
|
}, [S(t.$slots, "item", {
|
|
1016
1033
|
item: r,
|
|
1017
1034
|
category: o,
|
|
1018
1035
|
selected: _.value === r.id,
|
|
1019
1036
|
disabled: X(r),
|
|
1020
|
-
select: () =>
|
|
1021
|
-
}, () => [
|
|
1037
|
+
select: () => Te(r)
|
|
1038
|
+
}, () => [xe(r) ? (v(), n(C(xe(r)), f({
|
|
1022
1039
|
key: 0,
|
|
1023
1040
|
ref_for: !0
|
|
1024
1041
|
}, r.componentProps, {
|
|
@@ -1032,90 +1049,90 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1032
1049
|
"selected",
|
|
1033
1050
|
"disabled"
|
|
1034
1051
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1035
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1052
|
+
"ml-ribbon-gallery__preview--icon": Y(r) || Z(r),
|
|
1036
1053
|
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
1037
|
-
}]) }, [
|
|
1054
|
+
}]) }, [Y(r) ? (v(), n(E(L), {
|
|
1038
1055
|
key: 0,
|
|
1039
1056
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1040
1057
|
}, {
|
|
1041
|
-
default: O(() => [(v(), n(C(
|
|
1058
|
+
default: O(() => [(v(), n(C(Y(r))))]),
|
|
1042
1059
|
_: 2
|
|
1043
1060
|
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1044
1061
|
key: 1,
|
|
1045
1062
|
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(r)]),
|
|
1046
1063
|
"aria-hidden": "true"
|
|
1047
|
-
}, null, 2)) : Q(r) &&
|
|
1064
|
+
}, null, 2)) : Q(r) && Ce(r) ? (v(), i("img", {
|
|
1048
1065
|
key: 2,
|
|
1049
1066
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1050
1067
|
src: Q(r) ?? "",
|
|
1051
1068
|
alt: ""
|
|
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(
|
|
1069
|
+
}, null, 8, nt)) : Q(r) ? (v(), i("svg", rt, [a("use", { href: Q(r) ?? "" }, null, 8, it)])) : (v(), i(e, { key: 4 }, [s(w(we(r)), 1)], 64))], 2), a("div", at, w(r.label), 1)], 64))])], 10, tt))), 128))], 4)]))), 128)), pe.value ? (v(), i("div", ot, [
|
|
1053
1070
|
a("button", {
|
|
1054
1071
|
type: "button",
|
|
1055
1072
|
class: "ml-ribbon-gallery__control-button",
|
|
1056
|
-
disabled: o.disabled || !
|
|
1073
|
+
disabled: o.disabled || !ce.value,
|
|
1057
1074
|
"aria-label": "Show previous gallery row",
|
|
1058
|
-
onClick: l[1] ||= (e) =>
|
|
1059
|
-
}, [c(E(
|
|
1060
|
-
default: O(() => [c(E(
|
|
1075
|
+
onClick: l[1] ||= (e) => J(-1)
|
|
1076
|
+
}, [c(E(L), null, {
|
|
1077
|
+
default: O(() => [c(E(se))]),
|
|
1061
1078
|
_: 1
|
|
1062
1079
|
})], 8, st),
|
|
1063
1080
|
a("button", {
|
|
1064
1081
|
type: "button",
|
|
1065
1082
|
class: "ml-ribbon-gallery__control-button",
|
|
1066
|
-
disabled: o.disabled || !
|
|
1083
|
+
disabled: o.disabled || !ue.value,
|
|
1067
1084
|
"aria-label": "Show next gallery row",
|
|
1068
|
-
onClick: l[2] ||= (e) =>
|
|
1069
|
-
}, [c(E(
|
|
1070
|
-
default: O(() => [c(E(
|
|
1085
|
+
onClick: l[2] ||= (e) => J(1)
|
|
1086
|
+
}, [c(E(L), null, {
|
|
1087
|
+
default: O(() => [c(E(U))]),
|
|
1071
1088
|
_: 1
|
|
1072
1089
|
})], 8, ct),
|
|
1073
|
-
c(E(
|
|
1090
|
+
c(E(z), {
|
|
1074
1091
|
visible: y.value,
|
|
1075
1092
|
"onUpdate:visible": l[3] ||= (e) => y.value = e,
|
|
1076
1093
|
trigger: "click",
|
|
1077
1094
|
placement: "bottom-start",
|
|
1078
1095
|
disabled: o.disabled,
|
|
1079
|
-
width:
|
|
1080
|
-
"popper-class":
|
|
1081
|
-
"popper-options":
|
|
1096
|
+
width: me.value,
|
|
1097
|
+
"popper-class": W.value,
|
|
1098
|
+
"popper-options": he.value
|
|
1082
1099
|
}, {
|
|
1083
1100
|
reference: O(() => [a("button", {
|
|
1084
1101
|
ref_key: "inlineMoreButtonRef",
|
|
1085
|
-
ref:
|
|
1102
|
+
ref: A,
|
|
1086
1103
|
type: "button",
|
|
1087
1104
|
class: m(["ml-ribbon-gallery__control-button ml-ribbon-gallery__more-button", { "is-open": y.value }]),
|
|
1088
1105
|
disabled: o.disabled,
|
|
1089
1106
|
"aria-label": "Show more gallery items",
|
|
1090
1107
|
onClick: ye
|
|
1091
|
-
}, [c(E(
|
|
1092
|
-
default: O(() => [c(E(
|
|
1108
|
+
}, [c(E(L), null, {
|
|
1109
|
+
default: O(() => [c(E(le))]),
|
|
1093
1110
|
_: 1
|
|
1094
1111
|
})], 10, lt)]),
|
|
1095
1112
|
default: O(() => [a("div", {
|
|
1096
1113
|
ref_key: "inlinePanelRef",
|
|
1097
|
-
ref:
|
|
1114
|
+
ref: j,
|
|
1098
1115
|
class: "ml-ribbon-gallery__panel"
|
|
1099
1116
|
}, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1100
1117
|
key: o.id,
|
|
1101
1118
|
class: "ml-ribbon-gallery__panel-category"
|
|
1102
|
-
}, [
|
|
1119
|
+
}, [q(o) ? (v(), i("h4", ut, w(o.title), 1)) : r("", !0), a("div", {
|
|
1103
1120
|
class: "ml-ribbon-gallery__panel-grid",
|
|
1104
|
-
style: h(
|
|
1121
|
+
style: h(G.value)
|
|
1105
1122
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
1106
1123
|
key: r.id,
|
|
1107
1124
|
type: "button",
|
|
1108
1125
|
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
1109
|
-
"data-gallery-row-index":
|
|
1126
|
+
"data-gallery-row-index": _e(r),
|
|
1110
1127
|
disabled: X(r),
|
|
1111
|
-
onClick: (e) =>
|
|
1128
|
+
onClick: (e) => Te(r)
|
|
1112
1129
|
}, [S(t.$slots, "item", {
|
|
1113
1130
|
item: r,
|
|
1114
1131
|
category: o,
|
|
1115
1132
|
selected: _.value === r.id,
|
|
1116
1133
|
disabled: X(r),
|
|
1117
|
-
select: () =>
|
|
1118
|
-
}, () => [
|
|
1134
|
+
select: () => Te(r)
|
|
1135
|
+
}, () => [xe(r) ? (v(), n(C(xe(r)), f({
|
|
1119
1136
|
key: 0,
|
|
1120
1137
|
ref_for: !0
|
|
1121
1138
|
}, r.componentProps, {
|
|
@@ -1129,24 +1146,24 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1129
1146
|
"selected",
|
|
1130
1147
|
"disabled"
|
|
1131
1148
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1132
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1149
|
+
"ml-ribbon-gallery__preview--icon": Y(r) || Z(r),
|
|
1133
1150
|
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
1134
|
-
}]) }, [
|
|
1151
|
+
}]) }, [Y(r) ? (v(), n(E(L), {
|
|
1135
1152
|
key: 0,
|
|
1136
1153
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1137
1154
|
}, {
|
|
1138
|
-
default: O(() => [(v(), n(C(
|
|
1155
|
+
default: O(() => [(v(), n(C(Y(r))))]),
|
|
1139
1156
|
_: 2
|
|
1140
1157
|
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1141
1158
|
key: 1,
|
|
1142
1159
|
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(r)]),
|
|
1143
1160
|
"aria-hidden": "true"
|
|
1144
|
-
}, null, 2)) : Q(r) &&
|
|
1161
|
+
}, null, 2)) : Q(r) && Ce(r) ? (v(), i("img", {
|
|
1145
1162
|
key: 2,
|
|
1146
1163
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1147
1164
|
src: Q(r) ?? "",
|
|
1148
1165
|
alt: ""
|
|
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(
|
|
1166
|
+
}, null, 8, ft)) : Q(r) ? (v(), i("svg", pt, [a("use", { href: Q(r) ?? "" }, null, 8, mt)])) : (v(), i(e, { key: 4 }, [s(w(we(r)), 1)], 64))], 2), a("div", ht, w(r.label), 1)], 64))])], 10, dt))), 128))], 4)]))), 128))], 512)]),
|
|
1150
1167
|
_: 3
|
|
1151
1168
|
}, 8, [
|
|
1152
1169
|
"visible",
|
|
@@ -1182,32 +1199,32 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1182
1199
|
},
|
|
1183
1200
|
emits: ["change"],
|
|
1184
1201
|
setup(e, { emit: a }) {
|
|
1185
|
-
let o = e, s = a, l = t(() =>
|
|
1202
|
+
let o = e, s = a, l = t(() => ne(o.width, "96px")), u = t(() => l.value === "100%"), d = t(() => u.value ? { width: "100%" } : {}), p = t(() => u.value ? {} : { width: l.value }), g = t(() => M(o.prefixLabel)), _ = t(() => !o.prefixIcon || typeof o.prefixIcon == "string" ? null : o.prefixIcon), y = t(() => M(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);
|
|
1186
1203
|
function D(e) {
|
|
1187
|
-
|
|
1204
|
+
j(e);
|
|
1188
1205
|
}
|
|
1189
|
-
function
|
|
1206
|
+
function A(e) {
|
|
1190
1207
|
e.preventDefault(), e.stopPropagation();
|
|
1191
1208
|
let t = e.target;
|
|
1192
1209
|
if (!(t instanceof HTMLInputElement)) return;
|
|
1193
|
-
let n =
|
|
1194
|
-
n === void 0 && t.value.trim().length > 0 ||
|
|
1210
|
+
let n = te(t.value);
|
|
1211
|
+
n === void 0 && t.value.trim().length > 0 || j(n);
|
|
1195
1212
|
}
|
|
1196
|
-
function
|
|
1213
|
+
function j(e) {
|
|
1197
1214
|
Object.is(T.value, e) || (T.value = e, s("change", e));
|
|
1198
1215
|
}
|
|
1199
|
-
function
|
|
1216
|
+
function te(e) {
|
|
1200
1217
|
let t = e.trim();
|
|
1201
1218
|
if (!t) return;
|
|
1202
1219
|
let n = Number(t);
|
|
1203
1220
|
return Number.isFinite(n) ? n : void 0;
|
|
1204
1221
|
}
|
|
1205
|
-
function
|
|
1222
|
+
function M(e) {
|
|
1206
1223
|
if (typeof e != "string") return;
|
|
1207
1224
|
let t = e.trim();
|
|
1208
1225
|
return t.length > 0 ? t : void 0;
|
|
1209
1226
|
}
|
|
1210
|
-
function
|
|
1227
|
+
function ne(e, t) {
|
|
1211
1228
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1212
1229
|
if (typeof e == "string") {
|
|
1213
1230
|
let n = e.trim();
|
|
@@ -1222,8 +1239,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1222
1239
|
}]),
|
|
1223
1240
|
style: h(d.value),
|
|
1224
1241
|
"data-id": e.id,
|
|
1225
|
-
onKeydown: k(ee(
|
|
1226
|
-
}, [x.value ? (v(), i("span", wt, [_.value ? (v(), n(E(
|
|
1242
|
+
onKeydown: k(ee(A, ["stop", "prevent"]), ["enter"])
|
|
1243
|
+
}, [x.value ? (v(), i("span", wt, [_.value ? (v(), n(E(L), {
|
|
1227
1244
|
key: 0,
|
|
1228
1245
|
class: "ml-ribbon-input-number__prefix-icon",
|
|
1229
1246
|
"aria-hidden": "true"
|
|
@@ -1234,7 +1251,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1234
1251
|
key: 1,
|
|
1235
1252
|
class: m(["ml-ribbon-input-number__prefix-icon ml-ribbon-input-number__prefix-icon--class", y.value]),
|
|
1236
1253
|
"aria-hidden": "true"
|
|
1237
|
-
}, null, 2)) : r("", !0), g.value ? (v(), i("span", Tt, w(g.value), 1)) : r("", !0)])) : r("", !0), c(E(
|
|
1254
|
+
}, null, 2)) : r("", !0), g.value ? (v(), i("span", Tt, w(g.value), 1)) : r("", !0)])) : r("", !0), c(E(re), f(e.controlProps, {
|
|
1238
1255
|
"model-value": e.modelValue,
|
|
1239
1256
|
disabled: e.disabled,
|
|
1240
1257
|
style: p.value,
|
|
@@ -1312,7 +1329,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1312
1329
|
return (t, o) => (v(), i("div", {
|
|
1313
1330
|
class: "ml-ribbon-segmented",
|
|
1314
1331
|
"data-id": e.id
|
|
1315
|
-
}, [d.value ? (v(), i("div", Ot, w(u.value), 1)) : r("", !0), c(E(
|
|
1332
|
+
}, [d.value ? (v(), i("div", Ot, w(u.value), 1)) : r("", !0), c(E(B), {
|
|
1316
1333
|
class: "ml-ribbon-segmented__control",
|
|
1317
1334
|
options: e.options,
|
|
1318
1335
|
"model-value": e.modelValue,
|
|
@@ -1325,7 +1342,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1325
1342
|
default: O(({ item: e }) => [a("span", {
|
|
1326
1343
|
class: "ml-ribbon-segmented__option",
|
|
1327
1344
|
"data-option-value": y(e)
|
|
1328
|
-
}, [h(e) ? (v(), n(E(
|
|
1345
|
+
}, [h(e) ? (v(), n(E(L), {
|
|
1329
1346
|
key: 0,
|
|
1330
1347
|
class: "ml-ribbon-segmented__option-icon",
|
|
1331
1348
|
"aria-hidden": "true"
|
|
@@ -1433,41 +1450,41 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1433
1450
|
},
|
|
1434
1451
|
emits: ["item-click"],
|
|
1435
1452
|
setup(o, { emit: c }) {
|
|
1436
|
-
let l = o, p = c, g = u(pe, null), _ = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), y =
|
|
1437
|
-
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !
|
|
1453
|
+
let l = o, p = c, g = u(pe, null), _ = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), y = ae("size", ""), k = t(() => y.value || "default"), ee = t(() => Me(g?.tooltipShowAfter.value, 1e3)), A = t(() => Me(g?.tooltipHideAfter.value, 0)), j = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${k.value}`), ne = t(() => l.item.props?.icon || l.item.icon), N = t(() => l.item.hideLabel !== !0), P = b(void 0), F = t(() => l.item.type === "dropdown" && P.value ? P.value : je(l.item.tooltip) ?? je(l.item.label) ?? Re(l.item) ?? ze(l.item.id)), I = t(() => l.item.type !== "buttonGroup"), L = t(() => !I.value || !F.value), re = t(() => F.value ?? l.item.id), z = t(() => l.item.keyTip?.trim().toUpperCase() ?? ""), B = t(() => {
|
|
1454
|
+
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !z.value) return !1;
|
|
1438
1455
|
let e = g.keyTipsSequence.value.toLowerCase();
|
|
1439
|
-
return e ?
|
|
1440
|
-
}),
|
|
1456
|
+
return e ? z.value.toLowerCase().startsWith(e) : !0;
|
|
1457
|
+
}), H = t(() => l.disabled === !0 || l.item.disabled === !0 || g?.disabled.value === !0), U = t(() => l.item.props?.modelValue), oe = t(() => l.item.props?.activeLabel), se = t(() => l.item.props?.inactiveLabel), ce = t(() => Array.isArray(l.item.props?.categories) ? l.item.props.categories : []), le = t(() => {
|
|
1441
1458
|
let e = l.item.props?.modelValue;
|
|
1442
1459
|
return typeof e == "string" ? e : void 0;
|
|
1443
|
-
}),
|
|
1460
|
+
}), ue = t(() => {
|
|
1444
1461
|
let e = l.item.props?.inlineItemLimit;
|
|
1445
1462
|
return typeof e == "number" ? e : void 0;
|
|
1446
|
-
}), fe = t(() => {
|
|
1463
|
+
}), de = t(() => l.item.props?.inlineItemWidthMode === "auto" ? "auto" : "fixed"), fe = t(() => {
|
|
1447
1464
|
let e = l.item.props?.component;
|
|
1448
1465
|
return !e || typeof e == "string" ? null : d(T(e));
|
|
1449
|
-
}),
|
|
1466
|
+
}), W = t(() => {
|
|
1450
1467
|
let e = l.item.props?.componentProps;
|
|
1451
1468
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
1452
|
-
}),
|
|
1469
|
+
}), G = t(() => l.item.props?.wrap !== !1), me = t(() => l.item.props?.equalWidth === !0), he = t(() => {
|
|
1453
1470
|
let e = l.item.props?.buttonSize;
|
|
1454
1471
|
if (e === "large" || e === "default" || e === "small") return e;
|
|
1455
|
-
}),
|
|
1472
|
+
}), K = t(() => Ie(l.item.props?.iconSize)), q = t(() => Ne(l.item.props?.width ?? l.item.props?.comboWidth, "92px")), ge = t(() => l.item.props?.modelValue), J = t(() => Ne(l.item.props?.width ?? l.item.props?.inputNumberWidth, "96px")), _e = t(() => l.item.props?.modelValue), ve = t(() => {
|
|
1456
1473
|
let e = { ...l.item.props ?? {} };
|
|
1457
1474
|
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;
|
|
1458
|
-
}), ye = t(() =>
|
|
1459
|
-
if (!
|
|
1475
|
+
}), ye = t(() => Le(l.item.props?.labelWrapLines)), be = t(() => Fe(l.item.props?.labelWrapWidth)), Y = t(() => l.item.type === "button" && l.item.size === "large" && N.value && (ye.value ?? 0) > 1), xe = t(() => {
|
|
1476
|
+
if (!Y.value) return {};
|
|
1460
1477
|
let e = { "--ml-rb-item-label-max-lines": String(ye.value ?? 2) };
|
|
1461
1478
|
return be.value && (e["--ml-rb-item-label-wrap-width"] = be.value), e;
|
|
1462
1479
|
});
|
|
1463
1480
|
D(() => l.item.id, () => {
|
|
1464
|
-
|
|
1481
|
+
P.value = void 0;
|
|
1465
1482
|
});
|
|
1466
1483
|
function X() {
|
|
1467
|
-
|
|
1484
|
+
H.value || p("item-click", l.id);
|
|
1468
1485
|
}
|
|
1469
1486
|
function Z(e) {
|
|
1470
|
-
if (!
|
|
1487
|
+
if (!H.value) {
|
|
1471
1488
|
if (typeof e == "string" || typeof e == "number") {
|
|
1472
1489
|
p("item-click", String(e));
|
|
1473
1490
|
return;
|
|
@@ -1476,10 +1493,10 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1476
1493
|
}
|
|
1477
1494
|
}
|
|
1478
1495
|
function Q(e) {
|
|
1479
|
-
|
|
1496
|
+
P.value = e;
|
|
1480
1497
|
}
|
|
1481
|
-
function
|
|
1482
|
-
if (!
|
|
1498
|
+
function Se(e) {
|
|
1499
|
+
if (!H.value) {
|
|
1483
1500
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1484
1501
|
p("item-click", String(e));
|
|
1485
1502
|
return;
|
|
@@ -1487,8 +1504,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1487
1504
|
X();
|
|
1488
1505
|
}
|
|
1489
1506
|
}
|
|
1490
|
-
function
|
|
1491
|
-
if (
|
|
1507
|
+
function Ce(e) {
|
|
1508
|
+
if (H.value) return;
|
|
1492
1509
|
let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
|
|
1493
1510
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
1494
1511
|
p("item-click", String(t));
|
|
@@ -1496,8 +1513,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1496
1513
|
}
|
|
1497
1514
|
p("item-click", String(e));
|
|
1498
1515
|
}
|
|
1499
|
-
function
|
|
1500
|
-
if (!
|
|
1516
|
+
function we(e) {
|
|
1517
|
+
if (!H.value) {
|
|
1501
1518
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1502
1519
|
p("item-click", String(e));
|
|
1503
1520
|
return;
|
|
@@ -1505,11 +1522,11 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1505
1522
|
X();
|
|
1506
1523
|
}
|
|
1507
1524
|
}
|
|
1508
|
-
function we(e) {
|
|
1509
|
-
V.value || p("item-click", e);
|
|
1510
|
-
}
|
|
1511
1525
|
function Te(e) {
|
|
1512
|
-
|
|
1526
|
+
H.value || p("item-click", e);
|
|
1527
|
+
}
|
|
1528
|
+
function Ee(e) {
|
|
1529
|
+
if (!H.value) {
|
|
1513
1530
|
if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
|
|
1514
1531
|
p("item-click", String(e));
|
|
1515
1532
|
return;
|
|
@@ -1517,8 +1534,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1517
1534
|
X();
|
|
1518
1535
|
}
|
|
1519
1536
|
}
|
|
1520
|
-
function
|
|
1521
|
-
if (!
|
|
1537
|
+
function De(e) {
|
|
1538
|
+
if (!H.value) {
|
|
1522
1539
|
if (l.item.props?.emitValueOnChange === !0 && typeof e == "number" && Number.isFinite(e)) {
|
|
1523
1540
|
let t = l.item.props?.valuePrefix;
|
|
1524
1541
|
p("item-click", `${typeof t == "string" ? t : ""}${e}`);
|
|
@@ -1527,8 +1544,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1527
1544
|
X();
|
|
1528
1545
|
}
|
|
1529
1546
|
}
|
|
1530
|
-
function
|
|
1531
|
-
if (!
|
|
1547
|
+
function Oe(e) {
|
|
1548
|
+
if (!H.value) {
|
|
1532
1549
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1533
1550
|
p("item-click", String(e));
|
|
1534
1551
|
return;
|
|
@@ -1536,20 +1553,20 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1536
1553
|
X();
|
|
1537
1554
|
}
|
|
1538
1555
|
}
|
|
1539
|
-
function
|
|
1556
|
+
function ke(e) {
|
|
1540
1557
|
if (!e || typeof e != "object") return;
|
|
1541
1558
|
let t = e.label;
|
|
1542
1559
|
return typeof t == "string" ? t : void 0;
|
|
1543
1560
|
}
|
|
1544
|
-
function
|
|
1561
|
+
function je(e) {
|
|
1545
1562
|
if (typeof e != "string") return;
|
|
1546
1563
|
let t = e.trim();
|
|
1547
1564
|
return t.length > 0 ? t : void 0;
|
|
1548
1565
|
}
|
|
1549
|
-
function
|
|
1566
|
+
function Me(e, t) {
|
|
1550
1567
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1551
1568
|
}
|
|
1552
|
-
function
|
|
1569
|
+
function Ne(e, t) {
|
|
1553
1570
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1554
1571
|
if (typeof e == "string") {
|
|
1555
1572
|
let n = e.trim();
|
|
@@ -1557,35 +1574,35 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1557
1574
|
}
|
|
1558
1575
|
return t;
|
|
1559
1576
|
}
|
|
1560
|
-
function
|
|
1577
|
+
function Fe(e) {
|
|
1561
1578
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1562
1579
|
if (typeof e == "string") {
|
|
1563
1580
|
let t = e.trim();
|
|
1564
1581
|
return t ? t.toLowerCase() === "full" ? "100%" : t : void 0;
|
|
1565
1582
|
}
|
|
1566
1583
|
}
|
|
1567
|
-
function
|
|
1584
|
+
function Ie(e) {
|
|
1568
1585
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1569
1586
|
if (typeof e != "string") return;
|
|
1570
1587
|
let t = e.trim();
|
|
1571
1588
|
return t.length > 0 ? t : void 0;
|
|
1572
1589
|
}
|
|
1573
|
-
function
|
|
1590
|
+
function Le(e) {
|
|
1574
1591
|
if (!(typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e))) return Math.max(1, Math.round(e));
|
|
1575
1592
|
}
|
|
1576
|
-
function
|
|
1577
|
-
let t = _.value.map((e) =>
|
|
1593
|
+
function Re(e) {
|
|
1594
|
+
let t = _.value.map((e) => ke(e)).filter((e) => !!e);
|
|
1578
1595
|
if (t.length) return e.type === "buttonGroup" ? t.join(" / ") : t[0];
|
|
1579
1596
|
}
|
|
1580
|
-
function
|
|
1597
|
+
function ze(e) {
|
|
1581
1598
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
1582
1599
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
1583
1600
|
}
|
|
1584
|
-
return (t, c) => (v(), n(E(
|
|
1585
|
-
content:
|
|
1586
|
-
disabled:
|
|
1601
|
+
return (t, c) => (v(), n(E(ie), {
|
|
1602
|
+
content: F.value,
|
|
1603
|
+
disabled: L.value,
|
|
1587
1604
|
"show-after": ee.value,
|
|
1588
|
-
"hide-after":
|
|
1605
|
+
"hide-after": A.value,
|
|
1589
1606
|
placement: "top",
|
|
1590
1607
|
effect: "dark"
|
|
1591
1608
|
}, {
|
|
@@ -1595,26 +1612,26 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1595
1612
|
`type-${o.item.type}`,
|
|
1596
1613
|
{
|
|
1597
1614
|
"is-label-hidden": o.item.hideLabel === !0,
|
|
1598
|
-
"is-label-wrap":
|
|
1615
|
+
"is-label-wrap": Y.value
|
|
1599
1616
|
}
|
|
1600
1617
|
]]),
|
|
1601
|
-
style: h(
|
|
1618
|
+
style: h(xe.value),
|
|
1602
1619
|
"data-item-id": o.id,
|
|
1603
1620
|
role: "group"
|
|
1604
|
-
}, [
|
|
1621
|
+
}, [B.value ? (v(), i("span", Lt, w(z.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Pe, {
|
|
1605
1622
|
key: 1,
|
|
1606
1623
|
id: o.item.id,
|
|
1607
1624
|
label: o.item.label ?? "",
|
|
1608
1625
|
options: o.item.props?.options ?? [],
|
|
1609
1626
|
"hide-label": o.item.hideLabel === !0,
|
|
1610
|
-
wrap:
|
|
1611
|
-
"equal-width":
|
|
1612
|
-
"button-size":
|
|
1613
|
-
"icon-size":
|
|
1627
|
+
wrap: G.value,
|
|
1628
|
+
"equal-width": me.value,
|
|
1629
|
+
"button-size": he.value,
|
|
1630
|
+
"icon-size": K.value,
|
|
1614
1631
|
"tooltip-show-after": ee.value,
|
|
1615
|
-
"tooltip-hide-after":
|
|
1616
|
-
disabled:
|
|
1617
|
-
onChange:
|
|
1632
|
+
"tooltip-hide-after": A.value,
|
|
1633
|
+
disabled: H.value,
|
|
1634
|
+
onChange: we
|
|
1618
1635
|
}, null, 8, [
|
|
1619
1636
|
"id",
|
|
1620
1637
|
"label",
|
|
@@ -1635,9 +1652,9 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1635
1652
|
"model-value": o.item.props?.modelValue,
|
|
1636
1653
|
direction: o.item.props?.direction ?? "horizontal",
|
|
1637
1654
|
block: o.item.props?.block === !0,
|
|
1638
|
-
disabled:
|
|
1655
|
+
disabled: H.value,
|
|
1639
1656
|
"hide-label": o.item.hideLabel === !0,
|
|
1640
|
-
onChange:
|
|
1657
|
+
onChange: Se
|
|
1641
1658
|
}, null, 8, [
|
|
1642
1659
|
"id",
|
|
1643
1660
|
"label",
|
|
@@ -1651,14 +1668,14 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1651
1668
|
key: 3,
|
|
1652
1669
|
id: o.item.id,
|
|
1653
1670
|
label: o.item.label ?? o.item.id,
|
|
1654
|
-
"model-value":
|
|
1671
|
+
"model-value": U.value,
|
|
1655
1672
|
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1656
1673
|
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1657
|
-
"active-label":
|
|
1658
|
-
"inactive-label":
|
|
1659
|
-
disabled:
|
|
1674
|
+
"active-label": oe.value,
|
|
1675
|
+
"inactive-label": se.value,
|
|
1676
|
+
disabled: H.value,
|
|
1660
1677
|
"hide-label": o.item.hideLabel === !0,
|
|
1661
|
-
onChange:
|
|
1678
|
+
onChange: Ce
|
|
1662
1679
|
}, null, 8, [
|
|
1663
1680
|
"id",
|
|
1664
1681
|
"label",
|
|
@@ -1673,13 +1690,14 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1673
1690
|
key: 4,
|
|
1674
1691
|
id: o.item.id,
|
|
1675
1692
|
label: o.item.label ?? "",
|
|
1676
|
-
categories:
|
|
1677
|
-
"model-value":
|
|
1693
|
+
categories: ce.value,
|
|
1694
|
+
"model-value": le.value,
|
|
1678
1695
|
collapsed: o.item.props?.collapsed === !0,
|
|
1679
|
-
"inline-item-limit":
|
|
1696
|
+
"inline-item-limit": ue.value,
|
|
1697
|
+
"inline-item-width-mode": de.value,
|
|
1680
1698
|
"preview-fallback": l.galleryPreviewFallback,
|
|
1681
|
-
disabled:
|
|
1682
|
-
onSelect:
|
|
1699
|
+
disabled: H.value,
|
|
1700
|
+
onSelect: Te
|
|
1683
1701
|
}, null, 8, [
|
|
1684
1702
|
"id",
|
|
1685
1703
|
"label",
|
|
@@ -1687,19 +1705,20 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1687
1705
|
"model-value",
|
|
1688
1706
|
"collapsed",
|
|
1689
1707
|
"inline-item-limit",
|
|
1708
|
+
"inline-item-width-mode",
|
|
1690
1709
|
"preview-fallback",
|
|
1691
1710
|
"disabled"
|
|
1692
1711
|
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(Ft, {
|
|
1693
1712
|
key: 5,
|
|
1694
1713
|
id: o.item.id,
|
|
1695
1714
|
item: o.item,
|
|
1696
|
-
disabled:
|
|
1715
|
+
disabled: H.value
|
|
1697
1716
|
}, {
|
|
1698
|
-
default: O(() => [fe.value ? (v(), n(C(fe.value), f({ key: 0 },
|
|
1717
|
+
default: O(() => [fe.value ? (v(), n(C(fe.value), f({ key: 0 }, W.value, {
|
|
1699
1718
|
item: o.item,
|
|
1700
1719
|
"group-id": o.groupId,
|
|
1701
|
-
disabled:
|
|
1702
|
-
"emit-item-click":
|
|
1720
|
+
disabled: H.value,
|
|
1721
|
+
"emit-item-click": Oe
|
|
1703
1722
|
}), null, 16, [
|
|
1704
1723
|
"item",
|
|
1705
1724
|
"group-id",
|
|
@@ -1707,7 +1726,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1707
1726
|
])) : S(t.$slots, "template", {
|
|
1708
1727
|
key: 1,
|
|
1709
1728
|
item: o.item,
|
|
1710
|
-
disabled:
|
|
1729
|
+
disabled: H.value
|
|
1711
1730
|
})]),
|
|
1712
1731
|
_: 3
|
|
1713
1732
|
}, 8, [
|
|
@@ -1719,14 +1738,14 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1719
1738
|
id: o.item.id,
|
|
1720
1739
|
label: o.item.label ?? o.item.id,
|
|
1721
1740
|
tooltip: o.item.tooltip,
|
|
1722
|
-
icon:
|
|
1741
|
+
icon: ne.value,
|
|
1723
1742
|
options: o.item.props?.options ?? [],
|
|
1724
|
-
disabled:
|
|
1743
|
+
disabled: H.value,
|
|
1725
1744
|
"hide-label": o.item.hideLabel === !0,
|
|
1726
1745
|
"item-size": o.item.size ?? "medium",
|
|
1727
1746
|
"sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
|
|
1728
1747
|
"tooltip-show-after": ee.value,
|
|
1729
|
-
"tooltip-hide-after":
|
|
1748
|
+
"tooltip-hide-after": A.value,
|
|
1730
1749
|
onCommand: Z,
|
|
1731
1750
|
onTooltipChange: Q,
|
|
1732
1751
|
onClick: X
|
|
@@ -1742,26 +1761,26 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1742
1761
|
"sync-label-with-selection",
|
|
1743
1762
|
"tooltip-show-after",
|
|
1744
1763
|
"tooltip-hide-after"
|
|
1745
|
-
])) : o.item.type === "checkbox" ? (v(), n(E(
|
|
1764
|
+
])) : o.item.type === "checkbox" ? (v(), n(E(te), {
|
|
1746
1765
|
key: 7,
|
|
1747
|
-
disabled:
|
|
1766
|
+
disabled: H.value,
|
|
1748
1767
|
onChange: X
|
|
1749
1768
|
}, {
|
|
1750
1769
|
default: O(() => [s(w(o.item.label), 1)]),
|
|
1751
1770
|
_: 1
|
|
1752
|
-
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(
|
|
1771
|
+
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(M), {
|
|
1753
1772
|
key: 8,
|
|
1754
|
-
disabled:
|
|
1773
|
+
disabled: H.value,
|
|
1755
1774
|
onChange: X
|
|
1756
|
-
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(
|
|
1775
|
+
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(V), {
|
|
1757
1776
|
key: 9,
|
|
1758
1777
|
"model-value": ge.value,
|
|
1759
|
-
disabled:
|
|
1760
|
-
"popper-class":
|
|
1761
|
-
style: h({ width:
|
|
1762
|
-
onChange:
|
|
1778
|
+
disabled: H.value,
|
|
1779
|
+
"popper-class": j.value,
|
|
1780
|
+
style: h({ width: q.value }),
|
|
1781
|
+
onChange: Ee
|
|
1763
1782
|
}, {
|
|
1764
|
-
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(
|
|
1783
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(R), {
|
|
1765
1784
|
key: String(e.value),
|
|
1766
1785
|
label: String(e.label),
|
|
1767
1786
|
value: e.value
|
|
@@ -1775,14 +1794,14 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1775
1794
|
])) : o.item.type === "inputNumber" ? (v(), n(Et, {
|
|
1776
1795
|
key: 10,
|
|
1777
1796
|
id: o.item.id,
|
|
1778
|
-
"model-value":
|
|
1779
|
-
width:
|
|
1797
|
+
"model-value": _e.value,
|
|
1798
|
+
width: J.value,
|
|
1780
1799
|
"prefix-label": o.item.props?.prefixLabel,
|
|
1781
1800
|
"prefix-icon": o.item.props?.prefixIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1782
1801
|
"prefix-icon-class": o.item.props?.prefixIconClass,
|
|
1783
1802
|
"control-props": ve.value,
|
|
1784
|
-
disabled:
|
|
1785
|
-
onChange:
|
|
1803
|
+
disabled: H.value,
|
|
1804
|
+
onChange: De
|
|
1786
1805
|
}, null, 8, [
|
|
1787
1806
|
"id",
|
|
1788
1807
|
"model-value",
|
|
@@ -1796,10 +1815,10 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1796
1815
|
key: 11,
|
|
1797
1816
|
id: o.item.id,
|
|
1798
1817
|
label: o.item.label ?? o.item.id,
|
|
1799
|
-
icon:
|
|
1800
|
-
disabled:
|
|
1801
|
-
"hide-label": !
|
|
1802
|
-
"aria-label":
|
|
1818
|
+
icon: ne.value,
|
|
1819
|
+
disabled: H.value,
|
|
1820
|
+
"hide-label": !N.value,
|
|
1821
|
+
"aria-label": re.value,
|
|
1803
1822
|
onClick: X
|
|
1804
1823
|
}, null, 8, [
|
|
1805
1824
|
"id",
|
|
@@ -1894,13 +1913,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1894
1913
|
maxWidth: e,
|
|
1895
1914
|
flex: `0 0 ${e}`
|
|
1896
1915
|
};
|
|
1897
|
-
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), ee = b(null),
|
|
1916
|
+
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), ee = b(null), j = b(null), te = b(0), M = b(0), ne = ae("size", ""), N = t(() => ne.value || "default"), P = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${N.value}`), F = t(() => ({ modifiers: [{
|
|
1898
1917
|
name: "offset",
|
|
1899
|
-
options: { offset: [
|
|
1900
|
-
}] })),
|
|
1918
|
+
options: { offset: [te.value, 8] }
|
|
1919
|
+
}] })), I = t(() => ({ modifiers: [{
|
|
1901
1920
|
name: "offset",
|
|
1902
|
-
options: { offset: [
|
|
1903
|
-
}] })),
|
|
1921
|
+
options: { offset: [M.value, 8] }
|
|
1922
|
+
}] })), re = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), R = t(() => k.value.length > 0), B = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), V = b(!1), H = b(!1), ie = t(() => {
|
|
1904
1923
|
if (!s.groupModel || !k.value.length) return null;
|
|
1905
1924
|
let e = new Set(k.value), t = s.groupModel.collections?.map((t) => ({
|
|
1906
1925
|
...t,
|
|
@@ -1910,7 +1929,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1910
1929
|
...s.groupModel,
|
|
1911
1930
|
collections: t
|
|
1912
1931
|
} : null;
|
|
1913
|
-
}),
|
|
1932
|
+
}), oe = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
1914
1933
|
id: `${s.groupModel.id}-footer-menu`,
|
|
1915
1934
|
title: "",
|
|
1916
1935
|
orientation: "row",
|
|
@@ -1920,7 +1939,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1920
1939
|
items: s.groupModel.footerMenuItems
|
|
1921
1940
|
}]
|
|
1922
1941
|
} : null);
|
|
1923
|
-
function
|
|
1942
|
+
function ce() {
|
|
1924
1943
|
let e = T.value?.querySelector(".ml-ribbon-group__content");
|
|
1925
1944
|
if (!e) {
|
|
1926
1945
|
k.value.length > 0 && (k.value = []);
|
|
@@ -1939,55 +1958,55 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1939
1958
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
1940
1959
|
}), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
|
|
1941
1960
|
}
|
|
1942
|
-
function
|
|
1961
|
+
function le() {
|
|
1943
1962
|
p(() => {
|
|
1944
|
-
|
|
1963
|
+
ge(), ue(), de(), ce();
|
|
1945
1964
|
});
|
|
1946
1965
|
}
|
|
1947
|
-
function
|
|
1966
|
+
function ue() {
|
|
1948
1967
|
let e = T.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
|
|
1949
1968
|
if (!e || !t) {
|
|
1950
|
-
|
|
1969
|
+
te.value !== 0 && (te.value = 0);
|
|
1951
1970
|
return;
|
|
1952
1971
|
}
|
|
1953
1972
|
let n = Math.round(e.left - t.left);
|
|
1954
|
-
|
|
1973
|
+
te.value !== n && (te.value = n);
|
|
1955
1974
|
}
|
|
1956
|
-
function
|
|
1957
|
-
let e = T.value?.getBoundingClientRect(), t =
|
|
1975
|
+
function de() {
|
|
1976
|
+
let e = T.value?.getBoundingClientRect(), t = j.value?.getBoundingClientRect();
|
|
1958
1977
|
if (!e || !t) {
|
|
1959
|
-
|
|
1978
|
+
M.value !== 0 && (M.value = 0);
|
|
1960
1979
|
return;
|
|
1961
1980
|
}
|
|
1962
1981
|
let n = Math.round(e.left - t.left);
|
|
1963
|
-
|
|
1982
|
+
M.value !== n && (M.value = n);
|
|
1964
1983
|
}
|
|
1965
1984
|
function W(e) {
|
|
1966
|
-
|
|
1985
|
+
V.value = e;
|
|
1967
1986
|
}
|
|
1968
1987
|
function G(e) {
|
|
1969
|
-
|
|
1988
|
+
H.value = e;
|
|
1970
1989
|
}
|
|
1971
1990
|
function me() {
|
|
1972
|
-
x.value || (
|
|
1991
|
+
x.value || (V.value = !V.value);
|
|
1973
1992
|
}
|
|
1974
1993
|
function he() {
|
|
1975
|
-
x.value || (
|
|
1994
|
+
x.value || (H.value = !H.value);
|
|
1976
1995
|
}
|
|
1977
|
-
let K = null,
|
|
1978
|
-
function
|
|
1996
|
+
let K = null, q = null;
|
|
1997
|
+
function ge() {
|
|
1979
1998
|
if (!K) return;
|
|
1980
1999
|
let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
1981
|
-
|
|
2000
|
+
q !== e && (q && K.unobserve(q), e && K.observe(e), q = e);
|
|
1982
2001
|
}
|
|
1983
2002
|
return D(() => s.groupModel, () => {
|
|
1984
|
-
|
|
2003
|
+
le();
|
|
1985
2004
|
}, { deep: !0 }), D(x, (e) => {
|
|
1986
|
-
e && (
|
|
2005
|
+
e && (V.value = !1, H.value = !1);
|
|
1987
2006
|
}), g(() => {
|
|
1988
2007
|
typeof ResizeObserver < "u" && (K = new ResizeObserver(() => {
|
|
1989
|
-
|
|
1990
|
-
}), T.value && K.observe(T.value),
|
|
2008
|
+
ue(), de(), ce();
|
|
2009
|
+
}), T.value && K.observe(T.value), ge()), le();
|
|
1991
2010
|
}), _(() => {
|
|
1992
2011
|
K?.disconnect();
|
|
1993
2012
|
}), (t, o) => (v(), i("section", {
|
|
@@ -1997,39 +2016,39 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
1997
2016
|
"data-priority": e.priority ?? 100,
|
|
1998
2017
|
style: h(y.value)
|
|
1999
2018
|
}, [a("div", Vt, [S(t.$slots, "default")]), a("footer", Ht, [
|
|
2000
|
-
|
|
2019
|
+
re.value ? (v(), n(E(L), {
|
|
2001
2020
|
key: 0,
|
|
2002
2021
|
class: "ml-ribbon-group__icon"
|
|
2003
2022
|
}, {
|
|
2004
|
-
default: O(() => [(v(), n(C(
|
|
2023
|
+
default: O(() => [(v(), n(C(re.value)))]),
|
|
2005
2024
|
_: 1
|
|
2006
2025
|
})) : r("", !0),
|
|
2007
2026
|
a("span", Ut, w(e.title), 1),
|
|
2008
|
-
|
|
2027
|
+
B.value && oe.value ? (v(), n(E(z), {
|
|
2009
2028
|
key: 1,
|
|
2010
2029
|
trigger: "click",
|
|
2011
2030
|
placement: "bottom-start",
|
|
2012
2031
|
disabled: x.value,
|
|
2013
|
-
"popper-class":
|
|
2014
|
-
"popper-options":
|
|
2032
|
+
"popper-class": P.value,
|
|
2033
|
+
"popper-options": I.value,
|
|
2015
2034
|
onShow: o[1] ||= (e) => W(!0),
|
|
2016
2035
|
onHide: o[2] ||= (e) => W(!1)
|
|
2017
2036
|
}, {
|
|
2018
2037
|
reference: O(() => [a("button", {
|
|
2019
2038
|
ref_key: "footerTriggerRef",
|
|
2020
|
-
ref:
|
|
2039
|
+
ref: j,
|
|
2021
2040
|
type: "button",
|
|
2022
|
-
class: m(["ml-ribbon-group__footer-trigger", { "is-open":
|
|
2041
|
+
class: m(["ml-ribbon-group__footer-trigger", { "is-open": V.value }]),
|
|
2023
2042
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2024
|
-
"aria-expanded":
|
|
2043
|
+
"aria-expanded": V.value,
|
|
2025
2044
|
disabled: x.value,
|
|
2026
2045
|
onClick: me
|
|
2027
|
-
}, [c(E(
|
|
2028
|
-
default: O(() => [(v(), n(C(
|
|
2046
|
+
}, [c(E(L), null, {
|
|
2047
|
+
default: O(() => [(v(), n(C(V.value ? E(se) : E(U))))]),
|
|
2029
2048
|
_: 1
|
|
2030
2049
|
})], 10, Wt)]),
|
|
2031
2050
|
default: O(() => [a("div", Gt, [c(zt, {
|
|
2032
|
-
group:
|
|
2051
|
+
group: oe.value,
|
|
2033
2052
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2034
2053
|
disabled: x.value,
|
|
2035
2054
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
@@ -2044,13 +2063,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2044
2063
|
"popper-class",
|
|
2045
2064
|
"popper-options"
|
|
2046
2065
|
])) : r("", !0),
|
|
2047
|
-
|
|
2066
|
+
R.value && ie.value ? (v(), n(E(z), {
|
|
2048
2067
|
key: 2,
|
|
2049
2068
|
trigger: "click",
|
|
2050
2069
|
placement: "bottom-start",
|
|
2051
2070
|
disabled: x.value,
|
|
2052
|
-
"popper-class":
|
|
2053
|
-
"popper-options":
|
|
2071
|
+
"popper-class": P.value,
|
|
2072
|
+
"popper-options": F.value,
|
|
2054
2073
|
onShow: o[4] ||= (e) => G(!0),
|
|
2055
2074
|
onHide: o[5] ||= (e) => G(!1)
|
|
2056
2075
|
}, {
|
|
@@ -2058,17 +2077,17 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2058
2077
|
ref_key: "overflowTriggerRef",
|
|
2059
2078
|
ref: ee,
|
|
2060
2079
|
type: "button",
|
|
2061
|
-
class: m(["ml-ribbon-group__overflow-trigger", { "is-open":
|
|
2080
|
+
class: m(["ml-ribbon-group__overflow-trigger", { "is-open": H.value }]),
|
|
2062
2081
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2063
|
-
"aria-expanded":
|
|
2082
|
+
"aria-expanded": H.value,
|
|
2064
2083
|
disabled: x.value,
|
|
2065
2084
|
onClick: he
|
|
2066
|
-
}, [c(E(
|
|
2067
|
-
default: O(() => [(v(), n(C(
|
|
2085
|
+
}, [c(E(L), null, {
|
|
2086
|
+
default: O(() => [(v(), n(C(H.value ? E(se) : E(U))))]),
|
|
2068
2087
|
_: 1
|
|
2069
2088
|
})], 10, Kt)]),
|
|
2070
2089
|
default: O(() => [a("div", qt, [c(zt, {
|
|
2071
|
-
group:
|
|
2090
|
+
group: ie.value,
|
|
2072
2091
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2073
2092
|
disabled: x.value,
|
|
2074
2093
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
@@ -2083,14 +2102,14 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2083
2102
|
"popper-class",
|
|
2084
2103
|
"popper-options"
|
|
2085
2104
|
])) : r("", !0),
|
|
2086
|
-
e.showLauncherIcon ?? e.launcher ? (v(), n(E(
|
|
2105
|
+
e.showLauncherIcon ?? e.launcher ? (v(), n(E(A), {
|
|
2087
2106
|
key: 3,
|
|
2088
2107
|
link: "",
|
|
2089
2108
|
class: "ml-ribbon-group__launcher",
|
|
2090
2109
|
disabled: x.value
|
|
2091
2110
|
}, {
|
|
2092
|
-
default: O(() => [c(E(
|
|
2093
|
-
default: O(() => [c(E(
|
|
2111
|
+
default: O(() => [c(E(L), null, {
|
|
2112
|
+
default: O(() => [c(E(fe))]),
|
|
2094
2113
|
_: 1
|
|
2095
2114
|
})]),
|
|
2096
2115
|
_: 1
|
|
@@ -2200,7 +2219,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2200
2219
|
props: k(e.props)
|
|
2201
2220
|
};
|
|
2202
2221
|
}
|
|
2203
|
-
function
|
|
2222
|
+
function j(e) {
|
|
2204
2223
|
return {
|
|
2205
2224
|
...e,
|
|
2206
2225
|
icon: f(e.icon),
|
|
@@ -2211,16 +2230,16 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2211
2230
|
}))
|
|
2212
2231
|
};
|
|
2213
2232
|
}
|
|
2214
|
-
function
|
|
2233
|
+
function te(e) {
|
|
2215
2234
|
return e.map((e) => ({
|
|
2216
2235
|
...e,
|
|
2217
|
-
groups: e.groups?.map(
|
|
2236
|
+
groups: e.groups?.map(j)
|
|
2218
2237
|
}));
|
|
2219
2238
|
}
|
|
2220
|
-
function
|
|
2239
|
+
function M(e, t) {
|
|
2221
2240
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
2222
2241
|
}
|
|
2223
|
-
let
|
|
2242
|
+
let N = {
|
|
2224
2243
|
layoutSwitcherTooltip: "Switch ribbon layout",
|
|
2225
2244
|
minimizeTooltip: "Minimize ribbon",
|
|
2226
2245
|
keyTipsToggleText: "Key Tips",
|
|
@@ -2235,62 +2254,62 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2235
2254
|
keyTipsEmptySequence: "No key sequence",
|
|
2236
2255
|
contextualTabDefaultTitle: "Contextual",
|
|
2237
2256
|
galleryPreviewFallback: "Preview unavailable"
|
|
2238
|
-
},
|
|
2239
|
-
y(pe,
|
|
2240
|
-
|
|
2241
|
-
}, { deep: !0 }), D(() =>
|
|
2242
|
-
e !==
|
|
2243
|
-
}), D(() =>
|
|
2257
|
+
}, P = s, F = u, { context: I, visibleTabs: re } = _e(P.id, P.tabs, P.disabled, P.activeLayout ? String(P.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : P.layout, P.minimized, P.activeTab || P.tabs[0]?.id || "", M(P.tooltipShowAfter, 1e3), M(P.tooltipHideAfter, 0));
|
|
2258
|
+
y(pe, I), D(() => P.tabs, (e) => {
|
|
2259
|
+
I.tabs.value = te(e), I.tabs.value.some((e) => e.id === I.activeTab.value) || (I.activeTab.value = I.tabs.value[0]?.id || "");
|
|
2260
|
+
}, { deep: !0 }), D(() => P.layout, (e) => {
|
|
2261
|
+
e !== I.layout.value && (I.layout.value = e);
|
|
2262
|
+
}), D(() => P.activeLayout, (e) => {
|
|
2244
2263
|
if (!e) return;
|
|
2245
2264
|
let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
|
|
2246
|
-
t !==
|
|
2247
|
-
}), D(() =>
|
|
2248
|
-
e !==
|
|
2249
|
-
}), D(() =>
|
|
2250
|
-
e !==
|
|
2251
|
-
}), D(() =>
|
|
2252
|
-
e && e !==
|
|
2253
|
-
}), D(() =>
|
|
2254
|
-
let t =
|
|
2255
|
-
t !==
|
|
2256
|
-
}), D(() =>
|
|
2257
|
-
let t =
|
|
2258
|
-
t !==
|
|
2259
|
-
}), D(
|
|
2260
|
-
|
|
2261
|
-
}), D(
|
|
2262
|
-
|
|
2263
|
-
}), D(
|
|
2264
|
-
|
|
2265
|
-
}), D(
|
|
2266
|
-
|
|
2267
|
-
}), D(
|
|
2268
|
-
|
|
2265
|
+
t !== I.layout.value && (I.layout.value = t);
|
|
2266
|
+
}), D(() => P.minimized, (e) => {
|
|
2267
|
+
e !== I.minimized.value && (I.minimized.value = e);
|
|
2268
|
+
}), D(() => P.disabled, (e) => {
|
|
2269
|
+
e !== I.disabled.value && (I.disabled.value = e);
|
|
2270
|
+
}), D(() => P.activeTab, (e) => {
|
|
2271
|
+
e && e !== I.activeTab.value && (I.activeTab.value = e);
|
|
2272
|
+
}), D(() => P.tooltipShowAfter, (e) => {
|
|
2273
|
+
let t = M(e, 1e3);
|
|
2274
|
+
t !== I.tooltipShowAfter.value && (I.tooltipShowAfter.value = t);
|
|
2275
|
+
}), D(() => P.tooltipHideAfter, (e) => {
|
|
2276
|
+
let t = M(e, 0);
|
|
2277
|
+
t !== I.tooltipHideAfter.value && (I.tooltipHideAfter.value = t);
|
|
2278
|
+
}), D(I.activeTab, (e) => {
|
|
2279
|
+
F("update:activeTab", e), F("tabChange", e);
|
|
2280
|
+
}), D(I.layout, (e) => {
|
|
2281
|
+
F("update:layout", e), F("layoutChange", e);
|
|
2282
|
+
}), D(I.minimized, (e) => {
|
|
2283
|
+
F("update:minimized", e);
|
|
2284
|
+
}), D(I.overflowOpen, (e) => {
|
|
2285
|
+
F(e ? "overflowOpen" : "overflowClose");
|
|
2286
|
+
}), D(I.backdropOpen, (e) => {
|
|
2287
|
+
F(e ? "backstageOpen" : "backstageClose");
|
|
2269
2288
|
});
|
|
2270
|
-
let
|
|
2289
|
+
let R = t(() => re.value.find((e) => e.id === I.activeTab.value)), B = t(() => new Set(re.value.filter((e) => e.contextual && e.contextualMode === "exclusive").map((e) => e.id))), V = t(() => Le(R.value)), U = t(() => R.value?.groups?.filter((e) => e.visible !== !1) ?? []), se = b(null), le = b(null), fe = b(null), W = b(null), G = b(!1), me = b(0), he = b({
|
|
2271
2290
|
left: "0px",
|
|
2272
2291
|
top: "0px",
|
|
2273
2292
|
width: "1px",
|
|
2274
2293
|
height: "0px"
|
|
2275
|
-
}), K = b(/* @__PURE__ */ new Set()),
|
|
2276
|
-
layoutSwitcherTooltip:
|
|
2277
|
-
minimizeTooltip:
|
|
2278
|
-
keyTipsToggleText:
|
|
2279
|
-
overflowTriggerAriaLabel:
|
|
2280
|
-
groupOverflowTriggerAriaLabel:
|
|
2281
|
-
fileMenuLabel:
|
|
2282
|
-
fileMenuOpenBackstageLabel:
|
|
2283
|
-
backstageBackLabel:
|
|
2284
|
-
backstageTitle:
|
|
2285
|
-
backstageDescription:
|
|
2286
|
-
keyTipsSequencePrefix:
|
|
2287
|
-
keyTipsEmptySequence:
|
|
2288
|
-
contextualTabDefaultTitle:
|
|
2289
|
-
galleryPreviewFallback:
|
|
2290
|
-
})),
|
|
2294
|
+
}), K = b(/* @__PURE__ */ new Set()), q = b({}), ge = ae("size", ""), J = t(() => P.size || ge.value || "default"), ve = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${J.value}`), ye = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${J.value}`), be = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${J.value}`), Y = t(() => ({
|
|
2295
|
+
layoutSwitcherTooltip: P.texts.layoutSwitcherTooltip || N.layoutSwitcherTooltip,
|
|
2296
|
+
minimizeTooltip: P.texts.minimizeTooltip || N.minimizeTooltip,
|
|
2297
|
+
keyTipsToggleText: P.texts.keyTipsToggleText || N.keyTipsToggleText,
|
|
2298
|
+
overflowTriggerAriaLabel: P.texts.overflowTriggerAriaLabel || N.overflowTriggerAriaLabel,
|
|
2299
|
+
groupOverflowTriggerAriaLabel: P.texts.groupOverflowTriggerAriaLabel || N.groupOverflowTriggerAriaLabel,
|
|
2300
|
+
fileMenuLabel: P.texts.fileMenuLabel || N.fileMenuLabel,
|
|
2301
|
+
fileMenuOpenBackstageLabel: P.texts.fileMenuOpenBackstageLabel || N.fileMenuOpenBackstageLabel,
|
|
2302
|
+
backstageBackLabel: P.texts.backstageBackLabel || N.backstageBackLabel,
|
|
2303
|
+
backstageTitle: P.texts.backstageTitle || N.backstageTitle,
|
|
2304
|
+
backstageDescription: P.texts.backstageDescription || N.backstageDescription,
|
|
2305
|
+
keyTipsSequencePrefix: P.texts.keyTipsSequencePrefix || N.keyTipsSequencePrefix,
|
|
2306
|
+
keyTipsEmptySequence: P.texts.keyTipsEmptySequence || N.keyTipsEmptySequence,
|
|
2307
|
+
contextualTabDefaultTitle: P.texts.contextualTabDefaultTitle || N.contextualTabDefaultTitle,
|
|
2308
|
+
galleryPreviewFallback: P.texts.galleryPreviewFallback || N.galleryPreviewFallback
|
|
2309
|
+
})), X = t(() => M(P.tooltipShowAfter, 1e3)), Z = t(() => M(P.tooltipHideAfter, 0)), Q = t(() => I.minimized.value ? ce : oe), Se = t(() => U.value.filter((e) => !K.value.has(e.id))), Ce = t(() => U.value.filter((e) => K.value.has(e.id))), we = t(() => {
|
|
2291
2310
|
if (!Ce.value.length) return 220;
|
|
2292
2311
|
let e = Ce.value.reduce((e, t) => {
|
|
2293
|
-
let n =
|
|
2312
|
+
let n = q.value[t.id] ?? ke(t);
|
|
2294
2313
|
return Math.max(e, n);
|
|
2295
2314
|
}, 0), t = Math.ceil(e + 40);
|
|
2296
2315
|
return Math.max(220, Math.min(720, t));
|
|
@@ -2326,8 +2345,8 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2326
2345
|
}), t;
|
|
2327
2346
|
}
|
|
2328
2347
|
function je() {
|
|
2329
|
-
let e =
|
|
2330
|
-
let n =
|
|
2348
|
+
let e = U.value.reduce((e, t) => {
|
|
2349
|
+
let n = q.value[t.id] ?? ke(t);
|
|
2331
2350
|
return e + Math.max(n, ke(t));
|
|
2332
2351
|
}, 0);
|
|
2333
2352
|
return Math.max(220, e);
|
|
@@ -2337,20 +2356,20 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2337
2356
|
return Number.isFinite(t) && t > 0 ? t : vn;
|
|
2338
2357
|
}
|
|
2339
2358
|
function Ne() {
|
|
2340
|
-
if (
|
|
2359
|
+
if (I.layout.value !== "classic") {
|
|
2341
2360
|
K.value = /* @__PURE__ */ new Set();
|
|
2342
2361
|
return;
|
|
2343
2362
|
}
|
|
2344
|
-
let e =
|
|
2363
|
+
let e = I.minimized.value ? W.value : fe.value;
|
|
2345
2364
|
if (!e) return;
|
|
2346
|
-
let t =
|
|
2365
|
+
let t = U.value;
|
|
2347
2366
|
if (!t.length) {
|
|
2348
2367
|
K.value = /* @__PURE__ */ new Set();
|
|
2349
2368
|
return;
|
|
2350
2369
|
}
|
|
2351
2370
|
let n = Math.round(e.getBoundingClientRect().width), r = Me(e), i = Ae(e);
|
|
2352
|
-
|
|
2353
|
-
...
|
|
2371
|
+
q.value = {
|
|
2372
|
+
...q.value,
|
|
2354
2373
|
...i
|
|
2355
2374
|
};
|
|
2356
2375
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
@@ -2368,7 +2387,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2368
2387
|
}
|
|
2369
2388
|
function Pe() {
|
|
2370
2389
|
p(() => {
|
|
2371
|
-
if (
|
|
2390
|
+
if (I.layout.value !== "classic" || I.minimized.value) {
|
|
2372
2391
|
Ne();
|
|
2373
2392
|
return;
|
|
2374
2393
|
}
|
|
@@ -2382,10 +2401,10 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2382
2401
|
});
|
|
2383
2402
|
}
|
|
2384
2403
|
function Fe() {
|
|
2385
|
-
let e =
|
|
2404
|
+
let e = se.value, t = le.value;
|
|
2386
2405
|
if (!e || !t) return;
|
|
2387
2406
|
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);
|
|
2388
|
-
me.value = Math.round(a > 0 ? a :
|
|
2407
|
+
me.value = Math.round(a > 0 ? a : I.layout.value === "classic" ? je() : Math.max(360, U.value.length * 120)), he.value = {
|
|
2389
2408
|
left: `${Math.round(n.left - r.left + i)}px`,
|
|
2390
2409
|
top: "0px",
|
|
2391
2410
|
width: "1px",
|
|
@@ -2396,38 +2415,38 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2396
2415
|
G.value = !1;
|
|
2397
2416
|
}
|
|
2398
2417
|
function Le(e) {
|
|
2399
|
-
return
|
|
2418
|
+
return I.disabled.value ? !0 : !e || B.value.size === 0 ? !1 : !B.value.has(e.id);
|
|
2400
2419
|
}
|
|
2401
2420
|
function Re(e) {
|
|
2402
|
-
if (
|
|
2403
|
-
let t =
|
|
2404
|
-
if (
|
|
2421
|
+
if (I.disabled.value) return;
|
|
2422
|
+
let t = I.activeTab.value === e.id;
|
|
2423
|
+
if (I.activeTab.value = e.id, !I.minimized.value) {
|
|
2405
2424
|
Ie();
|
|
2406
2425
|
return;
|
|
2407
2426
|
}
|
|
2408
2427
|
Fe(), G.value = t ? !G.value : !0;
|
|
2409
2428
|
}
|
|
2410
2429
|
function ze() {
|
|
2411
|
-
|
|
2430
|
+
I.disabled.value || I.api.toggleSimplified();
|
|
2412
2431
|
}
|
|
2413
2432
|
function Be() {
|
|
2414
|
-
|
|
2433
|
+
I.disabled.value || (I.minimized.value || Ie(), I.minimized.value = !I.minimized.value);
|
|
2415
2434
|
}
|
|
2416
2435
|
function Ve(e) {
|
|
2417
|
-
|
|
2436
|
+
I.disabled.value || (Ie(), F("fileMenuSelect", e));
|
|
2418
2437
|
}
|
|
2419
2438
|
function He() {
|
|
2420
|
-
|
|
2439
|
+
I.disabled.value || (Ie(), I.backdropOpen.value = !0);
|
|
2421
2440
|
}
|
|
2422
2441
|
function Ue() {
|
|
2423
|
-
|
|
2442
|
+
I.disabled.value || (I.backdropOpen.value = !1);
|
|
2424
2443
|
}
|
|
2425
2444
|
function We(e, t) {
|
|
2426
|
-
|
|
2427
|
-
tabId:
|
|
2445
|
+
V.value || (F("itemClick", {
|
|
2446
|
+
tabId: I.activeTab.value,
|
|
2428
2447
|
groupId: e,
|
|
2429
2448
|
itemId: t
|
|
2430
|
-
}),
|
|
2449
|
+
}), I.minimized.value && Ie());
|
|
2431
2450
|
}
|
|
2432
2451
|
function Ge(e) {
|
|
2433
2452
|
if (!(e instanceof HTMLElement)) return !1;
|
|
@@ -2436,13 +2455,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2436
2455
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
2437
2456
|
}
|
|
2438
2457
|
function Ke() {
|
|
2439
|
-
if (
|
|
2440
|
-
|
|
2458
|
+
if (V.value) {
|
|
2459
|
+
I.keyTips.value = [];
|
|
2441
2460
|
return;
|
|
2442
2461
|
}
|
|
2443
|
-
let e =
|
|
2462
|
+
let e = R.value;
|
|
2444
2463
|
if (!e?.groups?.length) {
|
|
2445
|
-
|
|
2464
|
+
I.keyTips.value = [];
|
|
2446
2465
|
return;
|
|
2447
2466
|
}
|
|
2448
2467
|
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) => {
|
|
@@ -2455,85 +2474,85 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2455
2474
|
scope: "item"
|
|
2456
2475
|
} : null;
|
|
2457
2476
|
}).filter((e) => !!e)));
|
|
2458
|
-
|
|
2477
|
+
I.keyTips.value = t;
|
|
2459
2478
|
}
|
|
2460
2479
|
function qe(e) {
|
|
2461
|
-
if (
|
|
2462
|
-
let t =
|
|
2480
|
+
if (I.disabled.value) return;
|
|
2481
|
+
let t = R.value;
|
|
2463
2482
|
if (t?.groups?.length) {
|
|
2464
2483
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
2465
2484
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
2466
2485
|
if (r) {
|
|
2467
|
-
We(n.id, r.id),
|
|
2486
|
+
We(n.id, r.id), I.keyTipsOpen.value = !1, I.keyTipsSequence.value = "";
|
|
2468
2487
|
return;
|
|
2469
2488
|
}
|
|
2470
2489
|
}
|
|
2471
2490
|
}
|
|
2472
2491
|
}
|
|
2473
2492
|
function Je() {
|
|
2474
|
-
|
|
2493
|
+
I.keyTipsSequence.value = "";
|
|
2475
2494
|
}
|
|
2476
2495
|
function Ye(e) {
|
|
2477
|
-
if (!
|
|
2496
|
+
if (!I.disabled.value && !Ge(e.target)) {
|
|
2478
2497
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
2479
|
-
e.preventDefault(),
|
|
2498
|
+
e.preventDefault(), I.keyTipsOpen.value = !I.keyTipsOpen.value, I.keyTipsOpen.value || Je();
|
|
2480
2499
|
return;
|
|
2481
2500
|
}
|
|
2482
|
-
if (
|
|
2501
|
+
if (I.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
2483
2502
|
if (e.key === "Escape") {
|
|
2484
|
-
e.preventDefault(),
|
|
2503
|
+
e.preventDefault(), I.keyTipsOpen.value = !1, Je();
|
|
2485
2504
|
return;
|
|
2486
2505
|
}
|
|
2487
2506
|
if (e.key === "Backspace") {
|
|
2488
|
-
e.preventDefault(),
|
|
2507
|
+
e.preventDefault(), I.keyTipsSequence.value = I.keyTipsSequence.value.slice(0, -1);
|
|
2489
2508
|
return;
|
|
2490
2509
|
}
|
|
2491
2510
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
2492
2511
|
e.preventDefault();
|
|
2493
|
-
let t = `${
|
|
2494
|
-
|
|
2495
|
-
let n = t.toLowerCase(), r =
|
|
2512
|
+
let t = `${I.keyTipsSequence.value}${e.key.toUpperCase()}`;
|
|
2513
|
+
I.keyTipsSequence.value = t;
|
|
2514
|
+
let n = t.toLowerCase(), r = I.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
2496
2515
|
if (r) {
|
|
2497
2516
|
qe(r);
|
|
2498
2517
|
return;
|
|
2499
2518
|
}
|
|
2500
|
-
|
|
2519
|
+
I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Je();
|
|
2501
2520
|
}
|
|
2502
2521
|
}
|
|
2503
2522
|
}
|
|
2504
2523
|
}
|
|
2505
2524
|
function Xe(e) {
|
|
2506
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
2525
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? ue : null;
|
|
2507
2526
|
}
|
|
2508
2527
|
function Ze(e) {
|
|
2509
2528
|
G.value = e;
|
|
2510
2529
|
}
|
|
2511
2530
|
D([
|
|
2512
|
-
|
|
2513
|
-
() =>
|
|
2514
|
-
() =>
|
|
2531
|
+
U,
|
|
2532
|
+
() => I.layout.value,
|
|
2533
|
+
() => I.minimized.value
|
|
2515
2534
|
], () => {
|
|
2516
2535
|
Pe();
|
|
2517
2536
|
}), D([
|
|
2518
|
-
|
|
2519
|
-
() =>
|
|
2520
|
-
() =>
|
|
2537
|
+
R,
|
|
2538
|
+
() => I.tabs.value,
|
|
2539
|
+
() => I.disabled.value
|
|
2521
2540
|
], () => {
|
|
2522
2541
|
Ke(), Je();
|
|
2523
2542
|
}, {
|
|
2524
2543
|
deep: !0,
|
|
2525
2544
|
immediate: !0
|
|
2526
|
-
}), D(() =>
|
|
2545
|
+
}), D(() => I.keyTipsOpen.value, (e) => {
|
|
2527
2546
|
e || Je();
|
|
2528
|
-
}), D(() =>
|
|
2529
|
-
e && (
|
|
2547
|
+
}), D(() => I.disabled.value, (e) => {
|
|
2548
|
+
e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1, Ie(), Je());
|
|
2530
2549
|
}), D([
|
|
2531
|
-
() =>
|
|
2532
|
-
() =>
|
|
2533
|
-
|
|
2550
|
+
() => I.minimized.value,
|
|
2551
|
+
() => I.layout.value,
|
|
2552
|
+
R
|
|
2534
2553
|
], ([e, , t]) => {
|
|
2535
2554
|
(!e || !t) && Ie();
|
|
2536
|
-
}), D([
|
|
2555
|
+
}), D([fe, W], ([e, t], [n, r]) => {
|
|
2537
2556
|
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) && Pe();
|
|
2538
2557
|
}, { flush: "post" }), D(G, (e) => {
|
|
2539
2558
|
e && p(() => {
|
|
@@ -2544,40 +2563,40 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2544
2563
|
g(() => {
|
|
2545
2564
|
window.addEventListener("keydown", Ye), window.addEventListener("resize", Qe), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
2546
2565
|
Fe(), Pe();
|
|
2547
|
-
}),
|
|
2566
|
+
}), fe.value && $.observe(fe.value), W.value && $.observe(W.value)), Fe(), Pe();
|
|
2548
2567
|
}), _(() => {
|
|
2549
2568
|
window.removeEventListener("keydown", Ye), window.removeEventListener("resize", Qe), $?.disconnect();
|
|
2550
2569
|
});
|
|
2551
2570
|
function Qe() {
|
|
2552
2571
|
G.value && Fe();
|
|
2553
2572
|
}
|
|
2554
|
-
return l(
|
|
2573
|
+
return l(I.api), (t, l) => (v(), n(E(ne), { size: P.size }, {
|
|
2555
2574
|
default: O(() => [(v(), i("section", {
|
|
2556
2575
|
ref_key: "ribbonRootRef",
|
|
2557
|
-
ref:
|
|
2558
|
-
key: E(
|
|
2576
|
+
ref: se,
|
|
2577
|
+
key: E(I).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
2559
2578
|
class: m(["ml-ribbon", [
|
|
2560
|
-
`ml-ribbon--${E(
|
|
2561
|
-
`ml-ribbon--size-${
|
|
2579
|
+
`ml-ribbon--${E(I).layout.value}`,
|
|
2580
|
+
`ml-ribbon--size-${J.value}`,
|
|
2562
2581
|
{
|
|
2563
|
-
"ml-ribbon--disabled": E(
|
|
2564
|
-
"ml-ribbon--minimized": E(
|
|
2565
|
-
"ml-ribbon--keytips-open": E(
|
|
2582
|
+
"ml-ribbon--disabled": E(I).disabled.value,
|
|
2583
|
+
"ml-ribbon--minimized": E(I).minimized.value,
|
|
2584
|
+
"ml-ribbon--keytips-open": E(I).keyTipsOpen.value
|
|
2566
2585
|
}
|
|
2567
2586
|
]]),
|
|
2568
|
-
inert: E(
|
|
2569
|
-
"aria-disabled": E(
|
|
2587
|
+
inert: E(I).disabled.value,
|
|
2588
|
+
"aria-disabled": E(I).disabled.value
|
|
2570
2589
|
}, [
|
|
2571
2590
|
a("header", {
|
|
2572
2591
|
ref_key: "ribbonHeaderRef",
|
|
2573
|
-
ref:
|
|
2592
|
+
ref: le,
|
|
2574
2593
|
class: "ml-ribbon__header"
|
|
2575
2594
|
}, [
|
|
2576
2595
|
a("div", Xt, [
|
|
2577
2596
|
s.showFileMenu ? (v(), n(De, {
|
|
2578
2597
|
key: 0,
|
|
2579
2598
|
items: s.fileMenuItems,
|
|
2580
|
-
disabled: E(
|
|
2599
|
+
disabled: E(I).disabled.value,
|
|
2581
2600
|
label: Y.value.fileMenuLabel,
|
|
2582
2601
|
"open-backstage-label": Y.value.fileMenuOpenBackstageLabel,
|
|
2583
2602
|
"show-open-backstage": s.showOpenBackstage,
|
|
@@ -2591,9 +2610,9 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2591
2610
|
"show-open-backstage"
|
|
2592
2611
|
])) : r("", !0),
|
|
2593
2612
|
c(Te, {
|
|
2594
|
-
tabs: E(
|
|
2595
|
-
"active-tab": E(
|
|
2596
|
-
disabled: E(
|
|
2613
|
+
tabs: E(re),
|
|
2614
|
+
"active-tab": E(I).activeTab.value,
|
|
2615
|
+
disabled: E(I).disabled.value,
|
|
2597
2616
|
"default-contextual-title": Y.value.contextualTabDefaultTitle,
|
|
2598
2617
|
onSelect: Re
|
|
2599
2618
|
}, null, 8, [
|
|
@@ -2602,20 +2621,20 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2602
2621
|
"disabled",
|
|
2603
2622
|
"default-contextual-title"
|
|
2604
2623
|
]),
|
|
2605
|
-
|
|
2624
|
+
P.hideMinimizeButton ? r("", !0) : (v(), n(E(ie), {
|
|
2606
2625
|
key: 1,
|
|
2607
2626
|
content: Y.value.minimizeTooltip,
|
|
2608
|
-
"show-after":
|
|
2609
|
-
"hide-after":
|
|
2627
|
+
"show-after": X.value,
|
|
2628
|
+
"hide-after": Z.value
|
|
2610
2629
|
}, {
|
|
2611
|
-
default: O(() => [c(E(
|
|
2630
|
+
default: O(() => [c(E(A), {
|
|
2612
2631
|
class: m([
|
|
2613
2632
|
"ml-ribbon__control",
|
|
2614
2633
|
"ml-ribbon__control--minimize",
|
|
2615
|
-
E(
|
|
2634
|
+
E(I).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
2616
2635
|
]),
|
|
2617
|
-
icon:
|
|
2618
|
-
disabled: E(
|
|
2636
|
+
icon: Q.value,
|
|
2637
|
+
disabled: E(I).disabled.value,
|
|
2619
2638
|
onClick: Be
|
|
2620
2639
|
}, null, 8, [
|
|
2621
2640
|
"class",
|
|
@@ -2630,17 +2649,17 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2630
2649
|
]))
|
|
2631
2650
|
]),
|
|
2632
2651
|
a("div", Zt, [
|
|
2633
|
-
|
|
2652
|
+
P.hideLayoutSwitcher ? r("", !0) : (v(), n(E(ie), {
|
|
2634
2653
|
key: 0,
|
|
2635
2654
|
content: Y.value.layoutSwitcherTooltip,
|
|
2636
|
-
"show-after":
|
|
2637
|
-
"hide-after":
|
|
2655
|
+
"show-after": X.value,
|
|
2656
|
+
"hide-after": Z.value
|
|
2638
2657
|
}, {
|
|
2639
|
-
default: O(() => [c(E(
|
|
2658
|
+
default: O(() => [c(E(A), {
|
|
2640
2659
|
circle: "",
|
|
2641
2660
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
2642
|
-
icon: E(
|
|
2643
|
-
disabled: E(
|
|
2661
|
+
icon: E(de),
|
|
2662
|
+
disabled: E(I).disabled.value,
|
|
2644
2663
|
onClick: ze
|
|
2645
2664
|
}, null, 8, ["icon", "disabled"])]),
|
|
2646
2665
|
_: 1
|
|
@@ -2649,15 +2668,15 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2649
2668
|
"show-after",
|
|
2650
2669
|
"hide-after"
|
|
2651
2670
|
])),
|
|
2652
|
-
|
|
2671
|
+
P.hideKeyTipsToggle ? r("", !0) : (v(), n(E(H), {
|
|
2653
2672
|
key: 1,
|
|
2654
2673
|
"inline-prompt": "",
|
|
2655
2674
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
2656
2675
|
"active-text": Y.value.keyTipsToggleText,
|
|
2657
2676
|
"inactive-text": Y.value.keyTipsToggleText,
|
|
2658
|
-
"model-value": E(
|
|
2659
|
-
disabled: E(
|
|
2660
|
-
onChange: l[0] ||= (e) => E(
|
|
2677
|
+
"model-value": E(I).keyTipsOpen.value,
|
|
2678
|
+
disabled: E(I).disabled.value,
|
|
2679
|
+
onChange: l[0] ||= (e) => E(I).keyTipsOpen.value = !E(I).keyTipsOpen.value
|
|
2661
2680
|
}, null, 8, [
|
|
2662
2681
|
"active-text",
|
|
2663
2682
|
"inactive-text",
|
|
@@ -2665,21 +2684,21 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2665
2684
|
"disabled"
|
|
2666
2685
|
])),
|
|
2667
2686
|
t.$slots["tabs-extra"] ? (v(), i("div", Qt, [S(t.$slots, "tabs-extra", {
|
|
2668
|
-
activeTab: E(
|
|
2669
|
-
layout: E(
|
|
2670
|
-
minimized: E(
|
|
2671
|
-
disabled: E(
|
|
2687
|
+
activeTab: E(I).activeTab.value,
|
|
2688
|
+
layout: E(I).layout.value,
|
|
2689
|
+
minimized: E(I).minimized.value,
|
|
2690
|
+
disabled: E(I).disabled.value
|
|
2672
2691
|
})])) : r("", !0)
|
|
2673
2692
|
]),
|
|
2674
|
-
|
|
2693
|
+
R.value ? (v(), n(E(z), {
|
|
2675
2694
|
key: 0,
|
|
2676
2695
|
placement: "bottom-start",
|
|
2677
2696
|
visible: G.value,
|
|
2678
2697
|
width: me.value || void 0,
|
|
2679
|
-
disabled: E(
|
|
2698
|
+
disabled: E(I).disabled.value || !E(I).minimized.value,
|
|
2680
2699
|
"show-arrow": !1,
|
|
2681
2700
|
offset: 0,
|
|
2682
|
-
"popper-class":
|
|
2701
|
+
"popper-class": be.value,
|
|
2683
2702
|
"onUpdate:visible": Ze
|
|
2684
2703
|
}, {
|
|
2685
2704
|
reference: O(() => [a("span", {
|
|
@@ -2687,12 +2706,12 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2687
2706
|
class: "ml-ribbon__minimized-anchor",
|
|
2688
2707
|
style: h(he.value)
|
|
2689
2708
|
}, null, 4)]),
|
|
2690
|
-
default: O(() => [E(
|
|
2709
|
+
default: O(() => [E(I).layout.value === "classic" ? (v(), i("main", {
|
|
2691
2710
|
key: 0,
|
|
2692
2711
|
ref_key: "minimizedClassicPanelRef",
|
|
2693
2712
|
ref: W,
|
|
2694
2713
|
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
2695
|
-
"data-active-tab":
|
|
2714
|
+
"data-active-tab": R.value.id
|
|
2696
2715
|
}, [(v(!0), i(e, null, x(Se.value, (e) => (v(), n(Jt, {
|
|
2697
2716
|
id: e.id,
|
|
2698
2717
|
key: e.id,
|
|
@@ -2708,13 +2727,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2708
2727
|
"group-model": e,
|
|
2709
2728
|
"overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
|
|
2710
2729
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2711
|
-
disabled:
|
|
2730
|
+
disabled: V.value,
|
|
2712
2731
|
onItemClick: l[2] ||= (e) => We(e.groupId, e.itemId)
|
|
2713
2732
|
}, {
|
|
2714
2733
|
default: O(() => [c(zt, {
|
|
2715
2734
|
group: e,
|
|
2716
2735
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2717
|
-
disabled:
|
|
2736
|
+
disabled: V.value,
|
|
2718
2737
|
onItemClick: l[1] ||= (e) => We(e.groupId, e.itemId)
|
|
2719
2738
|
}, null, 8, [
|
|
2720
2739
|
"group",
|
|
@@ -2737,21 +2756,21 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2737
2756
|
"overflow-trigger-aria-label",
|
|
2738
2757
|
"gallery-preview-fallback",
|
|
2739
2758
|
"disabled"
|
|
2740
|
-
]))), 128)), Ce.value.length ? (v(), i("section", en, [a("div", tn, [c(E(
|
|
2759
|
+
]))), 128)), Ce.value.length ? (v(), i("section", en, [a("div", tn, [c(E(z), {
|
|
2741
2760
|
trigger: "click",
|
|
2742
2761
|
placement: "bottom-end",
|
|
2743
2762
|
width: we.value,
|
|
2744
|
-
disabled:
|
|
2763
|
+
disabled: V.value,
|
|
2745
2764
|
"show-arrow": !1,
|
|
2746
|
-
"popper-class":
|
|
2747
|
-
onShow: l[4] ||= (e) => E(
|
|
2748
|
-
onHide: l[5] ||= (e) => E(
|
|
2765
|
+
"popper-class": ye.value,
|
|
2766
|
+
onShow: l[4] ||= (e) => E(I).overflowOpen.value = !0,
|
|
2767
|
+
onHide: l[5] ||= (e) => E(I).overflowOpen.value = !1
|
|
2749
2768
|
}, {
|
|
2750
2769
|
reference: O(() => [a("button", {
|
|
2751
2770
|
type: "button",
|
|
2752
2771
|
class: "ml-ribbon-overflow-trigger",
|
|
2753
2772
|
"aria-label": Y.value.overflowTriggerAriaLabel,
|
|
2754
|
-
disabled:
|
|
2773
|
+
disabled: V.value
|
|
2755
2774
|
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, nn)]),
|
|
2756
2775
|
default: O(() => [a("div", rn, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), i("section", {
|
|
2757
2776
|
key: e.id,
|
|
@@ -2759,7 +2778,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2759
2778
|
}, [a("header", an, w(e.title), 1), c(zt, {
|
|
2760
2779
|
group: e,
|
|
2761
2780
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2762
|
-
disabled:
|
|
2781
|
+
disabled: V.value,
|
|
2763
2782
|
onItemClick: l[3] ||= (e) => We(e.groupId, e.itemId)
|
|
2764
2783
|
}, null, 8, [
|
|
2765
2784
|
"group",
|
|
@@ -2774,21 +2793,21 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2774
2793
|
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, $t)) : (v(), i("main", {
|
|
2775
2794
|
key: 1,
|
|
2776
2795
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
2777
|
-
"data-active-tab":
|
|
2778
|
-
}, [(v(!0), i(e, null, x(
|
|
2796
|
+
"data-active-tab": R.value.id
|
|
2797
|
+
}, [(v(!0), i(e, null, x(U.value, (e) => (v(), n(E(z), {
|
|
2779
2798
|
key: e.id,
|
|
2780
2799
|
trigger: "click",
|
|
2781
2800
|
placement: "bottom-start",
|
|
2782
2801
|
width: 340,
|
|
2783
|
-
disabled:
|
|
2802
|
+
disabled: V.value,
|
|
2784
2803
|
"show-arrow": !1,
|
|
2785
|
-
"popper-class":
|
|
2804
|
+
"popper-class": ve.value
|
|
2786
2805
|
}, {
|
|
2787
2806
|
reference: O(() => [a("button", {
|
|
2788
2807
|
class: "ml-ribbon-simplified-group",
|
|
2789
2808
|
type: "button",
|
|
2790
|
-
disabled:
|
|
2791
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2809
|
+
disabled: V.value
|
|
2810
|
+
}, [Xe(e) ? (v(), n(E(L), {
|
|
2792
2811
|
key: 0,
|
|
2793
2812
|
class: "ml-ribbon-simplified-group__icon"
|
|
2794
2813
|
}, {
|
|
@@ -2798,7 +2817,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2798
2817
|
default: O(() => [a("div", cn, [c(zt, {
|
|
2799
2818
|
group: Ee(e),
|
|
2800
2819
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2801
|
-
disabled:
|
|
2820
|
+
disabled: V.value,
|
|
2802
2821
|
onItemClick: l[6] ||= (e) => We(e.groupId, e.itemId)
|
|
2803
2822
|
}, null, 8, [
|
|
2804
2823
|
"group",
|
|
@@ -2815,12 +2834,12 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2815
2834
|
"popper-class"
|
|
2816
2835
|
])) : r("", !0)
|
|
2817
2836
|
], 512),
|
|
2818
|
-
!E(
|
|
2837
|
+
!E(I).minimized.value && R.value && E(I).layout.value === "classic" ? (v(), i("main", {
|
|
2819
2838
|
key: 0,
|
|
2820
2839
|
class: "ml-ribbon__panel",
|
|
2821
|
-
"data-active-tab":
|
|
2840
|
+
"data-active-tab": R.value.id,
|
|
2822
2841
|
ref_key: "classicPanelRef",
|
|
2823
|
-
ref:
|
|
2842
|
+
ref: fe
|
|
2824
2843
|
}, [(v(!0), i(e, null, x(Se.value, (e) => (v(), n(Jt, {
|
|
2825
2844
|
id: e.id,
|
|
2826
2845
|
key: e.id,
|
|
@@ -2836,13 +2855,13 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2836
2855
|
"group-model": e,
|
|
2837
2856
|
"overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
|
|
2838
2857
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2839
|
-
disabled:
|
|
2858
|
+
disabled: V.value,
|
|
2840
2859
|
onItemClick: l[8] ||= (e) => We(e.groupId, e.itemId)
|
|
2841
2860
|
}, {
|
|
2842
2861
|
default: O(() => [c(zt, {
|
|
2843
2862
|
group: e,
|
|
2844
2863
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2845
|
-
disabled:
|
|
2864
|
+
disabled: V.value,
|
|
2846
2865
|
onItemClick: l[7] ||= (e) => We(e.groupId, e.itemId)
|
|
2847
2866
|
}, null, 8, [
|
|
2848
2867
|
"group",
|
|
@@ -2865,20 +2884,20 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2865
2884
|
"overflow-trigger-aria-label",
|
|
2866
2885
|
"gallery-preview-fallback",
|
|
2867
2886
|
"disabled"
|
|
2868
|
-
]))), 128)), Ce.value.length ? (v(), i("section", un, [a("div", dn, [c(E(
|
|
2887
|
+
]))), 128)), Ce.value.length ? (v(), i("section", un, [a("div", dn, [c(E(z), {
|
|
2869
2888
|
trigger: "click",
|
|
2870
2889
|
placement: "bottom-end",
|
|
2871
2890
|
width: we.value,
|
|
2872
|
-
disabled:
|
|
2873
|
-
"popper-class":
|
|
2874
|
-
onShow: l[10] ||= (e) => E(
|
|
2875
|
-
onHide: l[11] ||= (e) => E(
|
|
2891
|
+
disabled: V.value,
|
|
2892
|
+
"popper-class": ye.value,
|
|
2893
|
+
onShow: l[10] ||= (e) => E(I).overflowOpen.value = !0,
|
|
2894
|
+
onHide: l[11] ||= (e) => E(I).overflowOpen.value = !1
|
|
2876
2895
|
}, {
|
|
2877
2896
|
reference: O(() => [a("button", {
|
|
2878
2897
|
type: "button",
|
|
2879
2898
|
class: "ml-ribbon-overflow-trigger",
|
|
2880
2899
|
"aria-label": Y.value.overflowTriggerAriaLabel,
|
|
2881
|
-
disabled:
|
|
2900
|
+
disabled: V.value
|
|
2882
2901
|
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, fn)]),
|
|
2883
2902
|
default: O(() => [a("div", pn, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), i("section", {
|
|
2884
2903
|
key: e.id,
|
|
@@ -2886,7 +2905,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2886
2905
|
}, [a("header", mn, w(e.title), 1), c(zt, {
|
|
2887
2906
|
group: e,
|
|
2888
2907
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2889
|
-
disabled:
|
|
2908
|
+
disabled: V.value,
|
|
2890
2909
|
onItemClick: l[9] ||= (e) => We(e.groupId, e.itemId)
|
|
2891
2910
|
}, null, 8, [
|
|
2892
2911
|
"group",
|
|
@@ -2899,23 +2918,23 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2899
2918
|
"disabled",
|
|
2900
2919
|
"popper-class"
|
|
2901
2920
|
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, ln)) : r("", !0),
|
|
2902
|
-
!E(
|
|
2921
|
+
!E(I).minimized.value && R.value && E(I).layout.value === "simplified" ? (v(), i("main", {
|
|
2903
2922
|
key: 1,
|
|
2904
2923
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
2905
|
-
"data-active-tab":
|
|
2906
|
-
}, [(v(!0), i(e, null, x(
|
|
2924
|
+
"data-active-tab": R.value.id
|
|
2925
|
+
}, [(v(!0), i(e, null, x(U.value, (e) => (v(), n(E(z), {
|
|
2907
2926
|
key: e.id,
|
|
2908
2927
|
trigger: "click",
|
|
2909
2928
|
placement: "bottom-start",
|
|
2910
2929
|
width: 340,
|
|
2911
|
-
disabled:
|
|
2912
|
-
"popper-class":
|
|
2930
|
+
disabled: V.value,
|
|
2931
|
+
"popper-class": ve.value
|
|
2913
2932
|
}, {
|
|
2914
2933
|
reference: O(() => [a("button", {
|
|
2915
2934
|
class: "ml-ribbon-simplified-group",
|
|
2916
2935
|
type: "button",
|
|
2917
|
-
disabled:
|
|
2918
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2936
|
+
disabled: V.value
|
|
2937
|
+
}, [Xe(e) ? (v(), n(E(L), {
|
|
2919
2938
|
key: 0,
|
|
2920
2939
|
class: "ml-ribbon-simplified-group__icon"
|
|
2921
2940
|
}, {
|
|
@@ -2925,7 +2944,7 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2925
2944
|
default: O(() => [a("div", _n, [c(zt, {
|
|
2926
2945
|
group: Ee(e),
|
|
2927
2946
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2928
|
-
disabled:
|
|
2947
|
+
disabled: V.value,
|
|
2929
2948
|
onItemClick: l[12] ||= (e) => We(e.groupId, e.itemId)
|
|
2930
2949
|
}, null, 8, [
|
|
2931
2950
|
"group",
|
|
@@ -2934,9 +2953,9 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2934
2953
|
])])]),
|
|
2935
2954
|
_: 2
|
|
2936
2955
|
}, 1032, ["disabled", "popper-class"]))), 128))], 8, hn)) : r("", !0),
|
|
2937
|
-
c(
|
|
2938
|
-
open: E(
|
|
2939
|
-
size:
|
|
2956
|
+
c(xe, {
|
|
2957
|
+
open: E(I).backdropOpen.value,
|
|
2958
|
+
size: J.value,
|
|
2940
2959
|
"back-label": Y.value.backstageBackLabel,
|
|
2941
2960
|
title: Y.value.backstageTitle,
|
|
2942
2961
|
description: Y.value.backstageDescription,
|
|
@@ -2945,12 +2964,12 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
2945
2964
|
name: "default",
|
|
2946
2965
|
fn: O(() => [S(t.$slots, "backstage", {
|
|
2947
2966
|
close: Ue,
|
|
2948
|
-
open: E(
|
|
2949
|
-
size:
|
|
2967
|
+
open: E(I).backdropOpen.value,
|
|
2968
|
+
size: J.value,
|
|
2950
2969
|
backLabel: Y.value.backstageBackLabel,
|
|
2951
2970
|
title: Y.value.backstageTitle,
|
|
2952
2971
|
description: Y.value.backstageDescription,
|
|
2953
|
-
disabled: E(
|
|
2972
|
+
disabled: E(I).disabled.value
|
|
2954
2973
|
})]),
|
|
2955
2974
|
key: "0"
|
|
2956
2975
|
} : void 0]), 1032, [
|
|
@@ -3026,4 +3045,4 @@ var ye = { class: "ml-ribbon-backstage__nav" }, be = { class: "ml-ribbon-backsta
|
|
|
3026
3045
|
}
|
|
3027
3046
|
});
|
|
3028
3047
|
//#endregion
|
|
3029
|
-
export { yn as MlRibbon,
|
|
3048
|
+
export { yn as MlRibbon, xe 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, Q as MlRibbonTabs, Ft as MlRibbonTemplateItem, Nt as MlRibbonToggleButton };
|