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