@kong-ui-public/page-layout 0.2.25 → 0.2.26-pr.2584.751d7ef93.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/package.json +1 -1
- package/dist/page-layout.es.js +0 -333
- package/dist/page-layout.umd.js +0 -1
- package/dist/style.css +0 -1
- package/dist/types/components/PageLayout.vue.d.ts +0 -12
- package/dist/types/components/PageLayout.vue.d.ts.map +0 -1
- package/dist/types/components/PageLayoutTabs.vue.d.ts +0 -5
- package/dist/types/components/PageLayoutTabs.vue.d.ts.map +0 -1
- package/dist/types/composables/index.d.ts +0 -6
- package/dist/types/composables/index.d.ts.map +0 -1
- package/dist/types/composables/useI18n.d.ts +0 -9
- package/dist/types/composables/useI18n.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/symbols.d.ts +0 -2
- package/dist/types/symbols.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -3
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/types/page-layout-tabs.d.ts +0 -17
- package/dist/types/types/page-layout-tabs.d.ts.map +0 -1
- package/dist/types/types/page-layout.d.ts +0 -40
- package/dist/types/types/page-layout.d.ts.map +0 -1
package/package.json
CHANGED
package/dist/page-layout.es.js
DELETED
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import { getCurrentScope as at, onScopeDispose as ot, watch as M, computed as y, toValue as q, shallowRef as nt, getCurrentInstance as st, onMounted as J, defineComponent as Q, useCssVars as it, unref as f, inject as K, useTemplateRef as G, ref as R, onBeforeUnmount as ut, resolveComponent as D, openBlock as n, createElementBlock as i, createElementVNode as w, normalizeClass as x, Fragment as N, renderList as z, createBlock as _, resolveDynamicComponent as F, mergeProps as X, withKeys as E, withModifiers as $, withCtx as L, createTextVNode as U, toDisplayString as P, createVNode as O, createCommentVNode as p, nextTick as V, provide as rt, onUnmounted as lt, renderSlot as A } from "vue";
|
|
2
|
-
import { useRouter as Y } from "vue-router";
|
|
3
|
-
import { createI18n as ct, i18nTComponent as dt } from "@kong-ui-public/i18n";
|
|
4
|
-
import { ArrowTopLeftIcon as vt, StarFillIcon as bt, StarIcon as ft } from "@kong/icons";
|
|
5
|
-
const pt = "Go back", yt = {
|
|
6
|
-
save_shortcut: "Save page to shortcuts",
|
|
7
|
-
remove_shortcut: "Remove page from shortcuts"
|
|
8
|
-
}, gt = {
|
|
9
|
-
more_button: {
|
|
10
|
-
label: "More",
|
|
11
|
-
aria_label: "More tabs"
|
|
12
|
-
}
|
|
13
|
-
}, mt = {
|
|
14
|
-
back_button: pt,
|
|
15
|
-
favorite_button: yt,
|
|
16
|
-
tabs: gt
|
|
17
|
-
};
|
|
18
|
-
function ht() {
|
|
19
|
-
const t = ct("en-us", mt);
|
|
20
|
-
return {
|
|
21
|
-
i18n: t,
|
|
22
|
-
i18nT: dt(t)
|
|
23
|
-
// Translation component <i18n-t>
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const tt = {
|
|
27
|
-
useI18n: ht
|
|
28
|
-
}, j = "16px", kt = "16px";
|
|
29
|
-
function wt(t, o) {
|
|
30
|
-
return at() ? (ot(t, o), !0) : !1;
|
|
31
|
-
}
|
|
32
|
-
const Tt = typeof window < "u" && typeof document < "u";
|
|
33
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
34
|
-
const _t = Tt ? window : void 0;
|
|
35
|
-
function Z(t) {
|
|
36
|
-
var o;
|
|
37
|
-
const a = q(t);
|
|
38
|
-
return (o = a == null ? void 0 : a.$el) !== null && o !== void 0 ? o : a;
|
|
39
|
-
}
|
|
40
|
-
// @__NO_SIDE_EFFECTS__
|
|
41
|
-
function St() {
|
|
42
|
-
const t = nt(!1), o = st();
|
|
43
|
-
return o && J(() => {
|
|
44
|
-
t.value = !0;
|
|
45
|
-
}, o), t;
|
|
46
|
-
}
|
|
47
|
-
// @__NO_SIDE_EFFECTS__
|
|
48
|
-
function Ct(t) {
|
|
49
|
-
const o = /* @__PURE__ */ St();
|
|
50
|
-
return y(() => (o.value, !!t()));
|
|
51
|
-
}
|
|
52
|
-
function It(t, o, a = {}) {
|
|
53
|
-
const { window: u = _t, ...g } = a;
|
|
54
|
-
let l;
|
|
55
|
-
const m = /* @__PURE__ */ Ct(() => u && "ResizeObserver" in u), h = () => {
|
|
56
|
-
l && (l.disconnect(), l = void 0);
|
|
57
|
-
}, c = M(y(() => {
|
|
58
|
-
const d = q(t);
|
|
59
|
-
return Array.isArray(d) ? d.map((v) => Z(v)) : [Z(d)];
|
|
60
|
-
}), (d) => {
|
|
61
|
-
if (h(), m.value && u) {
|
|
62
|
-
l = new ResizeObserver(o);
|
|
63
|
-
for (const v of d) v && l.observe(v, g);
|
|
64
|
-
}
|
|
65
|
-
}, {
|
|
66
|
-
immediate: !0,
|
|
67
|
-
flush: "post"
|
|
68
|
-
}), r = () => {
|
|
69
|
-
h(), c();
|
|
70
|
-
};
|
|
71
|
-
return wt(r), {
|
|
72
|
-
isSupported: m,
|
|
73
|
-
stop: r
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
const $t = {
|
|
77
|
-
ref: "page-layout-tabs",
|
|
78
|
-
class: "page-layout-tabs",
|
|
79
|
-
"data-testid": "page-layout-tabs"
|
|
80
|
-
}, Dt = { key: 0 }, Bt = ["aria-label"], Kt = { class: "overflowing-items-count" }, Lt = {
|
|
81
|
-
key: 0,
|
|
82
|
-
class: "layout-loader-container"
|
|
83
|
-
}, Pt = /* @__PURE__ */ Q({
|
|
84
|
-
__name: "PageLayoutTabs",
|
|
85
|
-
props: {
|
|
86
|
-
tabs: { default: () => [] }
|
|
87
|
-
},
|
|
88
|
-
setup(t) {
|
|
89
|
-
it((b) => ({
|
|
90
|
-
db98251e: f(l)
|
|
91
|
-
}));
|
|
92
|
-
const { i18n: { t: o } } = tt.useI18n(), a = Y(), u = K("app:navigateTo", null), g = (b) => {
|
|
93
|
-
if (typeof b.to != "string") {
|
|
94
|
-
a.push(b.to);
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
if (typeof u != "function") {
|
|
98
|
-
window.location.href = b.to;
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
u(b.to);
|
|
102
|
-
}, l = kt, m = G("page-layout-tabs"), h = G("page-layout-tabs-list"), c = R(t.tabs.length), r = R(!1), d = y(() => t.tabs.slice(0, c.value)), v = y(() => t.tabs.slice(c.value)), T = async () => {
|
|
103
|
-
var C, I, e;
|
|
104
|
-
if (!m.value || !h.value)
|
|
105
|
-
return;
|
|
106
|
-
r.value = !1, c.value = t.tabs.length, await V();
|
|
107
|
-
const b = ((C = m.value) == null ? void 0 : C.getBoundingClientRect().width) - parseInt(l) * 2;
|
|
108
|
-
let s = (I = h.value) == null ? void 0 : I.getBoundingClientRect().width;
|
|
109
|
-
if (!b || !s) {
|
|
110
|
-
r.value = !0;
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
const B = 50;
|
|
114
|
-
for (; s + B > b && c.value > 1; )
|
|
115
|
-
c.value--, await V(), s = ((e = h.value) == null ? void 0 : e.getBoundingClientRect().width) || 0;
|
|
116
|
-
r.value = !0;
|
|
117
|
-
};
|
|
118
|
-
let k = null;
|
|
119
|
-
const S = () => {
|
|
120
|
-
k && clearTimeout(k), k = setTimeout(() => {
|
|
121
|
-
T();
|
|
122
|
-
}, 150);
|
|
123
|
-
};
|
|
124
|
-
return J(() => {
|
|
125
|
-
T(), It(m, S);
|
|
126
|
-
}), ut(() => {
|
|
127
|
-
k && clearTimeout(k);
|
|
128
|
-
}), M(() => t.tabs, () => {
|
|
129
|
-
T();
|
|
130
|
-
}, { deep: !0 }), (b, s) => {
|
|
131
|
-
const B = D("KDropdownItem"), C = D("KDropdown"), I = D("KSkeletonBox");
|
|
132
|
-
return n(), i("nav", $t, [
|
|
133
|
-
w("ul", {
|
|
134
|
-
ref: "page-layout-tabs-list",
|
|
135
|
-
class: x({ "layout-computing": !r.value })
|
|
136
|
-
}, [
|
|
137
|
-
(n(!0), i(N, null, z(d.value, (e) => (n(), i("li", {
|
|
138
|
-
key: `${e.key}-tab`
|
|
139
|
-
}, [
|
|
140
|
-
(n(), _(F(typeof e.to == "string" ? "a" : "router-link"), X({ ref_for: !0 }, typeof e.to == "string" ? { href: e.to } : { to: e.to }, {
|
|
141
|
-
"aria-current": e.active ? "page" : void 0,
|
|
142
|
-
class: ["tab-link", { active: e.active }],
|
|
143
|
-
"data-testid": e.dataTestId ? e.dataTestId : `page-layout-tab-${e.key}`,
|
|
144
|
-
tabindex: "0",
|
|
145
|
-
onClick: $((W) => g(e), ["prevent"]),
|
|
146
|
-
onKeydown: [
|
|
147
|
-
E($((W) => g(e), ["prevent"]), ["enter"]),
|
|
148
|
-
E($((W) => g(e), ["prevent"]), ["space"])
|
|
149
|
-
]
|
|
150
|
-
}), {
|
|
151
|
-
default: L(() => [
|
|
152
|
-
U(P(e.label), 1)
|
|
153
|
-
]),
|
|
154
|
-
_: 2
|
|
155
|
-
}, 1040, ["aria-current", "class", "data-testid", "onClick", "onKeydown"]))
|
|
156
|
-
]))), 128)),
|
|
157
|
-
t.tabs.length > c.value ? (n(), i("li", Dt, [
|
|
158
|
-
O(C, { "kpop-attributes": {
|
|
159
|
-
placement: "bottom-end",
|
|
160
|
-
popoverElementAttributes: { "data-testid": "tabs-overflow-dropdown-popover" }
|
|
161
|
-
} }, {
|
|
162
|
-
items: L(() => [
|
|
163
|
-
(n(!0), i(N, null, z(v.value, (e) => (n(), _(B, {
|
|
164
|
-
key: `${e.key}-dropdown-item`,
|
|
165
|
-
"aria-current": e.active ? "page" : void 0,
|
|
166
|
-
"data-testid": e.dataTestId ? e.dataTestId : `page-layout-tab-${e.key}`,
|
|
167
|
-
item: {
|
|
168
|
-
label: e.label,
|
|
169
|
-
value: e.key,
|
|
170
|
-
to: e.to
|
|
171
|
-
},
|
|
172
|
-
selected: e.active
|
|
173
|
-
}, null, 8, ["aria-current", "data-testid", "item", "selected"]))), 128))
|
|
174
|
-
]),
|
|
175
|
-
default: L(() => [
|
|
176
|
-
w("button", {
|
|
177
|
-
"aria-label": f(o)("tabs.more_button.aria_label"),
|
|
178
|
-
class: x(["tab-link overflow-dropdown-trigger", { active: v.value.find((e) => e.active) }]),
|
|
179
|
-
"data-testid": "tabs-overflow-dropdown-button"
|
|
180
|
-
}, [
|
|
181
|
-
U(P(f(o)("tabs.more_button.label")) + " ", 1),
|
|
182
|
-
w("span", Kt, P(t.tabs.length - c.value), 1)
|
|
183
|
-
], 10, Bt)
|
|
184
|
-
]),
|
|
185
|
-
_: 1
|
|
186
|
-
})
|
|
187
|
-
])) : p("", !0)
|
|
188
|
-
], 2),
|
|
189
|
-
r.value ? p("", !0) : (n(), i("div", Lt, [
|
|
190
|
-
(n(), i(N, null, z(3, (e) => O(I, {
|
|
191
|
-
key: `layout-loader-${e}`,
|
|
192
|
-
height: "1",
|
|
193
|
-
width: "5"
|
|
194
|
-
})), 64))
|
|
195
|
-
]))
|
|
196
|
-
], 512);
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
}), et = (t, o) => {
|
|
200
|
-
const a = t.__vccOpts || t;
|
|
201
|
-
for (const [u, g] of o)
|
|
202
|
-
a[u] = g;
|
|
203
|
-
return a;
|
|
204
|
-
}, Rt = /* @__PURE__ */ et(Pt, [["__scopeId", "data-v-b3139545"]]), H = Symbol("nested-page-layout-detection"), xt = {
|
|
205
|
-
class: "kong-ui-public-page-layout",
|
|
206
|
-
"data-testid": "kong-ui-public-page-layout"
|
|
207
|
-
}, Et = {
|
|
208
|
-
key: 0,
|
|
209
|
-
class: "page-layout-header",
|
|
210
|
-
"data-testid": "page-layout-header"
|
|
211
|
-
}, Nt = { class: "page-header-container" }, zt = { class: "page-header-start" }, At = { class: "title-container" }, Ft = {
|
|
212
|
-
key: 1,
|
|
213
|
-
class: "page-layout-title",
|
|
214
|
-
"data-testid": "page-layout-title"
|
|
215
|
-
}, Ot = {
|
|
216
|
-
key: 2,
|
|
217
|
-
class: "favorite-button-container"
|
|
218
|
-
}, Vt = ["aria-label"], Mt = {
|
|
219
|
-
key: 3,
|
|
220
|
-
class: "title-after-container"
|
|
221
|
-
}, Wt = {
|
|
222
|
-
key: 0,
|
|
223
|
-
class: "page-header-actions-container"
|
|
224
|
-
}, Gt = /* @__PURE__ */ Q({
|
|
225
|
-
__name: "PageLayout",
|
|
226
|
-
props: {
|
|
227
|
-
breadcrumbs: { default: () => [] },
|
|
228
|
-
title: {},
|
|
229
|
-
backTo: {},
|
|
230
|
-
tabs: { default: () => [] },
|
|
231
|
-
pageShortcutData: {}
|
|
232
|
-
},
|
|
233
|
-
setup(t) {
|
|
234
|
-
const o = K("app:navigateTo", null), a = K("app:pageShortcutsContext", null), { i18n: { t: u } } = tt.useI18n(), g = Y(), l = y(() => !!(t.tabs && t.tabs.length)), m = y(() => typeof t.backTo == "string"), h = y(() => !!t.pageShortcutData && !!t.pageShortcutData.entityType && !!t.pageShortcutData.path && !!t.pageShortcutData.label), c = y(() => h.value && !!a && "onFavoriteToggle" in a && typeof a.onFavoriteToggle == "function"), r = y(() => !!a && "isFavorite" in a && a.isFavorite === !0), d = async () => {
|
|
235
|
-
if (t.backTo) {
|
|
236
|
-
if (typeof t.backTo == "object") {
|
|
237
|
-
g.push(t.backTo);
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
if (typeof o != "function") {
|
|
241
|
-
window.location.href = t.backTo;
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
await o(t.backTo);
|
|
245
|
-
}
|
|
246
|
-
}, v = R(0), T = y(() => v.value > 0);
|
|
247
|
-
rt(H, () => (v.value++, () => {
|
|
248
|
-
v.value--;
|
|
249
|
-
}));
|
|
250
|
-
const k = K(H, null), S = R(null);
|
|
251
|
-
typeof k == "function" && (S.value = k());
|
|
252
|
-
const b = () => {
|
|
253
|
-
a.onFavoriteToggle();
|
|
254
|
-
};
|
|
255
|
-
return lt(() => {
|
|
256
|
-
var s;
|
|
257
|
-
(s = S.value) == null || s.call(S);
|
|
258
|
-
}), M(() => t.pageShortcutData, async (s) => {
|
|
259
|
-
await V(), !T.value && h.value && a && "onEntityPageVisit" in a && typeof a.onEntityPageVisit == "function" && a.onEntityPageVisit(s);
|
|
260
|
-
}, { immediate: !0, deep: !0 }), (s, B) => {
|
|
261
|
-
const C = D("KBreadcrumbs"), I = D("router-view");
|
|
262
|
-
return n(), i("div", xt, [
|
|
263
|
-
T.value ? p("", !0) : (n(), i("div", Et, [
|
|
264
|
-
w("div", Nt, [
|
|
265
|
-
w("div", zt, [
|
|
266
|
-
t.breadcrumbs && t.breadcrumbs.length ? (n(), _(C, {
|
|
267
|
-
key: 0,
|
|
268
|
-
class: "header-breadcrumbs",
|
|
269
|
-
"data-testid": "page-layout-breadcrumbs",
|
|
270
|
-
"item-max-width": "25ch",
|
|
271
|
-
items: t.breadcrumbs
|
|
272
|
-
}, null, 8, ["items"])) : p("", !0),
|
|
273
|
-
w("div", At, [
|
|
274
|
-
t.backTo ? (n(), _(F(m.value ? "a" : "router-link"), X({ key: 0 }, m.value ? { href: t.backTo } : { to: t.backTo }, {
|
|
275
|
-
"aria-label": f(u)("back_button"),
|
|
276
|
-
class: "navigate-back",
|
|
277
|
-
"data-testid": "page-layout-navigate-back",
|
|
278
|
-
tabindex: "0",
|
|
279
|
-
onClick: $(d, ["prevent"]),
|
|
280
|
-
onKeydown: [
|
|
281
|
-
E($(d, ["prevent"]), ["enter"]),
|
|
282
|
-
E($(d, ["prevent"]), ["space"])
|
|
283
|
-
]
|
|
284
|
-
}), {
|
|
285
|
-
default: L(() => [
|
|
286
|
-
O(f(vt), {
|
|
287
|
-
decorative: "",
|
|
288
|
-
size: f(j)
|
|
289
|
-
}, null, 8, ["size"])
|
|
290
|
-
]),
|
|
291
|
-
_: 1
|
|
292
|
-
}, 16, ["aria-label", "onKeydown"])) : p("", !0),
|
|
293
|
-
t.title ? (n(), i("h1", Ft, P(t.title), 1)) : p("", !0),
|
|
294
|
-
c.value ? (n(), i("div", Ot, [
|
|
295
|
-
w("button", {
|
|
296
|
-
"aria-label": r.value ? f(u)("favorite_button.remove_shortcut") : f(u)("favorite_button.save_shortcut"),
|
|
297
|
-
class: x(["favorite-button", { active: r.value }]),
|
|
298
|
-
"data-testid": "page-layout-favorite-button",
|
|
299
|
-
type: "button",
|
|
300
|
-
onClick: b
|
|
301
|
-
}, [
|
|
302
|
-
(n(), _(F(r.value ? f(bt) : f(ft)), {
|
|
303
|
-
decorative: "",
|
|
304
|
-
size: f(j)
|
|
305
|
-
}, null, 8, ["size"]))
|
|
306
|
-
], 10, Vt)
|
|
307
|
-
])) : p("", !0),
|
|
308
|
-
s.$slots["title-after"] ? (n(), i("div", Mt, [
|
|
309
|
-
A(s.$slots, "title-after", {}, void 0, !0)
|
|
310
|
-
])) : p("", !0)
|
|
311
|
-
])
|
|
312
|
-
]),
|
|
313
|
-
s.$slots.actions ? (n(), i("div", Wt, [
|
|
314
|
-
A(s.$slots, "actions", {}, void 0, !0)
|
|
315
|
-
])) : p("", !0)
|
|
316
|
-
]),
|
|
317
|
-
l.value ? (n(), _(Rt, {
|
|
318
|
-
key: 0,
|
|
319
|
-
tabs: t.tabs
|
|
320
|
-
}, null, 8, ["tabs"])) : p("", !0)
|
|
321
|
-
])),
|
|
322
|
-
w("div", {
|
|
323
|
-
class: x(["page-layout-content", { "has-nested-page-layout": T.value }])
|
|
324
|
-
}, [
|
|
325
|
-
l.value ? (n(), _(I, { key: 0 })) : A(s.$slots, "default", { key: 1 }, void 0, !0)
|
|
326
|
-
], 2)
|
|
327
|
-
]);
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
}), qt = /* @__PURE__ */ et(Gt, [["__scopeId", "data-v-59aa4312"]]);
|
|
331
|
-
export {
|
|
332
|
-
qt as PageLayout
|
|
333
|
-
};
|
package/dist/page-layout.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(m,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("@kong/icons")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","@kong/icons"],t):(m=typeof globalThis<"u"?globalThis:m||self,t(m["kong-ui-public-page-layout"]={},m.Vue,m.VueRouter,m["kong-ui-public-i18n"],m.KongIcons))})(this,function(m,t,_,S,T){"use strict";const K={back_button:"Go back",favorite_button:{save_shortcut:"Save page to shortcuts",remove_shortcut:"Remove page from shortcuts"},tabs:{more_button:{label:"More",aria_label:"More tabs"}}};function x(){const e=S.createI18n("en-us",K);return{i18n:e,i18nT:S.i18nTComponent(e)}}const V={useI18n:x},E="16px",L="16px";function P(e,a){return t.getCurrentScope()?(t.onScopeDispose(e,a),!0):!1}const R=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const M=R?window:void 0;function N(e){var a;const n=t.toValue(e);return(a=n==null?void 0:n.$el)!==null&&a!==void 0?a:n}function z(){const e=t.shallowRef(!1),a=t.getCurrentInstance();return a&&t.onMounted(()=>{e.value=!0},a),e}function F(e){const a=z();return t.computed(()=>(a.value,!!e()))}function O(e,a,n={}){const{window:s=M,...f}=n;let r;const b=F(()=>s&&"ResizeObserver"in s),k=()=>{r&&(r.disconnect(),r=void 0)},l=t.watch(t.computed(()=>{const d=t.toValue(e);return Array.isArray(d)?d.map(u=>N(u)):[N(d)]}),d=>{if(k(),b.value&&s){r=new ResizeObserver(a);for(const u of d)u&&r.observe(u,f)}},{immediate:!0,flush:"post"}),c=()=>{k(),l()};return P(c),{isSupported:b,stop:c}}const A={ref:"page-layout-tabs",class:"page-layout-tabs","data-testid":"page-layout-tabs"},j={key:0},W=["aria-label"],G={class:"overflowing-items-count"},q={key:0,class:"layout-loader-container"},U=t.defineComponent({__name:"PageLayoutTabs",props:{tabs:{default:()=>[]}},setup(e){t.useCssVars(p=>({db98251e:t.unref(r)}));const{i18n:{t:a}}=V.useI18n(),n=_.useRouter(),s=t.inject("app:navigateTo",null),f=p=>{if(typeof p.to!="string"){n.push(p.to);return}if(typeof s!="function"){window.location.href=p.to;return}s(p.to)},r=L,b=t.useTemplateRef("page-layout-tabs"),k=t.useTemplateRef("page-layout-tabs-list"),l=t.ref(e.tabs.length),c=t.ref(!1),d=t.computed(()=>e.tabs.slice(0,l.value)),u=t.computed(()=>e.tabs.slice(l.value)),g=async()=>{var w,B,o;if(!b.value||!k.value)return;c.value=!1,l.value=e.tabs.length,await t.nextTick();const p=((w=b.value)==null?void 0:w.getBoundingClientRect().width)-parseInt(r)*2;let i=(B=k.value)==null?void 0:B.getBoundingClientRect().width;if(!p||!i){c.value=!0;return}const C=50;for(;i+C>p&&l.value>1;)l.value--,await t.nextTick(),i=((o=k.value)==null?void 0:o.getBoundingClientRect().width)||0;c.value=!0};let y=null;const h=()=>{y&&clearTimeout(y),y=setTimeout(()=>{g()},150)};return t.onMounted(()=>{g(),O(b,h)}),t.onBeforeUnmount(()=>{y&&clearTimeout(y)}),t.watch(()=>e.tabs,()=>{g()},{deep:!0}),(p,i)=>{const C=t.resolveComponent("KDropdownItem"),w=t.resolveComponent("KDropdown"),B=t.resolveComponent("KSkeletonBox");return t.openBlock(),t.createElementBlock("nav",A,[t.createElementVNode("ul",{ref:"page-layout-tabs-list",class:t.normalizeClass({"layout-computing":!c.value})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,o=>(t.openBlock(),t.createElementBlock("li",{key:`${o.key}-tab`},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(typeof o.to=="string"?"a":"router-link"),t.mergeProps({ref_for:!0},typeof o.to=="string"?{href:o.to}:{to:o.to},{"aria-current":o.active?"page":void 0,class:["tab-link",{active:o.active}],"data-testid":o.dataTestId?o.dataTestId:`page-layout-tab-${o.key}`,tabindex:"0",onClick:t.withModifiers($=>f(o),["prevent"]),onKeydown:[t.withKeys(t.withModifiers($=>f(o),["prevent"]),["enter"]),t.withKeys(t.withModifiers($=>f(o),["prevent"]),["space"])]}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.label),1)]),_:2},1040,["aria-current","class","data-testid","onClick","onKeydown"]))]))),128)),e.tabs.length>l.value?(t.openBlock(),t.createElementBlock("li",j,[t.createVNode(w,{"kpop-attributes":{placement:"bottom-end",popoverElementAttributes:{"data-testid":"tabs-overflow-dropdown-popover"}}},{items:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,o=>(t.openBlock(),t.createBlock(C,{key:`${o.key}-dropdown-item`,"aria-current":o.active?"page":void 0,"data-testid":o.dataTestId?o.dataTestId:`page-layout-tab-${o.key}`,item:{label:o.label,value:o.key,to:o.to},selected:o.active},null,8,["aria-current","data-testid","item","selected"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("button",{"aria-label":t.unref(a)("tabs.more_button.aria_label"),class:t.normalizeClass(["tab-link overflow-dropdown-trigger",{active:u.value.find(o=>o.active)}]),"data-testid":"tabs-overflow-dropdown-button"},[t.createTextVNode(t.toDisplayString(t.unref(a)("tabs.more_button.label"))+" ",1),t.createElementVNode("span",G,t.toDisplayString(e.tabs.length-l.value),1)],10,W)]),_:1})])):t.createCommentVNode("",!0)],2),c.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",q,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,o=>t.createVNode(B,{key:`layout-loader-${o}`,height:"1",width:"5"})),64))]))],512)}}}),I=(e,a)=>{const n=e.__vccOpts||e;for(const[s,f]of a)n[s]=f;return n},Z=I(U,[["__scopeId","data-v-b3139545"]]),D=Symbol("nested-page-layout-detection"),H={class:"kong-ui-public-page-layout","data-testid":"kong-ui-public-page-layout"},J={key:0,class:"page-layout-header","data-testid":"page-layout-header"},Q={class:"page-header-container"},X={class:"page-header-start"},Y={class:"title-container"},v={key:1,class:"page-layout-title","data-testid":"page-layout-title"},tt={key:2,class:"favorite-button-container"},et=["aria-label"],ot={key:3,class:"title-after-container"},nt={key:0,class:"page-header-actions-container"},at=I(t.defineComponent({__name:"PageLayout",props:{breadcrumbs:{default:()=>[]},title:{},backTo:{},tabs:{default:()=>[]},pageShortcutData:{}},setup(e){const a=t.inject("app:navigateTo",null),n=t.inject("app:pageShortcutsContext",null),{i18n:{t:s}}=V.useI18n(),f=_.useRouter(),r=t.computed(()=>!!(e.tabs&&e.tabs.length)),b=t.computed(()=>typeof e.backTo=="string"),k=t.computed(()=>!!e.pageShortcutData&&!!e.pageShortcutData.entityType&&!!e.pageShortcutData.path&&!!e.pageShortcutData.label),l=t.computed(()=>k.value&&!!n&&"onFavoriteToggle"in n&&typeof n.onFavoriteToggle=="function"),c=t.computed(()=>!!n&&"isFavorite"in n&&n.isFavorite===!0),d=async()=>{if(e.backTo){if(typeof e.backTo=="object"){f.push(e.backTo);return}if(typeof a!="function"){window.location.href=e.backTo;return}await a(e.backTo)}},u=t.ref(0),g=t.computed(()=>u.value>0);t.provide(D,()=>(u.value++,()=>{u.value--}));const y=t.inject(D,null),h=t.ref(null);typeof y=="function"&&(h.value=y());const p=()=>{n.onFavoriteToggle()};return t.onUnmounted(()=>{var i;(i=h.value)==null||i.call(h)}),t.watch(()=>e.pageShortcutData,async i=>{await t.nextTick(),!g.value&&k.value&&n&&"onEntityPageVisit"in n&&typeof n.onEntityPageVisit=="function"&&n.onEntityPageVisit(i)},{immediate:!0,deep:!0}),(i,C)=>{const w=t.resolveComponent("KBreadcrumbs"),B=t.resolveComponent("router-view");return t.openBlock(),t.createElementBlock("div",H,[g.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",J,[t.createElementVNode("div",Q,[t.createElementVNode("div",X,[e.breadcrumbs&&e.breadcrumbs.length?(t.openBlock(),t.createBlock(w,{key:0,class:"header-breadcrumbs","data-testid":"page-layout-breadcrumbs","item-max-width":"25ch",items:e.breadcrumbs},null,8,["items"])):t.createCommentVNode("",!0),t.createElementVNode("div",Y,[e.backTo?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(b.value?"a":"router-link"),t.mergeProps({key:0},b.value?{href:e.backTo}:{to:e.backTo},{"aria-label":t.unref(s)("back_button"),class:"navigate-back","data-testid":"page-layout-navigate-back",tabindex:"0",onClick:t.withModifiers(d,["prevent"]),onKeydown:[t.withKeys(t.withModifiers(d,["prevent"]),["enter"]),t.withKeys(t.withModifiers(d,["prevent"]),["space"])]}),{default:t.withCtx(()=>[t.createVNode(t.unref(T.ArrowTopLeftIcon),{decorative:"",size:t.unref(E)},null,8,["size"])]),_:1},16,["aria-label","onKeydown"])):t.createCommentVNode("",!0),e.title?(t.openBlock(),t.createElementBlock("h1",v,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),l.value?(t.openBlock(),t.createElementBlock("div",tt,[t.createElementVNode("button",{"aria-label":c.value?t.unref(s)("favorite_button.remove_shortcut"):t.unref(s)("favorite_button.save_shortcut"),class:t.normalizeClass(["favorite-button",{active:c.value}]),"data-testid":"page-layout-favorite-button",type:"button",onClick:p},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(c.value?t.unref(T.StarFillIcon):t.unref(T.StarIcon)),{decorative:"",size:t.unref(E)},null,8,["size"]))],10,et)])):t.createCommentVNode("",!0),i.$slots["title-after"]?(t.openBlock(),t.createElementBlock("div",ot,[t.renderSlot(i.$slots,"title-after",{},void 0,!0)])):t.createCommentVNode("",!0)])]),i.$slots.actions?(t.openBlock(),t.createElementBlock("div",nt,[t.renderSlot(i.$slots,"actions",{},void 0,!0)])):t.createCommentVNode("",!0)]),r.value?(t.openBlock(),t.createBlock(Z,{key:0,tabs:e.tabs},null,8,["tabs"])):t.createCommentVNode("",!0)])),t.createElementVNode("div",{class:t.normalizeClass(["page-layout-content",{"has-nested-page-layout":g.value}])},[r.value?(t.openBlock(),t.createBlock(B,{key:0})):t.renderSlot(i.$slots,"default",{key:1},void 0,!0)],2)])}}}),[["__scopeId","data-v-59aa4312"]]);m.PageLayout=at,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.page-layout-tabs[data-v-b3139545]{align-items:flex-end;border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);box-sizing:border-box;display:flex;height:34px;overflow-x:clip;padding:0px var(--db98251e);padding:var(--kui-space-0, 0px) var(--db98251e);position:relative;width:100%}.page-layout-tabs a[data-v-b3139545],.page-layout-tabs button[data-v-b3139545]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);border:none;color:inherit;cursor:pointer;outline:none;padding:0;padding:var(--kui-space-0, 0px);text-decoration:none}.page-layout-tabs ul[data-v-b3139545]{display:flex;gap:20px;gap:var(--kui-space-70, 20px);list-style:none;margin:0;margin:var(--kui-space-0, 0px);margin-bottom:-1px;margin-bottom:calc(-1 * var(--kui-border-width-10, 1px));max-width:100%;padding:0;padding:var(--kui-space-0, 0px)}.page-layout-tabs ul.layout-computing[data-v-b3139545]{height:0;visibility:hidden}.page-layout-tabs ul li[data-v-b3139545]{display:flex}.page-layout-tabs ul li .tab-link[data-v-b3139545]{align-items:center;border-bottom:2px solid transparent;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-transparent, transparent);border-radius:4px 4px 0 0;border-radius:var(--kui-border-radius-20, 4px) var(--kui-border-radius-20, 4px) var(--kui-border-radius-0, 0px) var(--kui-border-radius-0, 0px);color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e);cursor:pointer;display:flex;font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);gap:6px;gap:var(--kui-space-30, 6px);line-height:20px;line-height:var(--kui-line-height-30, 20px);padding:6px 0;padding:var(--kui-space-30, 6px) var(--kui-space-0, 0px);transition:color .2s ease-in,border-color .2s ease-in,font-weight .2s ease-in;white-space:nowrap}.page-layout-tabs ul li .tab-link[data-v-b3139545]:hover{border-bottom:2px solid #afb7c5;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-neutral-weak, #afb7c5);color:#000933;color:var(--kui-color-text, #000933)}.page-layout-tabs ul li .tab-link[data-v-b3139545]:focus-visible{box-shadow:0 0 0 4px #0044f433;box-shadow:var(--kui-shadow-focus, 0px 0px 0px 4px rgba(0, 68, 244, .2))}.page-layout-tabs ul li .tab-link.active[data-v-b3139545]{border-bottom:2px solid #0044f4;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-primary, #0044f4);color:#0044f4!important;color:var(--kui-color-text-primary, #0044f4)!important;font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.page-layout-tabs ul li .tab-link.overflow-dropdown-trigger[data-v-b3139545]{color:#000933;color:var(--kui-color-text, #000933);font-weight:500!important;font-weight:var(--kui-font-weight-medium, 500)!important}.page-layout-tabs ul li .tab-link.overflow-dropdown-trigger .overflowing-items-count[data-v-b3139545]{background-color:#e0e4ea;background-color:var(--kui-color-background-neutral-weaker, #e0e4ea);border-radius:100px;border-radius:var(--kui-border-radius-round, 100px);color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e);font-size:11px;font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);line-height:12px;padding:2px 6px;padding:var(--kui-space-10, 2px) var(--kui-space-30, 6px)}.page-layout-tabs ul li .tab-link.overflow-dropdown-trigger.active .overflowing-items-count[data-v-b3139545]{background-color:#eefaff;background-color:var(--kui-color-background-primary-weakest, #eefaff);color:#0044f4;color:var(--kui-color-text-primary, #0044f4)}.page-layout-tabs .layout-loader-container[data-v-b3139545]{align-items:center;display:flex;gap:20px;gap:var(--kui-space-70, 20px);height:34px;top:0;right:0;bottom:0;left:0;left:var(--db98251e);position:absolute}.kong-ui-public-page-layout[data-v-59aa4312]{box-sizing:border-box;font-family:Inter,Roboto,Helvetica,sans-serif;font-family:var(--kui-font-family-text, "Inter", Roboto, Helvetica, sans-serif)}.kong-ui-public-page-layout .page-layout-header[data-v-59aa4312]{display:flex;flex-direction:column;gap:8px;gap:var(--kui-space-40, 8px)}.kong-ui-public-page-layout .page-layout-header .page-header-container[data-v-59aa4312]{align-items:flex-end;display:flex;gap:6px;gap:var(--kui-space-30, 6px);justify-content:space-between;padding:16px 16px 0;padding:var(--kui-space-60, 16px) var(--kui-space-60, 16px) var(--kui-space-0, 0px) var(--kui-space-60, 16px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .header-breadcrumbs[data-v-59aa4312] .breadcrumbs-item-container:first-child .breadcrumbs-item{padding-left:0;padding-left:var(--kui-space-0, 0px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .header-breadcrumbs[data-v-59aa4312] .breadcrumbs-item-container .breadcrumbs-item.active .breadcrumbs-text{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container[data-v-59aa4312]{align-items:flex-end;display:flex;gap:4px;gap:var(--kui-space-20, 4px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .navigate-back[data-v-59aa4312],.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button[data-v-59aa4312]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);border:none;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);cursor:pointer;outline:none;padding:4px;padding:var(--kui-space-20, 4px);transition:background-color .2s ease-in,color .2s ease-in}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .navigate-back[data-v-59aa4312]:hover,.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button[data-v-59aa4312]:hover{color:#000933;color:var(--kui-color-text, #000933)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .navigate-back[data-v-59aa4312]:focus-visible,.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button[data-v-59aa4312]:focus-visible{box-shadow:0 0 0 4px #0044f433;box-shadow:var(--kui-shadow-focus, 0px 0px 0px 4px rgba(0, 68, 244, .2))}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .page-layout-title[data-v-59aa4312]{color:#000933;color:var(--kui-color-text, #000933);font-size:18px;font-size:var(--kui-font-size-50, 18px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);line-height:24px;line-height:var(--kui-line-height-40, 24px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button-container[data-v-59aa4312]{align-self:center;margin-left:4px;margin-left:var(--kui-space-20, 4px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button-container .favorite-button[data-v-59aa4312]{color:#afb7c5;color:var(--kui-color-text-neutral-weak, #afb7c5);padding:0;padding:var(--kui-space-0, 0px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button-container .favorite-button[data-v-59aa4312]:hover{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button-container .favorite-button.active[data-v-59aa4312]{color:#ffc400;color:var(--kui-color-text-warning-weak, #ffc400)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .title-after-container[data-v-59aa4312]{align-items:flex-end;display:flex;gap:6px;gap:var(--kui-space-30, 6px);margin-left:4px;margin-left:var(--kui-space-20, 4px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-actions-container[data-v-59aa4312]{align-items:center;display:flex;gap:6px;gap:var(--kui-space-30, 6px)}.kong-ui-public-page-layout .page-layout-header:not(:has(.page-layout-tabs)) .page-header-container[data-v-59aa4312]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);padding:16px;padding:var(--kui-space-60, 16px)}.kong-ui-public-page-layout .page-layout-content[data-v-59aa4312]{display:flex;flex-direction:column;gap:12px;gap:var(--kui-space-50, 12px);padding:16px;padding:var(--kui-space-60, 16px)}.kong-ui-public-page-layout .page-layout-content.has-nested-page-layout[data-v-59aa4312]{padding:0;padding:var(--kui-space-0, 0px)}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { PageLayoutProps, PageLayoutSlots } from '../types';
|
|
2
|
-
type __VLS_Slots = PageLayoutSlots;
|
|
3
|
-
declare const __VLS_base: import("vue").DefineComponent<PageLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageLayoutProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
7
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
-
new (): {
|
|
9
|
-
$slots: S;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=PageLayout.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PageLayout.vue"],"names":[],"mappings":"AAgVA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAkBhE,KAAK,WAAW,GAAG,eAAe,CAAC;AAmUnC,QAAA,MAAM,UAAU,0SAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { PageLayoutTabsProps } from '../types';
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<PageLayoutTabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageLayoutTabsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
declare const _default: typeof __VLS_export;
|
|
4
|
-
export default _default;
|
|
5
|
-
//# sourceMappingURL=PageLayoutTabs.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageLayoutTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PageLayoutTabs.vue"],"names":[],"mappings":"AAkTA,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,UAAU,CAAA;AAgUlE,QAAA,MAAM,YAAY,kTAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;;;;AAE/B,wBAEC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createI18n, i18nTComponent } from '@kong-ui-public/i18n';
|
|
2
|
-
import english from '../locales/en.json';
|
|
3
|
-
interface UseI18nReturn {
|
|
4
|
-
i18n: ReturnType<typeof createI18n<typeof english>>;
|
|
5
|
-
i18nT: ReturnType<typeof i18nTComponent<typeof english>>;
|
|
6
|
-
}
|
|
7
|
-
export default function useI18n(): UseI18nReturn;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/composables/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,IAAI,aAAa,CAO/C"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,6BAA6B,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,CAAA;AAErB,cAAc,SAAS,CAAA"}
|
package/dist/types/symbols.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../src/symbols.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,eAAyC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
-
export interface PageLayoutTab {
|
|
3
|
-
/** The unique kebab-case key of the tab */
|
|
4
|
-
key: string;
|
|
5
|
-
/** The display text of the navbar tab */
|
|
6
|
-
label: string;
|
|
7
|
-
/** The [Vue Router `to` object](https://router.vuejs.org/api/interfaces/RouterLinkProps.html#to) or a URL path (relative or absolute) to navigate to on click */
|
|
8
|
-
to: string | RouteLocationRaw;
|
|
9
|
-
/** Is the navbar tab active */
|
|
10
|
-
active?: boolean;
|
|
11
|
-
/** The data-testid attribute to apply to the navbar tab. Auto-generated if not provided */
|
|
12
|
-
dataTestId?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface PageLayoutTabsProps {
|
|
15
|
-
tabs?: PageLayoutTab[];
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=page-layout-tabs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-layout-tabs.d.ts","sourceRoot":"","sources":["../../../src/types/page-layout-tabs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,iKAAiK;IACjK,EAAE,EAAE,MAAM,GAAG,gBAAgB,CAAA;IAC7B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2FAA2F;IAC3F,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAA;CACvB"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { BreadcrumbItem } from '@kong/kongponents';
|
|
2
|
-
import type { PageLayoutTab } from './';
|
|
3
|
-
import type { RouteLocationRaw } from 'vue-router';
|
|
4
|
-
export interface PageShortcutData {
|
|
5
|
-
/** The display label of the page shortcut */
|
|
6
|
-
label: string;
|
|
7
|
-
/** The URL path of the page shortcut */
|
|
8
|
-
path: string;
|
|
9
|
-
/** The entity type of the page shortcut (snake_case, e.g. "gateway_service") */
|
|
10
|
-
entityType: string;
|
|
11
|
-
/** The display label of the parent entity */
|
|
12
|
-
parentLabel?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface PageLayoutProps {
|
|
15
|
-
/** Breadcrumb items */
|
|
16
|
-
breadcrumbs?: BreadcrumbItem[];
|
|
17
|
-
/** Page title */
|
|
18
|
-
title: string;
|
|
19
|
-
/** The URL to navigate back to when the back button is clicked */
|
|
20
|
-
backTo?: string | RouteLocationRaw;
|
|
21
|
-
/** Tabs */
|
|
22
|
-
tabs?: PageLayoutTab[];
|
|
23
|
-
/** Providing this prop "marks" the current page as an entity page that can be added to shortcuts (favorites and recents) */
|
|
24
|
-
pageShortcutData?: PageShortcutData;
|
|
25
|
-
}
|
|
26
|
-
export interface PageLayoutSlots {
|
|
27
|
-
/**
|
|
28
|
-
* Default slot for page content
|
|
29
|
-
*/
|
|
30
|
-
default?(): any;
|
|
31
|
-
/**
|
|
32
|
-
* Actions slot for page actions
|
|
33
|
-
*/
|
|
34
|
-
actions?(): any;
|
|
35
|
-
/**
|
|
36
|
-
* Title after slot for page title after content
|
|
37
|
-
*/
|
|
38
|
-
'title-after'(): any;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=page-layout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-layout.d.ts","sourceRoot":"","sources":["../../../src/types/page-layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAA;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,gFAAgF;IAChF,UAAU,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,uBAAuB;IACvB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAA;IAC9B,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAA;IAClC,WAAW;IACX,IAAI,CAAC,EAAE,aAAa,EAAE,CAAA;IACtB,4HAA4H;IAC5H,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,CAAC,IAAI,GAAG,CAAA;IACf;;OAEG;IACH,OAAO,CAAC,IAAI,GAAG,CAAA;IACf;;OAEG;IACH,aAAa,IAAI,GAAG,CAAA;CACrB"}
|