@kong-ui-public/page-layout 1.2.3-pr.3950.8bbf2948c.0 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/page-layout.es.js +305 -510
- package/dist/page-layout.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/PageLayout.vue.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/page-layout.d.ts +1 -6
- package/dist/types/types/page-layout.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/components/PageLayoutAnchorNavigation.vue.d.ts +0 -5
- package/dist/types/components/PageLayoutAnchorNavigation.vue.d.ts.map +0 -1
- package/dist/types/types/page-layout-anchor-navigation.d.ts +0 -28
- package/dist/types/types/page-layout-anchor-navigation.d.ts.map +0 -1
package/dist/page-layout.es.js
CHANGED
|
@@ -1,242 +1,241 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import { ChevronDownIcon as
|
|
5
|
-
const
|
|
6
|
-
back_button:
|
|
7
|
-
favorite_button:
|
|
8
|
-
tabs:
|
|
9
|
-
anchor_navigation: et
|
|
1
|
+
import { shallowRef as et, shallowReadonly as dt, getCurrentScope as vt, onScopeDispose as ft, toValue as F, watch as G, computed as k, getCurrentInstance as bt, onMounted as at, defineComponent as Z, inject as z, useTemplateRef as H, ref as E, onBeforeUnmount as pt, resolveComponent as I, openBlock as i, createElementBlock as c, createElementVNode as f, normalizeClass as L, Fragment as N, renderList as R, createBlock as _, resolveDynamicComponent as x, mergeProps as ot, withKeys as nt, withModifiers as W, withCtx as $, renderSlot as h, createTextVNode as A, toDisplayString as P, createVNode as D, unref as v, createCommentVNode as y, nextTick as Q, provide as yt, onUnmounted as ht, createSlots as M, normalizeProps as gt, guardReactiveProps as mt } from "vue";
|
|
2
|
+
import { useRouter as st, useRoute as kt } from "vue-router";
|
|
3
|
+
import { createI18n as $t, i18nTComponent as wt } from "@kong-ui-public/i18n";
|
|
4
|
+
import { ChevronDownIcon as Tt, ChevronRightIcon as _t, ArrowTopLeftIcon as Ct, StarFillIcon as It, StarIcon as St, InfoIcon as Pt } from "@kong/icons";
|
|
5
|
+
const Kt = "Go back", Dt = { save_shortcut: "Save page to shortcuts", remove_shortcut: "Remove page from shortcuts" }, Bt = { more_button: { label: "More", aria_label: "More tabs" } }, Rt = {
|
|
6
|
+
back_button: Kt,
|
|
7
|
+
favorite_button: Dt,
|
|
8
|
+
tabs: Bt
|
|
10
9
|
};
|
|
11
|
-
function
|
|
12
|
-
const
|
|
10
|
+
function zt() {
|
|
11
|
+
const t = $t("en-us", Rt);
|
|
13
12
|
return {
|
|
14
|
-
i18n:
|
|
15
|
-
i18nT:
|
|
13
|
+
i18n: t,
|
|
14
|
+
i18nT: wt(t)
|
|
16
15
|
// Translation component <i18n-t>
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
|
-
const
|
|
20
|
-
useI18n:
|
|
21
|
-
},
|
|
22
|
-
function
|
|
23
|
-
return
|
|
18
|
+
const it = {
|
|
19
|
+
useI18n: zt
|
|
20
|
+
}, Et = "12px", U = "16px", Lt = "16px";
|
|
21
|
+
function Nt(t, s) {
|
|
22
|
+
return vt() ? (ft(t, s), !0) : !1;
|
|
24
23
|
}
|
|
25
|
-
const
|
|
24
|
+
const At = typeof window < "u" && typeof document < "u";
|
|
26
25
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
27
|
-
const
|
|
26
|
+
const B = () => {
|
|
28
27
|
};
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
return new Promise((
|
|
32
|
-
Promise.resolve(
|
|
33
|
-
fn:
|
|
28
|
+
function Ft(t, s) {
|
|
29
|
+
function e(...a) {
|
|
30
|
+
return new Promise((l, r) => {
|
|
31
|
+
Promise.resolve(t(() => s.apply(this, a), {
|
|
32
|
+
fn: s,
|
|
34
33
|
thisArg: this,
|
|
35
|
-
args:
|
|
36
|
-
})).then(
|
|
34
|
+
args: a
|
|
35
|
+
})).then(l).catch(r);
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
|
-
return "cancel" in
|
|
40
|
-
cancel:
|
|
41
|
-
flush:
|
|
42
|
-
isPending:
|
|
43
|
-
}),
|
|
38
|
+
return "cancel" in t && Object.assign(e, {
|
|
39
|
+
cancel: t.cancel,
|
|
40
|
+
flush: t.flush,
|
|
41
|
+
isPending: t.isPending
|
|
42
|
+
}), e;
|
|
44
43
|
}
|
|
45
|
-
function
|
|
46
|
-
let
|
|
47
|
-
const
|
|
48
|
-
clearTimeout(
|
|
44
|
+
function Ot(t, s = {}) {
|
|
45
|
+
let e, a, l = B, r = B;
|
|
46
|
+
const u = et(!1), o = (d) => {
|
|
47
|
+
clearTimeout(d), l(), l = B;
|
|
49
48
|
};
|
|
50
|
-
let
|
|
51
|
-
return Object.assign((
|
|
52
|
-
const
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
},
|
|
49
|
+
let p;
|
|
50
|
+
return Object.assign((d) => {
|
|
51
|
+
const g = F(t), m = F(s.maxWait);
|
|
52
|
+
return e && o(e), g <= 0 || m !== void 0 && m <= 0 ? (a && (o(a), a = void 0), u.value = !1, Promise.resolve(d())) : (u.value = !0, new Promise((w, b) => {
|
|
53
|
+
l = s.rejectOnCancel ? b : w, r = w, p = d, m && !a && (a = setTimeout(() => {
|
|
54
|
+
e && o(e), a = void 0, u.value = !1, w(p());
|
|
55
|
+
}, m)), e = setTimeout(() => {
|
|
56
|
+
a && o(a), a = void 0, u.value = !1, w(d());
|
|
57
|
+
}, g);
|
|
59
58
|
}));
|
|
60
59
|
}, {
|
|
61
60
|
cancel: () => {
|
|
62
|
-
|
|
61
|
+
e && (o(e), e = void 0), a && (o(a), a = void 0), u.value = !1, r = B;
|
|
63
62
|
},
|
|
64
63
|
flush: () => {
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
64
|
+
if (u.value) {
|
|
65
|
+
e && (clearTimeout(e), e = void 0), a && (clearTimeout(a), a = void 0), u.value = !1;
|
|
66
|
+
const d = r;
|
|
67
|
+
l = B, r = B, d(p());
|
|
69
68
|
}
|
|
70
69
|
},
|
|
71
|
-
isPending:
|
|
70
|
+
isPending: dt(u)
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
|
-
function
|
|
75
|
-
return
|
|
73
|
+
function Vt(t, s = 200, e = {}) {
|
|
74
|
+
return Ft(Ot(s, e), t);
|
|
76
75
|
}
|
|
77
|
-
const
|
|
78
|
-
function
|
|
79
|
-
var
|
|
80
|
-
const
|
|
81
|
-
return (
|
|
76
|
+
const Wt = At ? window : void 0;
|
|
77
|
+
function X(t) {
|
|
78
|
+
var s;
|
|
79
|
+
const e = F(t);
|
|
80
|
+
return (s = e?.$el) !== null && s !== void 0 ? s : e;
|
|
82
81
|
}
|
|
83
82
|
// @__NO_SIDE_EFFECTS__
|
|
84
|
-
function
|
|
85
|
-
const
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
},
|
|
83
|
+
function jt() {
|
|
84
|
+
const t = et(!1), s = bt();
|
|
85
|
+
return s && at(() => {
|
|
86
|
+
t.value = !0;
|
|
87
|
+
}, s), t;
|
|
89
88
|
}
|
|
90
89
|
// @__NO_SIDE_EFFECTS__
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
return
|
|
90
|
+
function xt(t) {
|
|
91
|
+
const s = /* @__PURE__ */ jt();
|
|
92
|
+
return k(() => (s.value, !!t()));
|
|
94
93
|
}
|
|
95
|
-
function
|
|
96
|
-
const { window:
|
|
97
|
-
let
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
const
|
|
102
|
-
return Array.isArray(
|
|
103
|
-
}), (
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
for (const
|
|
94
|
+
function Mt(t, s, e = {}) {
|
|
95
|
+
const { window: a = Wt, ...l } = e;
|
|
96
|
+
let r;
|
|
97
|
+
const u = /* @__PURE__ */ xt(() => a && "ResizeObserver" in a), o = () => {
|
|
98
|
+
r && (r.disconnect(), r = void 0);
|
|
99
|
+
}, p = G(k(() => {
|
|
100
|
+
const d = F(t);
|
|
101
|
+
return Array.isArray(d) ? d.map((g) => X(g)) : [X(d)];
|
|
102
|
+
}), (d) => {
|
|
103
|
+
if (o(), u.value && a) {
|
|
104
|
+
r = new ResizeObserver(s);
|
|
105
|
+
for (const g of d) g && r.observe(g, l);
|
|
107
106
|
}
|
|
108
107
|
}, {
|
|
109
108
|
immediate: !0,
|
|
110
109
|
flush: "post"
|
|
111
|
-
}),
|
|
112
|
-
|
|
110
|
+
}), T = () => {
|
|
111
|
+
o(), p();
|
|
113
112
|
};
|
|
114
|
-
return
|
|
115
|
-
isSupported:
|
|
116
|
-
stop:
|
|
113
|
+
return Nt(T), {
|
|
114
|
+
isSupported: u,
|
|
115
|
+
stop: T
|
|
117
116
|
};
|
|
118
117
|
}
|
|
119
|
-
const
|
|
118
|
+
const Ut = {
|
|
120
119
|
ref: "page-layout-tabs",
|
|
121
120
|
class: "page-layout-tabs",
|
|
122
121
|
"data-testid": "page-layout-tabs"
|
|
123
|
-
},
|
|
122
|
+
}, Gt = { key: 0 }, Zt = ["aria-label"], Jt = {
|
|
124
123
|
key: 0,
|
|
125
124
|
class: "layout-loader-container"
|
|
126
|
-
},
|
|
125
|
+
}, Yt = /* @__PURE__ */ Z({
|
|
127
126
|
__name: "PageLayoutTabs",
|
|
128
127
|
props: {
|
|
129
128
|
tabs: { default: () => [] }
|
|
130
129
|
},
|
|
131
|
-
setup(
|
|
132
|
-
const { i18n: { t:
|
|
133
|
-
if (typeof
|
|
134
|
-
|
|
130
|
+
setup(t) {
|
|
131
|
+
const { i18n: { t: s } } = it.useI18n(), e = st(), a = z("app:navigateTo", null), l = (b) => {
|
|
132
|
+
if (typeof b.to != "string") {
|
|
133
|
+
e.push(b.to);
|
|
135
134
|
return;
|
|
136
135
|
}
|
|
137
|
-
if (typeof
|
|
138
|
-
window.location.href =
|
|
136
|
+
if (typeof a != "function") {
|
|
137
|
+
window.location.href = b.to;
|
|
139
138
|
return;
|
|
140
139
|
}
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
if (!
|
|
140
|
+
a(b.to);
|
|
141
|
+
}, r = H("page-layout-tabs"), u = H("page-layout-tabs-list"), o = E(t.tabs.length), p = E(!1), T = k(() => t.tabs.slice(0, o.value)), d = k(() => t.tabs.slice(o.value)), g = async () => {
|
|
142
|
+
if (!r.value || !u.value)
|
|
144
143
|
return;
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
let
|
|
148
|
-
if (!
|
|
149
|
-
|
|
144
|
+
p.value = !1, o.value = t.tabs.length, await Q();
|
|
145
|
+
const b = r.value?.getBoundingClientRect().width - parseInt(Lt) * 2;
|
|
146
|
+
let S = u.value?.getBoundingClientRect().width;
|
|
147
|
+
if (!b || !S) {
|
|
148
|
+
p.value = !0;
|
|
150
149
|
return;
|
|
151
150
|
}
|
|
152
|
-
const
|
|
153
|
-
for (;
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
const K = 50;
|
|
152
|
+
for (; S + K > b && o.value > 1; )
|
|
153
|
+
o.value--, await Q(), S = u.value?.getBoundingClientRect().width || 0;
|
|
154
|
+
p.value = !0;
|
|
156
155
|
};
|
|
157
|
-
let
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
let m = null;
|
|
157
|
+
const w = () => {
|
|
158
|
+
m && clearTimeout(m), m = setTimeout(() => {
|
|
159
|
+
g();
|
|
161
160
|
}, 150);
|
|
162
161
|
};
|
|
163
|
-
return
|
|
164
|
-
|
|
165
|
-
}),
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
|
|
169
|
-
}, { deep: !0 }), (
|
|
170
|
-
const
|
|
171
|
-
return
|
|
172
|
-
|
|
162
|
+
return at(() => {
|
|
163
|
+
g(), Mt(r, w);
|
|
164
|
+
}), pt(() => {
|
|
165
|
+
m && clearTimeout(m);
|
|
166
|
+
}), G(() => t.tabs, () => {
|
|
167
|
+
g();
|
|
168
|
+
}, { deep: !0 }), (b, S) => {
|
|
169
|
+
const K = I("KDropdownItem"), O = I("KDropdown"), V = I("KSkeletonBox");
|
|
170
|
+
return i(), c("nav", Ut, [
|
|
171
|
+
f("ul", {
|
|
173
172
|
ref: "page-layout-tabs-list",
|
|
174
|
-
class:
|
|
173
|
+
class: L({ "layout-computing": !p.value })
|
|
175
174
|
}, [
|
|
176
|
-
(
|
|
177
|
-
key: `${
|
|
175
|
+
(i(!0), c(N, null, R(T.value, (n) => (i(), c("li", {
|
|
176
|
+
key: `${n.key}-tab`
|
|
178
177
|
}, [
|
|
179
|
-
(
|
|
180
|
-
"aria-current":
|
|
181
|
-
class: ["tab-link", { active:
|
|
182
|
-
"data-testid":
|
|
178
|
+
(i(), _(x(typeof n.to == "string" ? "a" : "router-link"), ot({ ref_for: !0 }, typeof n.to == "string" ? { href: n.to } : { to: n.to }, {
|
|
179
|
+
"aria-current": n.active ? "page" : void 0,
|
|
180
|
+
class: ["tab-link", { active: n.active }],
|
|
181
|
+
"data-testid": n.dataTestId ? n.dataTestId : `page-layout-tab-${n.key}`,
|
|
183
182
|
tabindex: "0",
|
|
184
|
-
onClick:
|
|
185
|
-
onKeydown:
|
|
183
|
+
onClick: W((j) => l(n), ["prevent"]),
|
|
184
|
+
onKeydown: nt(W((j) => l(n), ["prevent"]), ["enter"])
|
|
186
185
|
}), {
|
|
187
|
-
default:
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
default: $(() => [
|
|
187
|
+
h(b.$slots, `tab-${n.key}`, { tab: n }, () => [
|
|
188
|
+
A(P(n.label), 1)
|
|
190
189
|
], !0)
|
|
191
190
|
]),
|
|
192
191
|
_: 2
|
|
193
192
|
}, 1040, ["aria-current", "class", "data-testid", "onClick", "onKeydown"]))
|
|
194
193
|
]))), 128)),
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
t.tabs.length > o.value ? (i(), c("li", Gt, [
|
|
195
|
+
D(O, { "kpop-attributes": {
|
|
197
196
|
placement: "bottom-end",
|
|
198
197
|
popoverElementAttributes: { "data-testid": "tabs-overflow-dropdown-popover" }
|
|
199
198
|
} }, {
|
|
200
|
-
items:
|
|
201
|
-
(
|
|
202
|
-
key: `${
|
|
203
|
-
"aria-current":
|
|
204
|
-
"data-testid":
|
|
199
|
+
items: $(() => [
|
|
200
|
+
(i(!0), c(N, null, R(d.value, (n) => (i(), _(K, {
|
|
201
|
+
key: `${n.key}-dropdown-item`,
|
|
202
|
+
"aria-current": n.active ? "page" : void 0,
|
|
203
|
+
"data-testid": n.dataTestId ? n.dataTestId : `page-layout-tab-${n.key}`,
|
|
205
204
|
item: {
|
|
206
|
-
label:
|
|
207
|
-
value:
|
|
208
|
-
to:
|
|
205
|
+
label: n.label,
|
|
206
|
+
value: n.key,
|
|
207
|
+
to: n.to
|
|
209
208
|
},
|
|
210
|
-
selected:
|
|
209
|
+
selected: n.active
|
|
211
210
|
}, {
|
|
212
|
-
default:
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
default: $(() => [
|
|
212
|
+
h(b.$slots, `tab-${n.key}`, { tab: n }, () => [
|
|
213
|
+
A(P(n.label), 1)
|
|
215
214
|
], !0)
|
|
216
215
|
]),
|
|
217
216
|
_: 2
|
|
218
217
|
}, 1032, ["aria-current", "data-testid", "item", "selected"]))), 128))
|
|
219
218
|
]),
|
|
220
|
-
default:
|
|
221
|
-
|
|
222
|
-
"aria-label":
|
|
223
|
-
class:
|
|
219
|
+
default: $(() => [
|
|
220
|
+
f("button", {
|
|
221
|
+
"aria-label": v(s)("tabs.more_button.aria_label"),
|
|
222
|
+
class: L(["tab-link", { active: d.value.find((n) => n.active) }]),
|
|
224
223
|
"data-testid": "tabs-overflow-dropdown-button"
|
|
225
224
|
}, [
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
A(P(v(s)("tabs.more_button.label")) + " ", 1),
|
|
226
|
+
D(v(Tt), {
|
|
228
227
|
decorative: "",
|
|
229
|
-
size: `var(--kui-icon-size-30, ${
|
|
228
|
+
size: `var(--kui-icon-size-30, ${v(U)})`
|
|
230
229
|
}, null, 8, ["size"])
|
|
231
|
-
], 10,
|
|
230
|
+
], 10, Zt)
|
|
232
231
|
]),
|
|
233
232
|
_: 3
|
|
234
233
|
})
|
|
235
|
-
])) :
|
|
234
|
+
])) : y("", !0)
|
|
236
235
|
], 2),
|
|
237
|
-
|
|
238
|
-
(
|
|
239
|
-
key: `layout-loader-${
|
|
236
|
+
p.value ? y("", !0) : (i(), c("div", Jt, [
|
|
237
|
+
(i(), c(N, null, R(3, (n) => D(V, {
|
|
238
|
+
key: `layout-loader-${n}`,
|
|
240
239
|
height: "1",
|
|
241
240
|
width: "5"
|
|
242
241
|
})), 64))
|
|
@@ -244,394 +243,190 @@ const ht = {
|
|
|
244
243
|
], 512);
|
|
245
244
|
};
|
|
246
245
|
}
|
|
247
|
-
}),
|
|
248
|
-
const
|
|
249
|
-
for (const [
|
|
250
|
-
a
|
|
251
|
-
return
|
|
252
|
-
},
|
|
253
|
-
key: 0,
|
|
254
|
-
"aria-hidden": "true",
|
|
255
|
-
class: "anchor-ellipsis",
|
|
256
|
-
"data-testid": "anchor-navigation-leading-ellipsis"
|
|
257
|
-
}, wt = ["aria-current", "data-testid", "title", "onClick"], Tt = {
|
|
258
|
-
key: 1,
|
|
259
|
-
"aria-hidden": "true",
|
|
260
|
-
class: "anchor-ellipsis",
|
|
261
|
-
"data-testid": "anchor-navigation-trailing-ellipsis"
|
|
262
|
-
}, _t = { key: 2 }, _e = 140, $e = 22, he = 16, $t = /* @__PURE__ */ ue({
|
|
263
|
-
__name: "PageLayoutAnchorNavigation",
|
|
264
|
-
props: {
|
|
265
|
-
anchors: { default: () => [] }
|
|
266
|
-
},
|
|
267
|
-
setup(e) {
|
|
268
|
-
const { i18n: { t: l } } = be.useI18n(), a = ie("page-layout-anchor-navigation"), o = ie("page-layout-anchor-navigation-list"), r = F("all"), c = F(""), v = F([]), n = w(() => e.anchors.filter((t) => v.value.includes(t.key))), m = w(() => {
|
|
269
|
-
const t = n.value.findIndex((u) => u.key === c.value);
|
|
270
|
-
return t === -1 ? 0 : t;
|
|
271
|
-
}), k = w(() => {
|
|
272
|
-
const t = n.value, u = t.length, _ = m.value;
|
|
273
|
-
if (r.value === "all")
|
|
274
|
-
return { anchors: t, hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !1 };
|
|
275
|
-
if (r.value === "hidden")
|
|
276
|
-
return { anchors: [], hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !1 };
|
|
277
|
-
if (r.value === "active-only")
|
|
278
|
-
return { anchors: t.slice(_, _ + 1), hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !0 };
|
|
279
|
-
const $ = r.value === "window-3" ? 3 : 2;
|
|
280
|
-
if (u <= $)
|
|
281
|
-
return { anchors: t, hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !0 };
|
|
282
|
-
const x = _ < $ ? 0 : _ >= u - $ ? u - $ : _ - 1;
|
|
283
|
-
return {
|
|
284
|
-
anchors: t.slice(x, x + $),
|
|
285
|
-
hasLeadingEllipsis: x > 0,
|
|
286
|
-
hasTrailingEllipsis: x + $ < u,
|
|
287
|
-
hasOverflowDropdown: !0
|
|
288
|
-
};
|
|
289
|
-
}), h = (t) => t.dataTestId ?? `page-layout-anchor-${t.key}`, p = F(null), C = () => {
|
|
290
|
-
let t = a.value?.parentElement ?? null;
|
|
291
|
-
for (; t; ) {
|
|
292
|
-
const { overflowY: u } = getComputedStyle(t);
|
|
293
|
-
if (u === "auto" || u === "scroll" || u === "overlay")
|
|
294
|
-
return t;
|
|
295
|
-
t = t.parentElement;
|
|
296
|
-
}
|
|
297
|
-
return null;
|
|
298
|
-
}, S = (t) => {
|
|
299
|
-
if (t.element)
|
|
300
|
-
return t.element.isConnected ? t.element : null;
|
|
301
|
-
if (!t.selector)
|
|
302
|
-
return null;
|
|
303
|
-
const u = p.value ?? document;
|
|
304
|
-
try {
|
|
305
|
-
return u.querySelector(t.selector);
|
|
306
|
-
} catch {
|
|
307
|
-
return null;
|
|
308
|
-
}
|
|
309
|
-
}, g = () => (a.value?.closest(".page-layout-header")?.getBoundingClientRect().height ?? 0) + parseInt(Le, 10), O = parseInt(ae, 10), P = parseInt(nt, 10), H = (t) => t * _e + 2 * O + $e + (t + 2) * P + he, U = () => _e + $e + P + he;
|
|
310
|
-
let i = 0;
|
|
311
|
-
const z = async () => {
|
|
312
|
-
if (!n.value.length)
|
|
313
|
-
return;
|
|
314
|
-
const t = ++i;
|
|
315
|
-
if (r.value = "all", await pe(), t !== i || !a.value || !o.value)
|
|
316
|
-
return;
|
|
317
|
-
const u = a.value.getBoundingClientRect().width, _ = o.value.getBoundingClientRect().width;
|
|
318
|
-
u <= 0 || _ <= 0 || _ + he <= u || (H(3) <= u ? r.value = "window-3" : H(2) <= u ? r.value = "window-2" : U() <= u ? r.value = "active-only" : r.value = "hidden");
|
|
319
|
-
};
|
|
320
|
-
let V = null;
|
|
321
|
-
Pe(a, () => {
|
|
322
|
-
V && clearTimeout(V), V = setTimeout(() => {
|
|
323
|
-
Q(), z();
|
|
324
|
-
}, 150);
|
|
325
|
-
});
|
|
326
|
-
let q = null, Y = null;
|
|
327
|
-
const Z = () => p.value ?? window, L = () => {
|
|
328
|
-
q = null, Y && (clearTimeout(Y), Y = null);
|
|
329
|
-
const t = Z();
|
|
330
|
-
t.removeEventListener("scrollend", L), t.removeEventListener("wheel", L), t.removeEventListener("touchstart", L);
|
|
331
|
-
}, oe = (t) => {
|
|
332
|
-
L(), q = t;
|
|
333
|
-
const u = Z();
|
|
334
|
-
u.addEventListener("scrollend", L, { once: !0 }), u.addEventListener("wheel", L, { passive: !0 }), u.addEventListener("touchstart", L, { passive: !0 }), Y = setTimeout(L, 1e3);
|
|
335
|
-
}, de = () => {
|
|
336
|
-
const t = p.value;
|
|
337
|
-
return {
|
|
338
|
-
top: t ? t.getBoundingClientRect().top : 0,
|
|
339
|
-
scrollTop: t ? t.scrollTop : window.scrollY,
|
|
340
|
-
clientHeight: t ? t.clientHeight : window.innerHeight,
|
|
341
|
-
scrollHeight: t ? t.scrollHeight : document.documentElement.scrollHeight
|
|
342
|
-
};
|
|
343
|
-
}, Q = () => {
|
|
344
|
-
const { top: t, scrollTop: u, clientHeight: _, scrollHeight: $ } = de(), x = g(), I = [];
|
|
345
|
-
let A = null, ne = null;
|
|
346
|
-
for (const W of e.anchors) {
|
|
347
|
-
const se = S(W);
|
|
348
|
-
se && (I.push(W.key), ne = W.key, A ??= W.key, se.getBoundingClientRect().top - t <= (W.offset ?? x) + 8 && (A = W.key));
|
|
349
|
-
}
|
|
350
|
-
const we = I.length !== v.value.length || I.some((W, se) => W !== v.value[se]);
|
|
351
|
-
return we && (v.value = I), q || (ne && u > 0 && u + _ >= $ - 2 && (A = ne), c.value = A ?? ""), we;
|
|
352
|
-
};
|
|
353
|
-
let ve = !1;
|
|
354
|
-
const me = () => {
|
|
355
|
-
ve || (ve = !0, requestAnimationFrame(() => {
|
|
356
|
-
ve = !1, Q() && z();
|
|
357
|
-
}));
|
|
358
|
-
}, ke = (t) => {
|
|
359
|
-
const u = S(t);
|
|
360
|
-
if (!u)
|
|
361
|
-
return;
|
|
362
|
-
c.value = t.key, oe(t.key);
|
|
363
|
-
const _ = t.offset ?? g(), $ = p.value;
|
|
364
|
-
if ($) {
|
|
365
|
-
$.scrollTo({ behavior: "smooth", top: u.getBoundingClientRect().top - $.getBoundingClientRect().top + $.scrollTop - _ });
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
window.scrollTo({ behavior: "smooth", top: u.getBoundingClientRect().top + window.scrollY - _ });
|
|
369
|
-
}, Ke = (t, u) => {
|
|
370
|
-
u(), ke(t);
|
|
371
|
-
};
|
|
372
|
-
return ye(() => {
|
|
373
|
-
p.value = C(), Z().addEventListener("scroll", me, { passive: !0 }), Q(), z(), requestAnimationFrame(() => {
|
|
374
|
-
Q(), z();
|
|
375
|
-
});
|
|
376
|
-
}), Ee(() => {
|
|
377
|
-
Z().removeEventListener("scroll", me), L(), V && clearTimeout(V);
|
|
378
|
-
}), re(() => e.anchors, () => {
|
|
379
|
-
e.anchors.some((t) => t.key === c.value) || (c.value = ""), Q(), z();
|
|
380
|
-
}, { deep: !0 }), (t, u) => {
|
|
381
|
-
const _ = R("KButton"), $ = R("KDropdownItem"), x = R("KDropdown");
|
|
382
|
-
return s(), d("nav", {
|
|
383
|
-
ref: "page-layout-anchor-navigation",
|
|
384
|
-
"aria-label": f(l)("anchor_navigation.aria_label"),
|
|
385
|
-
class: "page-layout-anchor-navigation",
|
|
386
|
-
"data-fit": r.value,
|
|
387
|
-
"data-testid": "page-layout-anchor-navigation"
|
|
388
|
-
}, [
|
|
389
|
-
y("ul", {
|
|
390
|
-
ref: "page-layout-anchor-navigation-list",
|
|
391
|
-
class: j({ "layout-hidden": r.value === "hidden" })
|
|
392
|
-
}, [
|
|
393
|
-
k.value.hasLeadingEllipsis ? (s(), d("li", kt, " … ")) : b("", !0),
|
|
394
|
-
(s(!0), d(G, null, M(k.value.anchors, (I) => (s(), d("li", {
|
|
395
|
-
key: `${I.key}-anchor`
|
|
396
|
-
}, [
|
|
397
|
-
y("button", {
|
|
398
|
-
"aria-current": I.key === c.value ? "location" : void 0,
|
|
399
|
-
class: j(["anchor-link", { active: I.key === c.value }]),
|
|
400
|
-
"data-testid": h(I),
|
|
401
|
-
title: I.label,
|
|
402
|
-
type: "button",
|
|
403
|
-
onClick: (A) => ke(I)
|
|
404
|
-
}, B(I.label), 11, wt)
|
|
405
|
-
]))), 128)),
|
|
406
|
-
k.value.hasTrailingEllipsis ? (s(), d("li", Tt, " … ")) : b("", !0),
|
|
407
|
-
k.value.hasOverflowDropdown ? (s(), d("li", _t, [
|
|
408
|
-
N(x, { "kpop-attributes": {
|
|
409
|
-
placement: "bottom-end",
|
|
410
|
-
popoverElementAttributes: { "data-testid": "anchor-navigation-overflow-dropdown-popover" }
|
|
411
|
-
} }, {
|
|
412
|
-
items: T(({ closeDropdown: I }) => [
|
|
413
|
-
(s(!0), d(G, null, M(n.value, (A) => (s(), D($, {
|
|
414
|
-
key: `${A.key}-dropdown-item`,
|
|
415
|
-
"aria-current": A.key === c.value ? "location" : void 0,
|
|
416
|
-
"data-testid": h(A),
|
|
417
|
-
selected: A.key === c.value,
|
|
418
|
-
onClick: (ne) => Ke(A, I)
|
|
419
|
-
}, {
|
|
420
|
-
default: T(() => [
|
|
421
|
-
X(B(A.label), 1)
|
|
422
|
-
]),
|
|
423
|
-
_: 2
|
|
424
|
-
}, 1032, ["aria-current", "data-testid", "selected", "onClick"]))), 128))
|
|
425
|
-
]),
|
|
426
|
-
default: T(() => [
|
|
427
|
-
N(_, {
|
|
428
|
-
appearance: "tertiary",
|
|
429
|
-
"aria-label": f(l)("anchor_navigation.more_button.aria_label"),
|
|
430
|
-
class: "anchor-overflow-button",
|
|
431
|
-
"data-testid": "anchor-navigation-overflow-dropdown-button",
|
|
432
|
-
icon: "",
|
|
433
|
-
size: "small"
|
|
434
|
-
}, {
|
|
435
|
-
default: T(() => [
|
|
436
|
-
N(f(Re), {
|
|
437
|
-
decorative: "",
|
|
438
|
-
size: `var(--kui-icon-size-30, ${f(ae)})`
|
|
439
|
-
}, null, 8, ["size"])
|
|
440
|
-
]),
|
|
441
|
-
_: 1
|
|
442
|
-
}, 8, ["aria-label"])
|
|
443
|
-
]),
|
|
444
|
-
_: 1
|
|
445
|
-
})
|
|
446
|
-
])) : b("", !0)
|
|
447
|
-
], 2)
|
|
448
|
-
], 8, mt);
|
|
449
|
-
};
|
|
450
|
-
}
|
|
451
|
-
}), Ct = /* @__PURE__ */ ce($t, [["__scopeId", "data-v-6ab1d1c1"]]), Ce = /* @__PURE__ */ Symbol("nested-page-layout-detection"), It = "page-layout:new-appearance", Et = {
|
|
246
|
+
}), J = (t, s) => {
|
|
247
|
+
const e = t.__vccOpts || t;
|
|
248
|
+
for (const [a, l] of s)
|
|
249
|
+
e[a] = l;
|
|
250
|
+
return e;
|
|
251
|
+
}, qt = /* @__PURE__ */ J(Yt, [["__scopeId", "data-v-02891bc1"]]), tt = /* @__PURE__ */ Symbol("nested-page-layout-detection"), Ht = "page-layout:new-appearance", Qt = {
|
|
452
252
|
key: 0,
|
|
453
253
|
class: "page-layout-header",
|
|
454
254
|
"data-testid": "page-layout-header"
|
|
455
|
-
},
|
|
255
|
+
}, Xt = { class: "page-header-container" }, te = { class: "page-header-start" }, ee = { class: "title-container" }, ae = {
|
|
456
256
|
key: 1,
|
|
457
257
|
class: "page-layout-title-wrapper"
|
|
458
|
-
},
|
|
258
|
+
}, oe = {
|
|
459
259
|
class: "page-layout-title",
|
|
460
260
|
"data-testid": "page-layout-title"
|
|
461
|
-
},
|
|
261
|
+
}, ne = ["aria-label"], se = {
|
|
462
262
|
key: 3,
|
|
463
263
|
class: "title-after-container"
|
|
464
|
-
},
|
|
264
|
+
}, ie = { class: "page-header-actions-container" }, le = {
|
|
465
265
|
key: 0,
|
|
466
266
|
class: "page-layout-aside-container",
|
|
467
267
|
"data-testid": "page-layout-aside"
|
|
468
|
-
},
|
|
268
|
+
}, ue = { class: "page-layout-content" }, re = /* @__PURE__ */ Z({
|
|
469
269
|
__name: "PageLayout",
|
|
470
270
|
props: {
|
|
471
271
|
breadcrumbs: { default: () => [] },
|
|
472
272
|
title: {},
|
|
473
273
|
backTo: {},
|
|
474
274
|
tabs: { default: () => [] },
|
|
475
|
-
anchors: { default: () => [] },
|
|
476
275
|
pageShortcutData: {}
|
|
477
276
|
},
|
|
478
|
-
setup(
|
|
479
|
-
const
|
|
480
|
-
if (
|
|
481
|
-
if (typeof
|
|
482
|
-
|
|
277
|
+
setup(t) {
|
|
278
|
+
const s = z("app:navigateTo", null), e = z(Ht, null), a = z("app:pageShortcutsContext", null), { i18n: { t: l } } = it.useI18n(), r = st(), u = kt(), o = k(() => !!(t.tabs && t.tabs.length)), p = k(() => typeof t.backTo == "string"), T = k(() => F(e) === !0), d = k(() => !!t.pageShortcutData && !!t.pageShortcutData.entityType && !!t.pageShortcutData.label), g = k(() => d.value && !!a && "onFavoriteToggle" in a && typeof a.onFavoriteToggle == "function"), m = E(0), w = k(() => !!a && "isFavorite" in a && typeof a.isFavorite == "function" && a.isFavorite(t.pageShortcutData) === !0), b = async () => {
|
|
279
|
+
if (t.backTo) {
|
|
280
|
+
if (typeof t.backTo == "object") {
|
|
281
|
+
r.push(t.backTo);
|
|
483
282
|
return;
|
|
484
283
|
}
|
|
485
|
-
if (typeof
|
|
486
|
-
window.location.href =
|
|
284
|
+
if (typeof s != "function") {
|
|
285
|
+
window.location.href = t.backTo;
|
|
487
286
|
return;
|
|
488
287
|
}
|
|
489
|
-
await
|
|
288
|
+
await s(t.backTo);
|
|
490
289
|
}
|
|
491
|
-
},
|
|
492
|
-
|
|
493
|
-
|
|
290
|
+
}, S = E(0), K = k(() => S.value > 0);
|
|
291
|
+
yt(tt, () => (S.value++, () => {
|
|
292
|
+
S.value--;
|
|
494
293
|
}));
|
|
495
|
-
const
|
|
496
|
-
typeof
|
|
497
|
-
const
|
|
498
|
-
|
|
294
|
+
const O = z(tt, null), V = E(null);
|
|
295
|
+
typeof O == "function" && (V.value = O());
|
|
296
|
+
const n = () => {
|
|
297
|
+
a.onFavoriteToggle({ ...t.pageShortcutData, path: t.pageShortcutData?.path || u.fullPath });
|
|
499
298
|
};
|
|
500
|
-
|
|
501
|
-
|
|
299
|
+
ht(() => {
|
|
300
|
+
V.value?.();
|
|
502
301
|
});
|
|
503
|
-
const
|
|
504
|
-
!
|
|
302
|
+
const j = Vt(() => {
|
|
303
|
+
!K.value && d.value && a && "onEntityPageVisit" in a && typeof a.onEntityPageVisit == "function" && (a.onEntityPageVisit({ ...t.pageShortcutData, path: t.pageShortcutData?.path || u?.fullPath }), m.value++);
|
|
505
304
|
}, 500);
|
|
506
|
-
return
|
|
507
|
-
|
|
508
|
-
}, { immediate: !0, deep: !0 }), (
|
|
509
|
-
const
|
|
510
|
-
return
|
|
511
|
-
class:
|
|
305
|
+
return G([() => t.pageShortcutData, () => u?.fullPath], () => {
|
|
306
|
+
j();
|
|
307
|
+
}, { immediate: !0, deep: !0 }), (C, Y) => {
|
|
308
|
+
const lt = I("KBreadcrumbs"), ut = I("KTooltip"), rt = I("router-view");
|
|
309
|
+
return i(), c("div", {
|
|
310
|
+
class: L(["kong-ui-public-page-layout", { "new-appearance": T.value }]),
|
|
512
311
|
"data-testid": "kong-ui-public-page-layout"
|
|
513
312
|
}, [
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
313
|
+
K.value ? y("", !0) : (i(), c("div", Qt, [
|
|
314
|
+
f("div", Xt, [
|
|
315
|
+
f("div", te, [
|
|
316
|
+
t.breadcrumbs && t.breadcrumbs.length ? (i(), _(lt, {
|
|
518
317
|
key: 0,
|
|
519
318
|
class: "header-breadcrumbs",
|
|
520
319
|
"data-testid": "page-layout-breadcrumbs",
|
|
521
320
|
"item-max-width": "25ch",
|
|
522
|
-
items:
|
|
523
|
-
},
|
|
524
|
-
|
|
321
|
+
items: t.breadcrumbs
|
|
322
|
+
}, M({ _: 2 }, [
|
|
323
|
+
T.value ? {
|
|
525
324
|
name: "divider",
|
|
526
|
-
fn:
|
|
527
|
-
|
|
325
|
+
fn: $(() => [
|
|
326
|
+
D(v(_t), { decorative: "" })
|
|
528
327
|
]),
|
|
529
328
|
key: "0"
|
|
530
329
|
} : void 0
|
|
531
|
-
]), 1032, ["items"])) :
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
"aria-label":
|
|
330
|
+
]), 1032, ["items"])) : y("", !0),
|
|
331
|
+
f("div", ee, [
|
|
332
|
+
t.backTo && !T.value ? (i(), _(x(p.value ? "a" : "router-link"), ot({ key: 0 }, p.value ? { href: t.backTo } : { to: t.backTo }, {
|
|
333
|
+
"aria-label": v(l)("back_button"),
|
|
535
334
|
class: "navigate-back",
|
|
536
335
|
"data-testid": "page-layout-navigate-back",
|
|
537
336
|
tabindex: "0",
|
|
538
|
-
onClick:
|
|
539
|
-
onKeydown:
|
|
337
|
+
onClick: W(b, ["prevent"]),
|
|
338
|
+
onKeydown: nt(W(b, ["prevent"]), ["enter"])
|
|
540
339
|
}), {
|
|
541
|
-
default:
|
|
542
|
-
|
|
340
|
+
default: $(() => [
|
|
341
|
+
D(v(Ct), {
|
|
543
342
|
decorative: "",
|
|
544
|
-
size: `var(--kui-icon-size-30, ${
|
|
343
|
+
size: `var(--kui-icon-size-30, ${v(U)})`
|
|
545
344
|
}, null, 8, ["size"])
|
|
546
345
|
]),
|
|
547
346
|
_: 1
|
|
548
|
-
}, 16, ["aria-label", "onKeydown"])) :
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
347
|
+
}, 16, ["aria-label", "onKeydown"])) : y("", !0),
|
|
348
|
+
t.title || C.$slots.title ? (i(), c("span", ae, [
|
|
349
|
+
h(C.$slots, "title", {}, () => [
|
|
350
|
+
f("h1", oe, P(t.title), 1)
|
|
552
351
|
], !0)
|
|
553
|
-
])) :
|
|
554
|
-
|
|
555
|
-
key:
|
|
352
|
+
])) : y("", !0),
|
|
353
|
+
g.value ? (i(), c("div", {
|
|
354
|
+
key: m.value,
|
|
556
355
|
class: "favorite-button-container"
|
|
557
356
|
}, [
|
|
558
|
-
|
|
357
|
+
D(ut, {
|
|
559
358
|
placement: "right",
|
|
560
|
-
text:
|
|
359
|
+
text: w.value ? v(l)("favorite_button.remove_shortcut") : v(l)("favorite_button.save_shortcut")
|
|
561
360
|
}, {
|
|
562
|
-
default:
|
|
563
|
-
|
|
564
|
-
"aria-label":
|
|
565
|
-
class:
|
|
361
|
+
default: $(() => [
|
|
362
|
+
f("button", {
|
|
363
|
+
"aria-label": w.value ? v(l)("favorite_button.remove_shortcut") : v(l)("favorite_button.save_shortcut"),
|
|
364
|
+
class: L(["favorite-button", { active: w.value }]),
|
|
566
365
|
"data-testid": "page-layout-favorite-button",
|
|
567
366
|
type: "button",
|
|
568
|
-
onClick:
|
|
367
|
+
onClick: n
|
|
569
368
|
}, [
|
|
570
|
-
(
|
|
369
|
+
(i(), _(x(w.value ? v(It) : v(St)), {
|
|
571
370
|
decorative: "",
|
|
572
|
-
size: `var(--kui-icon-size-30, ${
|
|
371
|
+
size: `var(--kui-icon-size-30, ${v(U)})`
|
|
573
372
|
}, null, 8, ["size"]))
|
|
574
|
-
], 10,
|
|
373
|
+
], 10, ne)
|
|
575
374
|
]),
|
|
576
375
|
_: 1
|
|
577
376
|
}, 8, ["text"])
|
|
578
|
-
])) :
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
])) :
|
|
377
|
+
])) : y("", !0),
|
|
378
|
+
C.$slots["title-after"] ? (i(), c("div", se, [
|
|
379
|
+
h(C.$slots, "title-after", {}, void 0, !0)
|
|
380
|
+
])) : y("", !0)
|
|
582
381
|
])
|
|
583
382
|
]),
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}, null, 8, ["anchors"])) : b("", !0),
|
|
588
|
-
y("div", Bt, [
|
|
589
|
-
E(K.$slots, "actions", {}, void 0, !0),
|
|
590
|
-
q[0] || (q[0] = y("div", { "data-teleport-target": "ask-kai" }, null, -1))
|
|
383
|
+
f("div", ie, [
|
|
384
|
+
h(C.$slots, "actions", {}, void 0, !0),
|
|
385
|
+
Y[0] || (Y[0] = f("div", { "data-teleport-target": "ask-kai" }, null, -1))
|
|
591
386
|
])
|
|
592
387
|
]),
|
|
593
|
-
|
|
388
|
+
o.value ? (i(), _(qt, {
|
|
594
389
|
key: 0,
|
|
595
|
-
tabs:
|
|
596
|
-
},
|
|
597
|
-
|
|
598
|
-
name: `tab-${
|
|
599
|
-
fn:
|
|
600
|
-
|
|
390
|
+
tabs: t.tabs
|
|
391
|
+
}, M({ _: 2 }, [
|
|
392
|
+
R(t.tabs, (q) => ({
|
|
393
|
+
name: `tab-${q.key}`,
|
|
394
|
+
fn: $((ct) => [
|
|
395
|
+
h(C.$slots, `tab-${q.key}`, gt(mt(ct)), void 0, !0)
|
|
601
396
|
])
|
|
602
397
|
}))
|
|
603
|
-
]), 1032, ["tabs"])) :
|
|
398
|
+
]), 1032, ["tabs"])) : y("", !0)
|
|
604
399
|
])),
|
|
605
|
-
|
|
606
|
-
class:
|
|
400
|
+
f("div", {
|
|
401
|
+
class: L(["page-layout-content-container", { "has-nested-page-layout": K.value }])
|
|
607
402
|
}, [
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
])) :
|
|
611
|
-
|
|
612
|
-
|
|
403
|
+
T.value && C.$slots.aside ? (i(), c("div", le, [
|
|
404
|
+
h(C.$slots, "aside", {}, void 0, !0)
|
|
405
|
+
])) : y("", !0),
|
|
406
|
+
f("div", ue, [
|
|
407
|
+
o.value ? (i(), _(rt, { key: 0 })) : h(C.$slots, "default", {}, void 0, !0, 1)
|
|
613
408
|
])
|
|
614
409
|
], 2)
|
|
615
410
|
], 2);
|
|
616
411
|
};
|
|
617
412
|
}
|
|
618
|
-
}),
|
|
413
|
+
}), Ce = /* @__PURE__ */ J(re, [["__scopeId", "data-v-33657beb"]]), ce = {
|
|
619
414
|
key: 0,
|
|
620
415
|
class: "about-card-description",
|
|
621
416
|
"data-testid": "about-card-description"
|
|
622
|
-
},
|
|
417
|
+
}, de = {
|
|
623
418
|
key: 1,
|
|
624
419
|
class: "about-card-skeleton",
|
|
625
420
|
"data-testid": "about-card-skeleton"
|
|
626
|
-
},
|
|
421
|
+
}, ve = {
|
|
627
422
|
key: 2,
|
|
628
423
|
class: "about-card-rows",
|
|
629
424
|
"data-testid": "about-card-rows"
|
|
630
|
-
},
|
|
425
|
+
}, fe = ["data-testid"], be = { class: "about-card-row-label" }, pe = { class: "about-card-row-text" }, ye = ["aria-label", "data-testid"], he = { class: "about-card-row-value" }, ge = { class: "about-card-row-text" }, me = {
|
|
631
426
|
key: 3,
|
|
632
427
|
class: "about-card-content",
|
|
633
428
|
"data-testid": "about-card-content"
|
|
634
|
-
},
|
|
429
|
+
}, ke = /* @__PURE__ */ Z({
|
|
635
430
|
__name: "AboutCard",
|
|
636
431
|
props: {
|
|
637
432
|
title: { default: "" },
|
|
@@ -640,91 +435,91 @@ const ht = {
|
|
|
640
435
|
rows: { default: () => [] },
|
|
641
436
|
isLoading: { type: Boolean, default: !1 }
|
|
642
437
|
},
|
|
643
|
-
setup(
|
|
644
|
-
const
|
|
645
|
-
return (
|
|
646
|
-
const
|
|
647
|
-
return
|
|
438
|
+
setup(t) {
|
|
439
|
+
const s = k(() => t.rows.length || 4);
|
|
440
|
+
return (e, a) => {
|
|
441
|
+
const l = I("KSkeletonBox"), r = I("KTooltip"), u = I("KCard");
|
|
442
|
+
return i(), _(u, {
|
|
648
443
|
class: "kong-ui-public-about-card",
|
|
649
|
-
title:
|
|
650
|
-
"title-tag":
|
|
651
|
-
},
|
|
652
|
-
default:
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
444
|
+
title: t.title,
|
|
445
|
+
"title-tag": t.titleTag
|
|
446
|
+
}, M({
|
|
447
|
+
default: $(() => [
|
|
448
|
+
e.$slots.description || t.description ? (i(), c("p", ce, [
|
|
449
|
+
h(e.$slots, "description", {}, () => [
|
|
450
|
+
A(P(t.description), 1)
|
|
656
451
|
], !0)
|
|
657
|
-
])) :
|
|
658
|
-
|
|
659
|
-
(
|
|
660
|
-
key:
|
|
452
|
+
])) : y("", !0),
|
|
453
|
+
t.isLoading ? (i(), c("div", de, [
|
|
454
|
+
(i(!0), c(N, null, R(s.value, (o) => (i(), _(l, {
|
|
455
|
+
key: o,
|
|
661
456
|
height: "2",
|
|
662
457
|
width: "100"
|
|
663
458
|
}))), 128))
|
|
664
|
-
])) :
|
|
665
|
-
(
|
|
666
|
-
key:
|
|
459
|
+
])) : t.rows.length ? (i(), c("dl", ve, [
|
|
460
|
+
(i(!0), c(N, null, R(t.rows, (o) => (i(), c("div", {
|
|
461
|
+
key: o.key,
|
|
667
462
|
class: "about-card-row",
|
|
668
|
-
"data-testid": `about-card-row-${
|
|
463
|
+
"data-testid": `about-card-row-${o.key}`
|
|
669
464
|
}, [
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
465
|
+
f("dt", be, [
|
|
466
|
+
h(e.$slots, `label-${o.key}`, { row: o }, () => [
|
|
467
|
+
f("span", pe, P(o.label), 1)
|
|
673
468
|
], !0),
|
|
674
|
-
|
|
469
|
+
o.tooltip ? (i(), _(r, {
|
|
675
470
|
key: 0,
|
|
676
|
-
text:
|
|
471
|
+
text: o.tooltip
|
|
677
472
|
}, {
|
|
678
|
-
default:
|
|
679
|
-
|
|
680
|
-
"aria-label":
|
|
473
|
+
default: $(() => [
|
|
474
|
+
f("button", {
|
|
475
|
+
"aria-label": o.tooltip,
|
|
681
476
|
class: "about-card-row-tooltip-trigger",
|
|
682
|
-
"data-testid": `about-card-row-${
|
|
477
|
+
"data-testid": `about-card-row-${o.key}-tooltip`,
|
|
683
478
|
type: "button"
|
|
684
479
|
}, [
|
|
685
|
-
|
|
686
|
-
size: `var(--kui-icon-size-20, ${
|
|
480
|
+
D(v(Pt), {
|
|
481
|
+
size: `var(--kui-icon-size-20, ${v(Et)})`
|
|
687
482
|
}, null, 8, ["size"])
|
|
688
|
-
], 8,
|
|
483
|
+
], 8, ye)
|
|
689
484
|
]),
|
|
690
485
|
_: 2
|
|
691
|
-
}, 1032, ["text"])) :
|
|
486
|
+
}, 1032, ["text"])) : y("", !0)
|
|
692
487
|
]),
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
488
|
+
f("dd", he, [
|
|
489
|
+
h(e.$slots, `row-${o.key}`, { row: o }, () => [
|
|
490
|
+
f("span", ge, P(o.value), 1)
|
|
696
491
|
], !0)
|
|
697
492
|
])
|
|
698
|
-
], 8,
|
|
699
|
-
])) :
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
])) :
|
|
493
|
+
], 8, fe))), 128))
|
|
494
|
+
])) : y("", !0),
|
|
495
|
+
e.$slots.default ? (i(), c("div", me, [
|
|
496
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
497
|
+
])) : y("", !0)
|
|
703
498
|
]),
|
|
704
499
|
_: 2
|
|
705
500
|
}, [
|
|
706
|
-
|
|
501
|
+
e.$slots.title || t.title ? {
|
|
707
502
|
name: "title",
|
|
708
|
-
fn:
|
|
709
|
-
|
|
710
|
-
|
|
503
|
+
fn: $(() => [
|
|
504
|
+
h(e.$slots, "title", {}, () => [
|
|
505
|
+
A(P(t.title), 1)
|
|
711
506
|
], !0)
|
|
712
507
|
]),
|
|
713
508
|
key: "0"
|
|
714
509
|
} : void 0,
|
|
715
|
-
|
|
510
|
+
e.$slots.actions ? {
|
|
716
511
|
name: "actions",
|
|
717
|
-
fn:
|
|
718
|
-
|
|
512
|
+
fn: $(() => [
|
|
513
|
+
h(e.$slots, "actions", {}, void 0, !0)
|
|
719
514
|
]),
|
|
720
515
|
key: "1"
|
|
721
516
|
} : void 0
|
|
722
517
|
]), 1032, ["title", "title-tag"]);
|
|
723
518
|
};
|
|
724
519
|
}
|
|
725
|
-
}),
|
|
520
|
+
}), Ie = /* @__PURE__ */ J(ke, [["__scopeId", "data-v-0316c887"]]);
|
|
726
521
|
export {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
522
|
+
Ie as AboutCard,
|
|
523
|
+
Ht as NEW_APPEARANCE_INJECTION_KEY,
|
|
524
|
+
Ce as PageLayout
|
|
730
525
|
};
|