@kong-ui-public/entities-key-sets 3.14.2-pr.3869.e876c8c8a.0 → 3.14.2
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/entities-key-sets.es.js +578 -0
- package/dist/entities-key-sets.umd.js +1 -0
- package/dist/style.css +1 -0
- package/dist/types/components/KeySetConfigCard.vue.d.ts +63 -0
- package/dist/types/components/KeySetConfigCard.vue.d.ts.map +1 -0
- package/dist/types/components/KeySetForm.vue.d.ts +44 -0
- package/dist/types/components/KeySetForm.vue.d.ts.map +1 -0
- package/dist/types/components/KeySetList.vue.d.ts +107 -0
- package/dist/types/components/KeySetList.vue.d.ts.map +1 -0
- package/dist/types/composables/index.d.ts +6 -0
- package/dist/types/composables/index.d.ts.map +1 -0
- package/dist/types/composables/useI18n.d.ts +9 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/key-sets-endpoints.d.ts +18 -0
- package/dist/types/key-sets-endpoints.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/key-set-config-card.d.ts +15 -0
- package/dist/types/types/key-set-config-card.d.ts.map +1 -0
- package/dist/types/types/key-set-form.d.ts +25 -0
- package/dist/types/types/key-set-form.d.ts.map +1 -0
- package/dist/types/types/key-set-list.d.ts +33 -0
- package/dist/types/types/key-set-list.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
import { defineComponent as W, computed as m, ref as b, watch as we, onBeforeMount as Ee, resolveComponent as $, openBlock as M, createElementBlock as z, createVNode as s, unref as t, createSlots as Z, withCtx as i, createTextVNode as C, toDisplayString as h, createElementVNode as ee, createBlock as J, Teleport as $e, createCommentVNode as te, reactive as ae } from "vue";
|
|
2
|
+
import { BookIcon as ne, AddIcon as oe, KeyIcon as Me } from "@kong/icons";
|
|
3
|
+
import { useRouter as ie } from "vue-router";
|
|
4
|
+
import { createI18n as Ke, i18nTComponent as Fe } from "@kong-ui-public/i18n";
|
|
5
|
+
import { useAxios as re, useTableState as De, useManagedByColumn as Re, useFetcher as Be, useDeleteUrlBuilder as Te, FetcherStatus as Ve, EntityBaseTable as xe, PermissionsWrapper as O, getManagedByLabel as Oe, TableTags as Pe, EntityFilter as qe, EntityDeleteModal as Ne, EntityTypes as Ue, useErrors as je, EntityBaseFormType as se, EntityBaseForm as Ae, SupportedEntityType as le, EntityFormSection as Le, EntityBaseConfigCard as Je } from "@kong-ui-public/entities-shared";
|
|
6
|
+
const Ge = { title: "Key sets", list: { toolbar_actions: { new_key_set: "New key set" }, table_headers: { name: "Name", id: "ID", tags: "Tags" }, empty_state: { title: "Configure a new key set", description: "A key set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose." }, empty_state_v2: { title: "Configure your first key set", group: "Key sets created in gateways within this group will automatically appear here.", description: "Key sets centrally manage asymmetric keys for plugins like OpenID Connect and JWT, simplifying configuration and security across services.", create_cta: "New key set", learn_more: "Learn more" } }, actions: { create: "New key set", copy_id: "Copy ID", copy_json: "Copy JSON", edit: "Edit", delete: "Delete", clear: "Clear", view: "View details" }, search: { placeholder: "Filter by exact name or ID" }, delete: { title: "Delete a key set", description: "Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting." }, errors: { general: "Key sets could not be retrieved", delete: "The key set could not be deleted at this time.", copy: "Failed to copy to clipboard" }, copy: { success: "Copied {val} to clipboard", success_brief: "Successfully copied to clipboard" }, form: { sections: { general: { title: "General information", description: "General information will help identify and manage this key set." } }, fields: { name: { label: "Name", placeholder: "Enter a unique name for this key set" }, tags: { label: "Tags", placeholder: "Enter a list of tags separated by comma", help: "e.g. tag1, tag2, tag3", tooltip: "An optional set of strings for grouping and filtering, separated by commas." } } } }, He = {
|
|
7
|
+
keySets: Ge
|
|
8
|
+
};
|
|
9
|
+
function We() {
|
|
10
|
+
const e = Ke("en-us", He);
|
|
11
|
+
return {
|
|
12
|
+
i18n: e,
|
|
13
|
+
i18nT: Fe(e)
|
|
14
|
+
// Translation component <i18n-t>
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const Q = {
|
|
18
|
+
useI18n: We
|
|
19
|
+
}, G = "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}", H = "/{workspace}", P = {
|
|
20
|
+
list: {
|
|
21
|
+
konnect: `${G}/key-sets`,
|
|
22
|
+
kongManager: `${H}/key-sets`
|
|
23
|
+
},
|
|
24
|
+
form: {
|
|
25
|
+
konnect: {
|
|
26
|
+
create: `${G}/key-sets`,
|
|
27
|
+
edit: `${G}/key-sets/{id}`
|
|
28
|
+
},
|
|
29
|
+
kongManager: {
|
|
30
|
+
create: `${H}/key-sets`,
|
|
31
|
+
edit: `${H}/key-sets/{id}`
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}, ze = { class: "kong-ui-entities-key-sets-list" }, Qe = { class: "button-row" }, Xe = /* @__PURE__ */ W({
|
|
35
|
+
__name: "KeySetList",
|
|
36
|
+
props: {
|
|
37
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
38
|
+
config: {
|
|
39
|
+
type: Object,
|
|
40
|
+
required: !0,
|
|
41
|
+
validator: (e) => !(!e || !["konnect", "kongManager"].includes(e?.app) || !e.createRoute || !e.getViewRoute || !e.getEditRoute || e.app === "kongManager" && !e.isExactMatch && !e.filterSchema)
|
|
42
|
+
},
|
|
43
|
+
// used to override the default identifier for the cache entry
|
|
44
|
+
cacheIdentifier: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: ""
|
|
47
|
+
},
|
|
48
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
|
|
49
|
+
canCreate: {
|
|
50
|
+
type: Function,
|
|
51
|
+
required: !1,
|
|
52
|
+
default: async () => !0
|
|
53
|
+
},
|
|
54
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
|
|
55
|
+
canDelete: {
|
|
56
|
+
type: Function,
|
|
57
|
+
required: !1,
|
|
58
|
+
default: async () => !0
|
|
59
|
+
},
|
|
60
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
|
|
61
|
+
canEdit: {
|
|
62
|
+
type: Function,
|
|
63
|
+
required: !1,
|
|
64
|
+
default: async () => !0
|
|
65
|
+
},
|
|
66
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can retrieve (view details) a given entity */
|
|
67
|
+
canRetrieve: {
|
|
68
|
+
type: Function,
|
|
69
|
+
required: !1,
|
|
70
|
+
default: async () => !0
|
|
71
|
+
},
|
|
72
|
+
/** default to false, setting to true will teleport the toolbar button to the destination in the consuming app */
|
|
73
|
+
useActionOutside: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: !1
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
79
|
+
setup(e, { emit: _ }) {
|
|
80
|
+
const u = _, a = e, { i18n: { t: o } } = Q.useI18n(), f = ie(), { axiosInstance: g } = re(a.config?.axiosRequestConfig), { hasRecords: p, handleStateChange: q } = De(() => k.value), K = m(() => p.value && a.config.app === "konnect"), l = m(() => a.config.app !== "kongManager" || !!a.config.disableSorting), w = {
|
|
81
|
+
// the Name column is non-hidable
|
|
82
|
+
name: { label: o("keySets.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
83
|
+
tags: { label: o("keySets.list.table_headers.tags") },
|
|
84
|
+
id: { label: o("keySets.list.table_headers.id"), sortable: !0 }
|
|
85
|
+
}, { defaultTablePreferences: N, tableHeaders: U } = Re(w), D = m(() => {
|
|
86
|
+
let n = `${a.config.apiBaseUrl}${P.list[a.config.app]}`;
|
|
87
|
+
return a.config.app === "konnect" && (n = n.replace(/{controlPlaneId}/gi, a.config?.controlPlaneId || "")), n.replace(/\/{workspace}/gi, a.config?.workspace ? `/${a.config.workspace}` : "");
|
|
88
|
+
}), k = b(""), E = m(() => {
|
|
89
|
+
const n = a.config.app === "konnect" || a.config.isExactMatch;
|
|
90
|
+
if (n)
|
|
91
|
+
return {
|
|
92
|
+
isExactMatch: n,
|
|
93
|
+
placeholder: o("keySets.search.placeholder")
|
|
94
|
+
};
|
|
95
|
+
const d = { name: w.name };
|
|
96
|
+
return {
|
|
97
|
+
isExactMatch: n,
|
|
98
|
+
fields: d,
|
|
99
|
+
schema: a.config.filterSchema
|
|
100
|
+
};
|
|
101
|
+
}), {
|
|
102
|
+
fetcher: j,
|
|
103
|
+
fetcherState: r,
|
|
104
|
+
fetcherCacheKey: y
|
|
105
|
+
} = Be(m(() => ({ ...a.config, cacheIdentifier: a.cacheIdentifier })), D), R = () => {
|
|
106
|
+
k.value = "";
|
|
107
|
+
}, v = () => {
|
|
108
|
+
y.value++;
|
|
109
|
+
}, B = b(null), de = async (n, d) => {
|
|
110
|
+
const S = n.id;
|
|
111
|
+
if (!await d(S)) {
|
|
112
|
+
ye(n, "id");
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
fe(n, "id");
|
|
116
|
+
}, ue = async (n, d) => {
|
|
117
|
+
const S = JSON.stringify(n);
|
|
118
|
+
if (!await d(S)) {
|
|
119
|
+
u("copy:error", {
|
|
120
|
+
entity: n,
|
|
121
|
+
message: o("keySets.errors.copy")
|
|
122
|
+
});
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
u("copy:success", {
|
|
126
|
+
entity: n,
|
|
127
|
+
message: o("keySets.copy.success_brief")
|
|
128
|
+
});
|
|
129
|
+
}, fe = (n, d) => {
|
|
130
|
+
u("copy:success", {
|
|
131
|
+
entity: n,
|
|
132
|
+
field: d,
|
|
133
|
+
message: o("keySets.copy.success", { val: n[d] })
|
|
134
|
+
});
|
|
135
|
+
}, ye = (n, d) => {
|
|
136
|
+
u("copy:error", {
|
|
137
|
+
entity: n,
|
|
138
|
+
field: d,
|
|
139
|
+
message: o("keySets.errors.copy")
|
|
140
|
+
});
|
|
141
|
+
}, pe = async (n) => {
|
|
142
|
+
await a.canRetrieve?.(n) && f.push(a.config.getViewRoute(n.id));
|
|
143
|
+
}, me = (n) => ({
|
|
144
|
+
label: o("keySets.actions.view"),
|
|
145
|
+
to: a.config.getViewRoute(n)
|
|
146
|
+
}), ge = (n) => ({
|
|
147
|
+
label: o("keySets.actions.edit"),
|
|
148
|
+
to: a.config.getEditRoute(n)
|
|
149
|
+
}), I = b(void 0), T = b(!1), V = b(!1), X = b(""), ke = Te(a.config, D.value), ve = (n) => {
|
|
150
|
+
I.value = n, T.value = !0;
|
|
151
|
+
}, he = () => {
|
|
152
|
+
T.value = !1;
|
|
153
|
+
}, be = async () => {
|
|
154
|
+
if (I.value?.id) {
|
|
155
|
+
V.value = !0;
|
|
156
|
+
try {
|
|
157
|
+
await g.delete(ke(I.value.id)), V.value = !1, T.value = !1, y.value++, u("delete:success", I.value);
|
|
158
|
+
} catch (n) {
|
|
159
|
+
X.value = n.response?.data?.message || n.message || o("keySets.errors.delete"), u("error", n);
|
|
160
|
+
} finally {
|
|
161
|
+
V.value = !1;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}, Se = () => {
|
|
165
|
+
f.push(a.config.createRoute);
|
|
166
|
+
};
|
|
167
|
+
we(r, (n) => {
|
|
168
|
+
if (n.status === Ve.Error) {
|
|
169
|
+
B.value = {
|
|
170
|
+
title: o("keySets.errors.general")
|
|
171
|
+
}, n.error?.response?.data?.message && (B.value.message = n.error.response.data.message), u("error", n.error);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
B.value = null;
|
|
175
|
+
});
|
|
176
|
+
const A = b({
|
|
177
|
+
ctaPath: a.config.createRoute,
|
|
178
|
+
ctaText: void 0,
|
|
179
|
+
message: `${o("keySets.list.empty_state.description")}${a.config.additionMessageForEmptyState ? ` ${a.config.additionMessageForEmptyState}` : ""}`,
|
|
180
|
+
title: o("keySets.title")
|
|
181
|
+
}), L = b(!1);
|
|
182
|
+
return Ee(async () => {
|
|
183
|
+
L.value = await a.canCreate(), L.value && (A.value.title = o("keySets.list.empty_state.title"), A.value.ctaText = o("keySets.actions.create"));
|
|
184
|
+
}), (n, d) => {
|
|
185
|
+
const S = $("KButton"), Ce = $("KEmptyState"), _e = $("KCopy"), F = $("KDropdownItem"), Y = $("KClipboardProvider");
|
|
186
|
+
return M(), z("div", ze, [
|
|
187
|
+
s(t(xe), {
|
|
188
|
+
"cache-identifier": e.cacheIdentifier,
|
|
189
|
+
"default-table-preferences": t(N),
|
|
190
|
+
"disable-sorting": l.value,
|
|
191
|
+
"empty-state-options": A.value,
|
|
192
|
+
"enable-entity-actions": "",
|
|
193
|
+
"error-message": B.value,
|
|
194
|
+
fetcher: t(j),
|
|
195
|
+
"fetcher-cache-key": t(y),
|
|
196
|
+
"pagination-type": "offset",
|
|
197
|
+
"preferences-storage-key": "kong-ui-entities-key-sets-list",
|
|
198
|
+
query: k.value,
|
|
199
|
+
"table-headers": t(U),
|
|
200
|
+
onClearSearchInput: R,
|
|
201
|
+
"onClick:row": d[3] || (d[3] = (c) => pe(c)),
|
|
202
|
+
onSort: v,
|
|
203
|
+
onState: t(q)
|
|
204
|
+
}, Z({
|
|
205
|
+
"toolbar-filter": i(() => [
|
|
206
|
+
s(t(qe), {
|
|
207
|
+
modelValue: k.value,
|
|
208
|
+
"onUpdate:modelValue": d[0] || (d[0] = (c) => k.value = c),
|
|
209
|
+
config: E.value
|
|
210
|
+
}, null, 8, ["modelValue", "config"])
|
|
211
|
+
]),
|
|
212
|
+
"toolbar-button": i(() => [
|
|
213
|
+
(M(), J($e, {
|
|
214
|
+
disabled: !e.useActionOutside,
|
|
215
|
+
to: "#kong-ui-app-page-header-action-button"
|
|
216
|
+
}, [
|
|
217
|
+
ee("div", Qe, [
|
|
218
|
+
K.value ? (M(), J(S, {
|
|
219
|
+
key: 0,
|
|
220
|
+
appearance: "secondary",
|
|
221
|
+
class: "open-learning-hub",
|
|
222
|
+
"data-testid": "keys-set-learn-more-button",
|
|
223
|
+
icon: "",
|
|
224
|
+
onClick: d[1] || (d[1] = (c) => n.$emit("click:learn-more"))
|
|
225
|
+
}, {
|
|
226
|
+
default: i(() => [
|
|
227
|
+
s(t(ne), { decorative: "" })
|
|
228
|
+
]),
|
|
229
|
+
_: 1
|
|
230
|
+
})) : te("", !0),
|
|
231
|
+
s(t(O), {
|
|
232
|
+
"auth-function": () => e.canCreate()
|
|
233
|
+
}, {
|
|
234
|
+
default: i(() => [
|
|
235
|
+
s(S, {
|
|
236
|
+
appearance: "primary",
|
|
237
|
+
"data-testid": "toolbar-add-key-set",
|
|
238
|
+
size: e.useActionOutside ? "medium" : "large",
|
|
239
|
+
to: e.config.createRoute
|
|
240
|
+
}, {
|
|
241
|
+
default: i(() => [
|
|
242
|
+
s(t(oe)),
|
|
243
|
+
C(" " + h(t(o)("keySets.list.toolbar_actions.new_key_set")), 1)
|
|
244
|
+
]),
|
|
245
|
+
_: 1
|
|
246
|
+
}, 8, ["size", "to"])
|
|
247
|
+
]),
|
|
248
|
+
_: 1
|
|
249
|
+
}, 8, ["auth-function"])
|
|
250
|
+
])
|
|
251
|
+
], 8, ["disabled"]))
|
|
252
|
+
]),
|
|
253
|
+
name: i(({ rowValue: c }) => [
|
|
254
|
+
ee("b", null, h(c ?? "-"), 1)
|
|
255
|
+
]),
|
|
256
|
+
tags: i(({ rowValue: c }) => [
|
|
257
|
+
s(t(Pe), { tags: c }, null, 8, ["tags"])
|
|
258
|
+
]),
|
|
259
|
+
id: i(({ rowValue: c }) => [
|
|
260
|
+
s(_e, {
|
|
261
|
+
text: c,
|
|
262
|
+
truncate: ""
|
|
263
|
+
}, null, 8, ["text"])
|
|
264
|
+
]),
|
|
265
|
+
managed_by: i(({ rowValue: c }) => [
|
|
266
|
+
C(h(t(Oe)(c) ?? "-"), 1)
|
|
267
|
+
]),
|
|
268
|
+
actions: i(({ row: c }) => [
|
|
269
|
+
s(Y, null, {
|
|
270
|
+
default: i(({ copyToClipboard: x }) => [
|
|
271
|
+
s(F, {
|
|
272
|
+
"data-testid": "action-entity-copy-id",
|
|
273
|
+
onClick: (Ie) => de(c, x)
|
|
274
|
+
}, {
|
|
275
|
+
default: i(() => [
|
|
276
|
+
C(h(t(o)("keySets.actions.copy_id")), 1)
|
|
277
|
+
]),
|
|
278
|
+
_: 1
|
|
279
|
+
}, 8, ["onClick"])
|
|
280
|
+
]),
|
|
281
|
+
_: 2
|
|
282
|
+
}, 1024),
|
|
283
|
+
s(Y, null, {
|
|
284
|
+
default: i(({ copyToClipboard: x }) => [
|
|
285
|
+
s(F, {
|
|
286
|
+
"data-testid": "action-entity-copy-json",
|
|
287
|
+
onClick: (Ie) => ue(c, x)
|
|
288
|
+
}, {
|
|
289
|
+
default: i(() => [
|
|
290
|
+
C(h(t(o)("keySets.actions.copy_json")), 1)
|
|
291
|
+
]),
|
|
292
|
+
_: 1
|
|
293
|
+
}, 8, ["onClick"])
|
|
294
|
+
]),
|
|
295
|
+
_: 2
|
|
296
|
+
}, 1024),
|
|
297
|
+
s(t(O), {
|
|
298
|
+
"auth-function": () => e.canRetrieve(c)
|
|
299
|
+
}, {
|
|
300
|
+
default: i(() => [
|
|
301
|
+
s(F, {
|
|
302
|
+
"data-testid": "action-entity-view",
|
|
303
|
+
"has-divider": "",
|
|
304
|
+
item: me(c.id)
|
|
305
|
+
}, null, 8, ["item"])
|
|
306
|
+
]),
|
|
307
|
+
_: 2
|
|
308
|
+
}, 1032, ["auth-function"]),
|
|
309
|
+
s(t(O), {
|
|
310
|
+
"auth-function": () => e.canEdit(c)
|
|
311
|
+
}, {
|
|
312
|
+
default: i(() => [
|
|
313
|
+
s(F, {
|
|
314
|
+
"data-testid": "action-entity-edit",
|
|
315
|
+
item: ge(c.id)
|
|
316
|
+
}, null, 8, ["item"])
|
|
317
|
+
]),
|
|
318
|
+
_: 2
|
|
319
|
+
}, 1032, ["auth-function"]),
|
|
320
|
+
s(t(O), {
|
|
321
|
+
"auth-function": () => e.canDelete(c)
|
|
322
|
+
}, {
|
|
323
|
+
default: i(() => [
|
|
324
|
+
s(F, {
|
|
325
|
+
danger: "",
|
|
326
|
+
"data-testid": "action-entity-delete",
|
|
327
|
+
"has-divider": "",
|
|
328
|
+
onClick: (x) => ve(c)
|
|
329
|
+
}, {
|
|
330
|
+
default: i(() => [
|
|
331
|
+
C(h(t(o)("keySets.actions.delete")), 1)
|
|
332
|
+
]),
|
|
333
|
+
_: 1
|
|
334
|
+
}, 8, ["onClick"])
|
|
335
|
+
]),
|
|
336
|
+
_: 2
|
|
337
|
+
}, 1032, ["auth-function"])
|
|
338
|
+
]),
|
|
339
|
+
_: 2
|
|
340
|
+
}, [
|
|
341
|
+
!k.value && e.config.app === "konnect" ? {
|
|
342
|
+
name: "empty-state",
|
|
343
|
+
fn: i(() => [
|
|
344
|
+
s(Ce, {
|
|
345
|
+
"data-testid": "key-sets-entity-empty-state",
|
|
346
|
+
"icon-background": "",
|
|
347
|
+
message: t(o)("keySets.list.empty_state_v2.description"),
|
|
348
|
+
title: t(o)("keySets.list.empty_state_v2.title")
|
|
349
|
+
}, Z({
|
|
350
|
+
icon: i(() => [
|
|
351
|
+
s(t(Me), { decorative: "" })
|
|
352
|
+
]),
|
|
353
|
+
action: i(() => [
|
|
354
|
+
L.value ? (M(), J(S, {
|
|
355
|
+
key: 0,
|
|
356
|
+
"data-testid": "entity-create-button",
|
|
357
|
+
onClick: Se
|
|
358
|
+
}, {
|
|
359
|
+
default: i(() => [
|
|
360
|
+
s(t(oe), { decorative: "" }),
|
|
361
|
+
C(" " + h(t(o)("keySets.list.empty_state_v2.create_cta")), 1)
|
|
362
|
+
]),
|
|
363
|
+
_: 1
|
|
364
|
+
})) : te("", !0),
|
|
365
|
+
s(S, {
|
|
366
|
+
appearance: "secondary",
|
|
367
|
+
"data-testid": "entity-learn-more-button",
|
|
368
|
+
onClick: d[2] || (d[2] = (c) => n.$emit("click:learn-more"))
|
|
369
|
+
}, {
|
|
370
|
+
default: i(() => [
|
|
371
|
+
s(t(ne), { decorative: "" }),
|
|
372
|
+
C(" " + h(t(o)("keySets.list.empty_state_v2.learn_more")), 1)
|
|
373
|
+
]),
|
|
374
|
+
_: 1
|
|
375
|
+
})
|
|
376
|
+
]),
|
|
377
|
+
_: 2
|
|
378
|
+
}, [
|
|
379
|
+
e.config?.isControlPlaneGroup ? {
|
|
380
|
+
name: "default",
|
|
381
|
+
fn: i(() => [
|
|
382
|
+
C(h(t(o)("keySets.list.empty_state_v2.group")), 1)
|
|
383
|
+
]),
|
|
384
|
+
key: "0"
|
|
385
|
+
} : void 0
|
|
386
|
+
]), 1032, ["message", "title"])
|
|
387
|
+
]),
|
|
388
|
+
key: "0"
|
|
389
|
+
} : void 0
|
|
390
|
+
]), 1032, ["cache-identifier", "default-table-preferences", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
391
|
+
s(t(Ne), {
|
|
392
|
+
"action-pending": V.value,
|
|
393
|
+
description: t(o)("keySets.delete.description"),
|
|
394
|
+
"entity-name": I.value && (I.value.name || I.value.id),
|
|
395
|
+
"entity-type": t(Ue).KeySet,
|
|
396
|
+
error: X.value,
|
|
397
|
+
title: t(o)("keySets.delete.title"),
|
|
398
|
+
visible: T.value,
|
|
399
|
+
onCancel: he,
|
|
400
|
+
onProceed: be
|
|
401
|
+
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
402
|
+
]);
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
}), ce = (e, _) => {
|
|
406
|
+
const u = e.__vccOpts || e;
|
|
407
|
+
for (const [a, o] of _)
|
|
408
|
+
u[a] = o;
|
|
409
|
+
return u;
|
|
410
|
+
}, it = /* @__PURE__ */ ce(Xe, [["__scopeId", "data-v-863b9beb"]]), Ye = { class: "kong-ui-entities-key-sets-form" }, Ze = /* @__PURE__ */ W({
|
|
411
|
+
__name: "KeySetForm",
|
|
412
|
+
props: {
|
|
413
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
414
|
+
config: {
|
|
415
|
+
type: Object,
|
|
416
|
+
required: !0,
|
|
417
|
+
validator: (e) => !(!e || !["konnect", "kongManager"].includes(e?.app) || e.app === "konnect" && !e.controlPlaneId || e.app === "kongManager" && typeof e.workspace != "string" || !e.cancelRoute)
|
|
418
|
+
},
|
|
419
|
+
/** If a valid Key Set ID is provided, it will put the form in Edit mode instead of Create */
|
|
420
|
+
keySetId: {
|
|
421
|
+
type: String,
|
|
422
|
+
required: !1,
|
|
423
|
+
default: null
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
emits: ["update", "error", "loading"],
|
|
427
|
+
setup(e, { emit: _ }) {
|
|
428
|
+
const u = _, a = e, o = ie(), { i18n: { t: f } } = Q.useI18n(), { getMessageFromError: g } = je(), { axiosInstance: p } = re(a.config?.axiosRequestConfig), q = m(() => P.form[a.config.app].edit), K = m(() => a.keySetId ? se.Edit : se.Create), l = ae({
|
|
429
|
+
fields: {
|
|
430
|
+
name: "",
|
|
431
|
+
tags: ""
|
|
432
|
+
},
|
|
433
|
+
isReadonly: !1,
|
|
434
|
+
errorMessage: ""
|
|
435
|
+
}), w = ae({
|
|
436
|
+
name: "",
|
|
437
|
+
tags: ""
|
|
438
|
+
}), N = m(() => JSON.stringify(l.fields) !== JSON.stringify(w) && !!l.fields.name), U = (r) => {
|
|
439
|
+
l.fields.name = r?.name || "", l.fields.tags = r?.tags?.join(", ") || "", Object.assign(w, l.fields);
|
|
440
|
+
}, D = () => {
|
|
441
|
+
o.push(a.config.cancelRoute);
|
|
442
|
+
}, k = m(() => {
|
|
443
|
+
let r = `${a.config.apiBaseUrl}${P.form[a.config.app][K.value]}`;
|
|
444
|
+
return a.config.app === "konnect" && (r = r.replace(/{controlPlaneId}/gi, a.config?.controlPlaneId || "")), r.replace(/\/{workspace}/gi, a.config?.workspace ? `/${a.config.workspace}` : "").replace(/{id}/gi, a.keySetId ?? "");
|
|
445
|
+
}), E = m(() => ({
|
|
446
|
+
name: l.fields.name,
|
|
447
|
+
tags: l.fields.tags?.split(",")?.map((r) => String(r || "").trim())?.filter((r) => r !== "") || ""
|
|
448
|
+
})), j = async () => {
|
|
449
|
+
try {
|
|
450
|
+
l.isReadonly = !0;
|
|
451
|
+
let r;
|
|
452
|
+
if (K.value === "create" ? r = await p.post(k.value, E.value) : K.value === "edit" && (r = a.config?.app === "konnect" ? await p.put(k.value, E.value) : await p.patch(k.value, E.value)), r) {
|
|
453
|
+
const { data: y } = r;
|
|
454
|
+
l.fields.name = y?.name || "", l.fields.tags = y?.tags?.join(", ") || "", Object.assign(w, l.fields), u("update", r?.data);
|
|
455
|
+
}
|
|
456
|
+
} catch (r) {
|
|
457
|
+
l.errorMessage = g(r), u("error", r);
|
|
458
|
+
} finally {
|
|
459
|
+
l.isReadonly = !1;
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
return (r, y) => {
|
|
463
|
+
const R = $("KInput");
|
|
464
|
+
return M(), z("div", Ye, [
|
|
465
|
+
s(t(Ae), {
|
|
466
|
+
"can-submit": N.value,
|
|
467
|
+
config: e.config,
|
|
468
|
+
"edit-id": e.keySetId,
|
|
469
|
+
"entity-type": t(le).KeySet,
|
|
470
|
+
"error-message": l.errorMessage,
|
|
471
|
+
"fetch-url": q.value,
|
|
472
|
+
"form-fields": E.value,
|
|
473
|
+
"is-readonly": l.isReadonly,
|
|
474
|
+
onCancel: D,
|
|
475
|
+
"onFetch:error": y[2] || (y[2] = (v) => r.$emit("error", v)),
|
|
476
|
+
"onFetch:success": U,
|
|
477
|
+
onLoading: y[3] || (y[3] = (v) => r.$emit("loading", v)),
|
|
478
|
+
onSubmit: j
|
|
479
|
+
}, {
|
|
480
|
+
default: i(() => [
|
|
481
|
+
s(t(Le), {
|
|
482
|
+
description: t(f)("keySets.form.sections.general.description"),
|
|
483
|
+
"has-divider": "",
|
|
484
|
+
title: t(f)("keySets.form.sections.general.title")
|
|
485
|
+
}, {
|
|
486
|
+
default: i(() => [
|
|
487
|
+
s(R, {
|
|
488
|
+
modelValue: l.fields.name,
|
|
489
|
+
"onUpdate:modelValue": y[0] || (y[0] = (v) => l.fields.name = v),
|
|
490
|
+
modelModifiers: { trim: !0 },
|
|
491
|
+
autocomplete: "off",
|
|
492
|
+
"data-testid": "key-set-form-name",
|
|
493
|
+
label: t(f)("keySets.form.fields.name.label"),
|
|
494
|
+
placeholder: t(f)("keySets.form.fields.name.placeholder"),
|
|
495
|
+
readonly: l.isReadonly,
|
|
496
|
+
type: "text"
|
|
497
|
+
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
498
|
+
s(R, {
|
|
499
|
+
modelValue: l.fields.tags,
|
|
500
|
+
"onUpdate:modelValue": y[1] || (y[1] = (v) => l.fields.tags = v),
|
|
501
|
+
modelModifiers: { trim: !0 },
|
|
502
|
+
autocomplete: "off",
|
|
503
|
+
"data-testid": "key-set-form-tags",
|
|
504
|
+
help: t(f)("keySets.form.fields.tags.help"),
|
|
505
|
+
label: t(f)("keySets.form.fields.tags.label"),
|
|
506
|
+
"label-attributes": {
|
|
507
|
+
info: t(f)("keySets.form.fields.tags.tooltip"),
|
|
508
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
509
|
+
},
|
|
510
|
+
placeholder: t(f)("keySets.form.fields.tags.placeholder"),
|
|
511
|
+
readonly: l.isReadonly,
|
|
512
|
+
type: "text"
|
|
513
|
+
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
514
|
+
]),
|
|
515
|
+
_: 1
|
|
516
|
+
}, 8, ["description", "title"])
|
|
517
|
+
]),
|
|
518
|
+
_: 1
|
|
519
|
+
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"])
|
|
520
|
+
]);
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
}), rt = /* @__PURE__ */ ce(Ze, [["__scopeId", "data-v-e66ae12a"]]), et = { class: "kong-ui-entities-keys-entity-config-card" }, lt = /* @__PURE__ */ W({
|
|
524
|
+
__name: "KeySetConfigCard",
|
|
525
|
+
props: {
|
|
526
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
527
|
+
config: {
|
|
528
|
+
type: Object,
|
|
529
|
+
required: !0,
|
|
530
|
+
validator: (e) => !(!e || !["konnect", "kongManager"].includes(e?.app) || e.app === "konnect" && !e.controlPlaneId || e.app === "kongManager" && typeof e.workspace != "string" || !e.entityId)
|
|
531
|
+
},
|
|
532
|
+
/**
|
|
533
|
+
* External link for documentation that determines visibility of Documentation button
|
|
534
|
+
*/
|
|
535
|
+
configCardDoc: {
|
|
536
|
+
type: String,
|
|
537
|
+
default: "",
|
|
538
|
+
required: !1
|
|
539
|
+
},
|
|
540
|
+
/**
|
|
541
|
+
* Control visibility of card title content
|
|
542
|
+
*/
|
|
543
|
+
hideTitle: {
|
|
544
|
+
type: Boolean,
|
|
545
|
+
default: !1
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
emits: ["loading", "fetch:error", "fetch:success"],
|
|
549
|
+
setup(e) {
|
|
550
|
+
const _ = e, { i18n: { t: u } } = Q.useI18n(), a = m(() => P.form[_.config.app].edit), o = b({
|
|
551
|
+
id: {},
|
|
552
|
+
name: {},
|
|
553
|
+
last_updated: {},
|
|
554
|
+
created: {},
|
|
555
|
+
tags: {
|
|
556
|
+
tooltip: u("keySets.form.fields.tags.tooltip")
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
return (f, g) => (M(), z("div", et, [
|
|
560
|
+
s(t(Je), {
|
|
561
|
+
config: e.config,
|
|
562
|
+
"config-card-doc": e.configCardDoc,
|
|
563
|
+
"config-schema": o.value,
|
|
564
|
+
"entity-type": t(le).KeySet,
|
|
565
|
+
"fetch-url": a.value,
|
|
566
|
+
"hide-title": e.hideTitle,
|
|
567
|
+
"onFetch:error": g[0] || (g[0] = (p) => f.$emit("fetch:error", p)),
|
|
568
|
+
"onFetch:success": g[1] || (g[1] = (p) => f.$emit("fetch:success", p)),
|
|
569
|
+
onLoading: g[2] || (g[2] = (p) => f.$emit("loading", p))
|
|
570
|
+
}, null, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
571
|
+
]));
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
export {
|
|
575
|
+
lt as KeySetConfigCard,
|
|
576
|
+
rt as KeySetForm,
|
|
577
|
+
it as KeySetList
|
|
578
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong/icons"),require("vue-router"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","@kong/icons","vue-router","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y["kong-ui-public-entities-key-sets"]={},y.Vue,y.KongIcons,y.VueRouter,y["kong-ui-public-i18n"],y["kong-ui-public-entities-shared"]))})(this,(function(y,e,V,U,L,r){"use strict";const H={keySets:{title:"Key sets",list:{toolbar_actions:{new_key_set:"New key set"},table_headers:{name:"Name",id:"ID",tags:"Tags"},empty_state:{title:"Configure a new key set",description:"A key set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose."},empty_state_v2:{title:"Configure your first key set",group:"Key sets created in gateways within this group will automatically appear here.",description:"Key sets centrally manage asymmetric keys for plugins like OpenID Connect and JWT, simplifying configuration and security across services.",create_cta:"New key set",learn_more:"Learn more"}},actions:{create:"New key set",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View details"},search:{placeholder:"Filter by exact name or ID"},delete:{title:"Delete a key set",description:"Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting."},errors:{general:"Key sets could not be retrieved",delete:"The key set could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{sections:{general:{title:"General information",description:"General information will help identify and manage this key set."}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this key set"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}}}};function z(){const t=L.createI18n("en-us",H);return{i18n:t,i18nT:L.i18nTComponent(t)}}const K={useI18n:z},M="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",F="/{workspace}",I={list:{konnect:`${M}/key-sets`,kongManager:`${F}/key-sets`},form:{konnect:{create:`${M}/key-sets`,edit:`${M}/key-sets/{id}`},kongManager:{create:`${F}/key-sets`,edit:`${F}/key-sets/{id}`}}},Q={class:"kong-ui-entities-key-sets-list"},X={class:"button-row"},Y=e.defineComponent({__name:"KeySetList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t?.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(t,{emit:b}){const d=b,o=t,{i18n:{t:a}}=K.useI18n(),f=U.useRouter(),{axiosInstance:m}=r.useAxios(o.config?.axiosRequestConfig),{hasRecords:u,handleStateChange:R}=r.useTableState(()=>g.value),N=e.computed(()=>u.value&&o.config.app==="konnect"),i=e.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),S={name:{label:a("keySets.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},tags:{label:a("keySets.list.table_headers.tags")},id:{label:a("keySets.list.table_headers.id"),sortable:!0}},{defaultTablePreferences:q,tableHeaders:P}=r.useManagedByColumn(S),_=e.computed(()=>{let n=`${o.config.apiBaseUrl}${I.list[o.config.app]}`;return o.config.app==="konnect"&&(n=n.replace(/{controlPlaneId}/gi,o.config?.controlPlaneId||"")),n.replace(/\/{workspace}/gi,o.config?.workspace?`/${o.config.workspace}`:"")}),g=e.ref(""),w=e.computed(()=>{const n=o.config.app==="konnect"||o.config.isExactMatch;if(n)return{isExactMatch:n,placeholder:a("keySets.search.placeholder")};const c={name:S.name};return{isExactMatch:n,fields:c,schema:o.config.filterSchema}}),{fetcher:O,fetcherState:s,fetcherCacheKey:p}=r.useFetcher(e.computed(()=>({...o.config,cacheIdentifier:o.cacheIdentifier})),_),E=()=>{g.value=""},k=()=>{p.value++},T=e.ref(null),ne=async(n,c)=>{const h=n.id;if(!await c(h)){se(n,"id");return}re(n,"id")},ae=async(n,c)=>{const h=JSON.stringify(n);if(!await c(h)){d("copy:error",{entity:n,message:a("keySets.errors.copy")});return}d("copy:success",{entity:n,message:a("keySets.copy.success_brief")})},re=(n,c)=>{d("copy:success",{entity:n,field:c,message:a("keySets.copy.success",{val:n[c]})})},se=(n,c)=>{d("copy:error",{entity:n,field:c,message:a("keySets.errors.copy")})},ie=async n=>{await o.canRetrieve?.(n)&&f.push(o.config.getViewRoute(n.id))},le=n=>({label:a("keySets.actions.view"),to:o.config.getViewRoute(n)}),ce=n=>({label:a("keySets.actions.edit"),to:o.config.getEditRoute(n)}),C=e.ref(void 0),B=e.ref(!1),D=e.ref(!1),W=e.ref(""),de=r.useDeleteUrlBuilder(o.config,_.value),fe=n=>{C.value=n,B.value=!0},pe=()=>{B.value=!1},ye=async()=>{if(C.value?.id){D.value=!0;try{await m.delete(de(C.value.id)),D.value=!1,B.value=!1,p.value++,d("delete:success",C.value)}catch(n){W.value=n.response?.data?.message||n.message||a("keySets.errors.delete"),d("error",n)}finally{D.value=!1}}},ue=()=>{f.push(o.config.createRoute)};e.watch(s,n=>{if(n.status===r.FetcherStatus.Error){T.value={title:a("keySets.errors.general")},n.error?.response?.data?.message&&(T.value.message=n.error.response.data.message),d("error",n.error);return}T.value=null});const j=e.ref({ctaPath:o.config.createRoute,ctaText:void 0,message:`${a("keySets.list.empty_state.description")}${o.config.additionMessageForEmptyState?` ${o.config.additionMessageForEmptyState}`:""}`,title:a("keySets.title")}),A=e.ref(!1);return e.onBeforeMount(async()=>{A.value=await o.canCreate(),A.value&&(j.value.title=a("keySets.list.empty_state.title"),j.value.ctaText=a("keySets.actions.create"))}),(n,c)=>{const h=e.resolveComponent("KButton"),me=e.resolveComponent("KEmptyState"),ge=e.resolveComponent("KCopy"),x=e.resolveComponent("KDropdownItem"),G=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Q,[e.createVNode(e.unref(r.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"default-table-preferences":e.unref(q),"disable-sorting":i.value,"empty-state-options":j.value,"enable-entity-actions":"","error-message":T.value,fetcher:e.unref(O),"fetcher-cache-key":e.unref(p),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:g.value,"table-headers":e.unref(P),onClearSearchInput:E,"onClick:row":c[3]||(c[3]=l=>ie(l)),onSort:k,onState:e.unref(R)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(r.EntityFilter),{modelValue:g.value,"onUpdate:modelValue":c[0]||(c[0]=l=>g.value=l),config:w.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",X,[N.value?(e.openBlock(),e.createBlock(h,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"keys-set-learn-more-button",icon:"",onClick:c[1]||(c[1]=l=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(V.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(r.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(h,{appearance:"primary","data-testid":"toolbar-add-key-set",size:t.useActionOutside?"medium":"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(V.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.toolbar_actions.new_key_set")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:l})=>[e.createElementVNode("b",null,e.toDisplayString(l??"-"),1)]),tags:e.withCtx(({rowValue:l})=>[e.createVNode(e.unref(r.TableTags),{tags:l},null,8,["tags"])]),id:e.withCtx(({rowValue:l})=>[e.createVNode(ge,{text:l,truncate:""},null,8,["text"])]),managed_by:e.withCtx(({rowValue:l})=>[e.createTextVNode(e.toDisplayString(e.unref(r.getManagedByLabel)(l)??"-"),1)]),actions:e.withCtx(({row:l})=>[e.createVNode(G,null,{default:e.withCtx(({copyToClipboard:$})=>[e.createVNode(x,{"data-testid":"action-entity-copy-id",onClick:ke=>ne(l,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(G,null,{default:e.withCtx(({copyToClipboard:$})=>[e.createVNode(x,{"data-testid":"action-entity-copy-json",onClick:ke=>ae(l,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_json")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(e.unref(r.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(l)},{default:e.withCtx(()=>[e.createVNode(x,{"data-testid":"action-entity-view","has-divider":"",item:le(l.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(r.PermissionsWrapper),{"auth-function":()=>t.canEdit(l)},{default:e.withCtx(()=>[e.createVNode(x,{"data-testid":"action-entity-edit",item:ce(l.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(r.PermissionsWrapper),{"auth-function":()=>t.canDelete(l)},{default:e.withCtx(()=>[e.createVNode(x,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:$=>fe(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!g.value&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>[e.createVNode(me,{"data-testid":"key-sets-entity-empty-state","icon-background":"",message:e.unref(a)("keySets.list.empty_state_v2.description"),title:e.unref(a)("keySets.list.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(V.KeyIcon),{decorative:""})]),action:e.withCtx(()=>[A.value?(e.openBlock(),e.createBlock(h,{key:0,"data-testid":"entity-create-button",onClick:ue},{default:e.withCtx(()=>[e.createVNode(e.unref(V.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.empty_state_v2.create_cta")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(h,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:c[2]||(c[2]=l=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(V.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[t.config?.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["message","title"])]),key:"0"}:void 0]),1032,["cache-identifier","default-table-preferences","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(r.EntityDeleteModal),{"action-pending":D.value,description:e.unref(a)("keySets.delete.description"),"entity-name":C.value&&(C.value.name||C.value.id),"entity-type":e.unref(r.EntityTypes).KeySet,error:W.value,title:e.unref(a)("keySets.delete.title"),visible:B.value,onCancel:pe,onProceed:ye},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),J=(t,b)=>{const d=t.__vccOpts||t;for(const[o,a]of b)d[o]=a;return d},Z=J(Y,[["__scopeId","data-v-863b9beb"]]),v={class:"kong-ui-entities-key-sets-form"},ee=J(e.defineComponent({__name:"KeySetForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t?.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.cancelRoute)},keySetId:{type:String,required:!1,default:null}},emits:["update","error","loading"],setup(t,{emit:b}){const d=b,o=t,a=U.useRouter(),{i18n:{t:f}}=K.useI18n(),{getMessageFromError:m}=r.useErrors(),{axiosInstance:u}=r.useAxios(o.config?.axiosRequestConfig),R=e.computed(()=>I.form[o.config.app].edit),N=e.computed(()=>o.keySetId?r.EntityBaseFormType.Edit:r.EntityBaseFormType.Create),i=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),S=e.reactive({name:"",tags:""}),q=e.computed(()=>JSON.stringify(i.fields)!==JSON.stringify(S)&&!!i.fields.name),P=s=>{i.fields.name=s?.name||"",i.fields.tags=s?.tags?.join(", ")||"",Object.assign(S,i.fields)},_=()=>{a.push(o.config.cancelRoute)},g=e.computed(()=>{let s=`${o.config.apiBaseUrl}${I.form[o.config.app][N.value]}`;return o.config.app==="konnect"&&(s=s.replace(/{controlPlaneId}/gi,o.config?.controlPlaneId||"")),s.replace(/\/{workspace}/gi,o.config?.workspace?`/${o.config.workspace}`:"").replace(/{id}/gi,o.keySetId??"")}),w=e.computed(()=>({name:i.fields.name,tags:i.fields.tags?.split(",")?.map(s=>String(s||"").trim())?.filter(s=>s!=="")||""})),O=async()=>{try{i.isReadonly=!0;let s;if(N.value==="create"?s=await u.post(g.value,w.value):N.value==="edit"&&(s=o.config?.app==="konnect"?await u.put(g.value,w.value):await u.patch(g.value,w.value)),s){const{data:p}=s;i.fields.name=p?.name||"",i.fields.tags=p?.tags?.join(", ")||"",Object.assign(S,i.fields),d("update",s?.data)}}catch(s){i.errorMessage=m(s),d("error",s)}finally{i.isReadonly=!1}};return(s,p)=>{const E=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(r.EntityBaseForm),{"can-submit":q.value,config:t.config,"edit-id":t.keySetId,"entity-type":e.unref(r.SupportedEntityType).KeySet,"error-message":i.errorMessage,"fetch-url":R.value,"form-fields":w.value,"is-readonly":i.isReadonly,onCancel:_,"onFetch:error":p[2]||(p[2]=k=>s.$emit("error",k)),"onFetch:success":P,onLoading:p[3]||(p[3]=k=>s.$emit("loading",k)),onSubmit:O},{default:e.withCtx(()=>[e.createVNode(e.unref(r.EntityFormSection),{description:e.unref(f)("keySets.form.sections.general.description"),"has-divider":"",title:e.unref(f)("keySets.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(E,{modelValue:i.fields.name,"onUpdate:modelValue":p[0]||(p[0]=k=>i.fields.name=k),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-name",label:e.unref(f)("keySets.form.fields.name.label"),placeholder:e.unref(f)("keySets.form.fields.name.placeholder"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(E,{modelValue:i.fields.tags,"onUpdate:modelValue":p[1]||(p[1]=k=>i.fields.tags=k),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-tags",help:e.unref(f)("keySets.form.fields.tags.help"),label:e.unref(f)("keySets.form.fields.tags.label"),"label-attributes":{info:e.unref(f)("keySets.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(f)("keySets.form.fields.tags.placeholder"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-e66ae12a"]]),te={class:"kong-ui-entities-keys-entity-config-card"},oe=e.defineComponent({__name:"KeySetConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t?.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const b=t,{i18n:{t:d}}=K.useI18n(),o=e.computed(()=>I.form[b.config.app].edit),a=e.ref({id:{},name:{},last_updated:{},created:{},tags:{tooltip:d("keySets.form.fields.tags.tooltip")}});return(f,m)=>(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(e.unref(r.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":a.value,"entity-type":e.unref(r.SupportedEntityType).KeySet,"fetch-url":o.value,"hide-title":t.hideTitle,"onFetch:error":m[0]||(m[0]=u=>f.$emit("fetch:error",u)),"onFetch:success":m[1]||(m[1]=u=>f.$emit("fetch:success",u)),onLoading:m[2]||(m[2]=u=>f.$emit("loading",u))},null,8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});y.KeySetConfigCard=oe,y.KeySetForm=ee,y.KeySetList=Z,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.deck-command-editor-wrapper[data-v-2da602e1]{isolation:isolate;position:relative}.deck-command-editor-wrapper .deck-command-editor[data-v-2da602e1]{height:300px;margin-top:12px;margin-top:var(--kui-space-50, 12px);width:100%}.deck-command-editor-wrapper .deck-command-copy-button[data-v-2da602e1]{opacity:0;position:absolute;right:10px;top:10px;transition:opacity linear .2s;transition:opacity linear var(--kui-animation-duration-20, .2s);z-index:10000}.deck-command-editor-wrapper:hover .deck-command-copy-button[data-v-2da602e1]{opacity:1}.editor-skeleton[data-v-ec59bbd1]{margin-top:4px;margin-top:var(--kui-space-20, 4px)}.kong-ui-onboarding-card[data-v-10c7d0b0]{background-color:#f9fafb;background-color:var(--kui-color-background-neutral-weakest, #f9fafb)}.kong-ui-onboarding-card .onboarding-card-subtitle[data-v-10c7d0b0]{color:#3a3f51;color:var(--kui-color-text-neutral-stronger, #3a3f51);font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);margin-top:4px;margin-top:var(--kui-space-20, 4px)}.kong-ui-onboarding-card .onboarding-items-grid[data-v-10c7d0b0]{display:grid;gap:16px;gap:var(--kui-space-60, 16px);grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr))}.kong-ui-onboarding-card .onboarding-item-wrapper[data-v-10c7d0b0]{background:none;border:none;color:inherit;cursor:pointer;display:flex;font:inherit;padding:0;padding:var(--kui-space-0, 0px);text-align:left;text-decoration:none}.kong-ui-onboarding-card .onboarding-item-wrapper.is-static[data-v-10c7d0b0]{cursor:default}.kong-ui-onboarding-card .onboarding-item-wrapper:not(.is-static):hover .onboarding-item[data-v-10c7d0b0]{border-color:#0044f4;border-color:var(--kui-color-border-primary, #0044f4)}.kong-ui-onboarding-card .onboarding-item-wrapper .onboarding-item[data-v-10c7d0b0]{flex:1}.kong-ui-onboarding-card .onboarding-item-wrapper .onboarding-item[data-v-10c7d0b0] .card-content{align-items:center;display:flex;gap:12px;gap:var(--kui-space-50, 12px)}.kong-ui-onboarding-card .onboarding-item-wrapper .onboarding-item[data-v-10c7d0b0]:not(.vertical-item) .card-content{flex-direction:row}.kong-ui-onboarding-card .onboarding-item-wrapper .onboarding-item.vertical-item[data-v-10c7d0b0] .card-content{align-items:center;flex-direction:column;justify-content:center;text-align:center}.kong-ui-onboarding-card .onboarding-item-wrapper .onboarding-item.vertical-item[data-v-10c7d0b0] .card-content .onboarding-item-content{flex:none}.kong-ui-onboarding-card .onboarding-item-icon-box[data-v-10c7d0b0]{align-items:center;border:1px solid transparent;border:var(--kui-border-width-10, 1px) solid transparent;border-radius:8px;border-radius:var(--kui-border-radius-40, 8px);display:flex;flex-shrink:0;height:56px;justify-content:center;width:56px}.kong-ui-onboarding-card .onboarding-item-content[data-v-10c7d0b0]{flex:1;min-width:0}.kong-ui-onboarding-card .onboarding-item-title[data-v-10c7d0b0]{color:#232633;color:var(--kui-color-text-neutral-strongest, #232633);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.kong-ui-onboarding-card .onboarding-item-description[data-v-10c7d0b0]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin-top:4px;margin-top:var(--kui-space-20, 4px);overflow-wrap:break-word}.kong-ui-onboarding-card .onboarding-item-append-icon[data-v-10c7d0b0]{flex-shrink:0}.config-card-fieldset[data-v-5baf64ca]{border:solid 1px #e0e4ea;border:solid var(--kui-border-width-10, 1px) var(--kui-color-border, #e0e4ea);border-radius:4px;margin-bottom:8px;margin-bottom:var(--kui-space-40, 8px);margin-top:4px}.config-card-fieldset-title[data-v-5baf64ca]{font-size:14px;font-size:var(--kui-font-size-30, 14px);padding:0 8px;padding:0 var(--kui-space-40, 8px);width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px;margin:var(--kui-space-0, 0px) var(--kui-space-60, 16px)}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-6996418f] .k-button.navigation-button{font-size:14px;font-weight:400}.navigation-link[data-v-6996418f]{color:#0044f4;color:var(--kui-color-text-primary, #0044f4);font-size:14px;font-weight:400;text-decoration:underline}.navigation-subtitle[data-v-6996418f]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:12px;font-weight:400}.config-card-details-row[data-v-b5a200cb]{align-items:center;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;padding:16px;padding:var(--kui-space-60, 16px);padding-left:0;width:100%}.config-card-details-row.json-array-item[data-v-b5a200cb]{border-bottom:none}.config-card-details-row.json-item[data-v-b5a200cb]{display:block}.config-card-details-row .config-card-details-label[data-v-b5a200cb]{box-sizing:border-box;padding-right:16px;padding-right:var(--kui-space-60, 16px);width:25%}.config-card-details-row .config-card-details-label.json-item-label[data-v-b5a200cb]{width:100%}.config-card-details-row .config-card-details-label.slim-label[data-v-b5a200cb]{width:50%}.config-card-details-row .config-card-details-label label[data-v-b5a200cb]{color:#3a3f51;color:var(--kui-color-text-neutral-stronger, #3a3f51);display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-b5a200cb]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-b5a200cb]{min-width:0}.config-card-details-row .config-card-details-value[data-v-b5a200cb]{box-sizing:border-box;width:75%}.config-card-details-row .config-card-details-value.json-item-value[data-v-b5a200cb]{width:100%}.config-card-details-row .config-card-details-value.slim-value[data-v-b5a200cb]{width:50%}.config-card-details-row .config-card-details-value .truncated[data-v-b5a200cb]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-b5a200cb]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-b5a200cb] .k-copy:not(:last-of-type){margin-bottom:8px;margin-bottom:var(--kui-space-40, 8px)}.config-card-details-row .config-card-details-value .method-badge-array[data-v-b5a200cb]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-b5a200cb]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.config-card-details-row[data-v-b5a200cb] .k-label{margin-bottom:0}.config-card-details-row[data-v-b5a200cb] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-b5a200cb] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-left-radius:var(--kui-border-radius-0, 0px);border-top-right-radius:0;border-top-right-radius:var(--kui-border-radius-0, 0px)}.json-endpoint{align-items:baseline;background-color:#fff;background-color:var(--kui-color-background, #ffffff);border-bottom:1px solid rgba(255,255,255,.2);border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border-inverse, rgba(255, 255, 255, .2));border-top-left-radius:8px;border-top-left-radius:var(--kui-border-radius-40, 8px);border-top-right-radius:8px;border-top-right-radius:var(--kui-border-radius-40, 8px);display:flex;gap:6px;gap:var(--kui-space-30, 6px);padding:8px 0;padding:var(--kui-space-40, 8px) var(--kui-space-0, 0px)}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-bottom:var(--kui-space-0, 0px);padding-top:0;padding-top:var(--kui-space-0, 0px)}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--v06a68197);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.deck-callout[data-v-0bf1334c]{margin-bottom:16px;margin-bottom:var(--kui-space-60, 16px)}.deck-callout .cta[data-v-0bf1334c]{background:none;border:none;color:inherit;cursor:pointer;font:inherit;font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);padding:0;text-decoration:underline}.generate-pat-modal[data-v-be3cd315] .modal-content{display:flex;flex-direction:column;gap:20px;gap:var(--kui-space-70, 20px)}.deck-config .k-select[data-v-81758ed8]{margin-bottom:16px;margin-bottom:var(--kui-space-60, 16px)}.deck-config .k-code-block[data-v-81758ed8]{margin-top:12px;margin-top:var(--kui-space-50, 12px)}.deck-config .k-code-block.customization[data-v-81758ed8]{background-color:#fff;background-color:var(--kui-color-background, #ffffff);border:1px solid #e0e4ea;border:1px solid var(--kui-color-border, #e0e4ea);border-radius:8px;border-radius:var(--kui-border-radius-40, 8px)}.deck-config .step-title[data-v-81758ed8]{align-items:center;align-self:stretch;font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:700;font-weight:var(--kui-font-weight-bold, 700);gap:16px}.deck-config .step-title[data-v-81758ed8]:not(:first-child){margin-top:16px;margin-top:var(--kui-space-60, 16px)}.deck-config .konnect-pat-actions[data-v-81758ed8]{align-items:center;display:flex;flex-direction:row;gap:8px;gap:var(--kui-space-40, 8px);margin-top:8px;margin-top:var(--kui-space-40, 8px)}.deck-config .copy-konnect-pat-alert[data-v-81758ed8]{margin-top:8px;margin-top:var(--kui-space-40, 8px)}.deck-config .customization-secret-advise[data-v-81758ed8]{font-size:14px;font-size:var(--kui-font-size-30, 14px);opacity:.7}.deck-config .customization-footer-reminder[data-v-81758ed8]{margin-top:16px;margin-top:var(--kui-space-60, 16px)}.config-card-prop-section-title[data-v-83075649]{color:#0d0e14;color:var(--kui-color-text, #0d0e14);font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);margin-bottom:16px;margin-bottom:var(--kui-space-60, 16px);margin-top:48px;margin-top:var(--kui-space-110, 48px)}.kong-ui-entity-base-config-card .config-card-actions[data-v-40eb9709]{align-items:center;display:flex;gap:16px;gap:var(--kui-space-60, 16px)}.kong-ui-entity-base-config-card .config-card-actions .row[data-v-40eb9709]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-40eb9709]{margin-bottom:0;margin-bottom:var(--kui-space-0, 0px);margin-right:8px;margin-right:var(--kui-space-40, 8px)}.kong-ui-entity-base-config-card .config-card-actions .sensitive-fields-checkbox[data-v-40eb9709]{align-items:center}.kong-ui-entity-base-config-card .config-card-actions .sensitive-fields-checkbox[data-v-40eb9709] .checkbox-label{width:max-content}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-40eb9709]{color:#0d0e14;color:var(--kui-color-text, #0d0e14);font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;margin-bottom:16px;margin-bottom:var(--kui-space-60, 16px);margin-top:48px;margin-top:var(--kui-space-110, 48px)}.kong-ui-entity-base-config-card[data-v-40eb9709] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-40eb9709]{margin-left:8px;margin-left:var(--kui-space-40, 8px);padding:0;padding:var(--kui-space-0, 0px)}.kong-ui-entity-base-form[data-v-b3590221]{box-sizing:border-box;max-width:1536px;max-width:var(--kui-breakpoint-desktop, 1536px);width:100%}.kong-ui-entity-base-form[data-v-b3590221] .k-slideout-title{color:#0d0e14!important;color:var(--kui-color-text, #0d0e14)!important;font-size:24px!important;font-size:var(--kui-font-size-70, 24px)!important;font-weight:700!important;font-weight:var(--kui-font-weight-bold, 700)!important;line-height:32px!important;line-height:var(--kui-line-height-60, 32px)!important;margin-bottom:16px!important;margin-bottom:var(--kui-space-60, 16px)!important}.kong-ui-entity-base-form[data-v-b3590221] .k-card.content-card{padding:0 16px!important;padding:var(--kui-space-0, 0px) var(--kui-space-60, 16px)!important}.kong-ui-entity-base-form[data-v-b3590221] .tab-item>div.tab-link.has-panels{color:#6c7489!important;color:var(--kui-color-text-neutral, #6c7489)!important;font-size:14px!important;font-size:var(--kui-font-size-30, 14px)!important;font-weight:700!important;font-weight:var(--kui-font-weight-bold, 700)!important;line-height:24px!important;line-height:var(--kui-line-height-40, 24px)!important}.kong-ui-entity-base-form[data-v-b3590221] .tab-item.active>div.tab-link.has-panels{color:#0d0e14!important;color:var(--kui-color-text, #0d0e14)!important;font-weight:600!important;font-weight:var(--kui-font-weight-semibold, 600)!important}.kong-ui-entity-base-form[data-v-b3590221] .slideout-content{overflow-y:unset!important}.kong-ui-entity-base-form.new-form-layout[data-v-b3590221]{background-color:#0000;background-color:var(--kui-color-background-transparent, rgba(0, 0, 0, 0));border:none;padding:0}.kong-ui-entity-base-form.new-form-layout[data-v-b3590221]>.card-content>form>.form-actions{justify-content:flex-start;margin-top:20px;margin-top:var(--kui-space-70, 20px)}.kong-ui-entity-base-form.new-form-layout .form-error[data-v-b3590221]{margin:20px 0 0 16px;margin:var(--kui-space-70, 20px) 0 0 var(--kui-space-60, 16px)}.kong-ui-entity-base-form .button-customize-deck-wrapper[data-v-b3590221]{display:flex;flex-direction:row;justify-content:flex-end;margin-bottom:16px;margin-bottom:var(--kui-space-60, 16px)}.form-actions[data-v-b3590221]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px;margin-top:var(--kui-space-80, 24px)}.form-actions[data-v-b3590221] .k-button:last-of-type,.form-actions[data-v-b3590221] .k-button:nth-last-of-type(2){margin-inline-start:16px;margin-inline-start:var(--kui-space-60, 16px)}.form-actions-reverted[data-v-b3590221]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-bcc0ec48]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-bcc0ec48]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-bcc0ec48]{display:none}.kong-ui-entity-delete-modal .message[data-v-61f55f42],.kong-ui-entity-delete-modal .description[data-v-61f55f42]{line-height:20px;line-height:var(--kui-line-height-30, 20px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-entity-delete-modal .message strong[data-v-61f55f42]{font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.kong-ui-entity-delete-modal .description[data-v-61f55f42]{margin-top:32px;margin-top:var(--kui-space-90, 32px)}.kong-ui-entity-delete-modal .extra[data-v-61f55f42]{margin-top:16px;margin-top:var(--kui-space-60, 16px)}.kong-ui-entity-delete-modal .body-stacked-copy .description[data-v-61f55f42]{margin-top:0;margin-top:var(--kui-space-0, 0px)}.kong-ui-entity-delete-modal .body-stacked-copy .description>p[data-v-61f55f42]{margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-entity-delete-modal .body-stacked-copy .message[data-v-61f55f42]{margin-bottom:0;margin-bottom:var(--kui-space-0, 0px)}.kong-ui-entity-delete-modal[data-v-61f55f42] .prompt-confirmation-text{line-height:20px;line-height:var(--kui-line-height-30, 20px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-entity-delete-modal-stacked-copy[data-v-61f55f42] .prompt-content+.prompt-confirmation-container{margin-top:32px;margin-top:var(--kui-space-90, 32px)}.kong-ui-entity-delete-error[data-v-61f55f42]{margin-bottom:12px;margin-bottom:var(--kui-space-50, 12px)}.kong-ui-entity-filter-input[data-v-10015be6]{width:100%}.kong-ui-entity-filter-clear[data-v-10015be6]{cursor:pointer}.kong-ui-entity-filter[data-v-10015be6]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10015be6] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10015be6] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10015be6]{inset:0;position:fixed;z-index:1050}.kong-ui-entity-filter-menu[data-v-10015be6]{background-color:#fff;background-color:var(--kui-color-background, #ffffff);border:1px solid #afb7c5;border:var(--kui-border-width-10, 1px) solid var(--kui-color-border-neutral-weak, #afb7c5);border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);box-shadow:0 4px 20px #e0e4ea;box-shadow:0 4px 20px var(--kui-color-border, #e0e4ea);left:0;margin-top:16px;padding:8px 0 12px;padding:var(--kui-space-40, 8px) 0 var(--kui-space-50, 12px);position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10015be6]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);line-height:16px;line-height:var(--kui-line-height-20, 16px);list-style:none;margin:0 20px;margin:var(--kui-space-0, 0px) var(--kui-space-70, 20px);padding:16px 0;padding:var(--kui-space-60, 16px) 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10015be6]{align-items:center;cursor:pointer;display:flex;line-height:24px;line-height:var(--kui-line-height-40, 24px)}.menu-item-title.expanded[data-v-10015be6]{color:#232633;color:var(--kui-color-text-neutral-strongest, #232633)}.menu-item-expand-icon[data-v-10015be6]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10015be6]{transform:rotate(180deg)}.menu-item-indicator[data-v-10015be6]{background-color:#0044f4;background-color:var(--kui-color-background-primary, #0044f4);border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10015be6]{align-items:center;display:flex;justify-content:space-between;margin-top:16px;margin-top:var(--kui-space-60, 16px)}.menu-item-body[data-v-10015be6] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10015be6] .k-input{width:100%}.menu-item-body[data-v-10015be6] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10015be6] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10015be6]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10015be6]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10015be6]{padding:12px 20px 0;padding:var(--kui-space-50, 12px) var(--kui-space-70, 20px) 0}fieldset[data-v-ccd29028]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-ccd29028]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-ccd29028]{column-gap:16px;column-gap:var(--kui-space-60, 16px);display:flex;flex-direction:column;padding-bottom:64px;padding-bottom:var(--kui-space-130, 64px);row-gap:12px;row-gap:var(--kui-space-50, 12px);width:100%}@media(min-width:1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-ccd29028]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-ccd29028]{flex:1}@media(min-width:1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-ccd29028]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-ccd29028]{height:fit-content;margin-bottom:16px;margin-bottom:var(--kui-space-60, 16px);position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-ccd29028]{color:#0d0e14;color:var(--kui-color-text, #0d0e14);font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:700;font-weight:var(--kui-font-weight-bold, 700);line-height:20px;line-height:var(--kui-line-height-30, 20px);margin-bottom:8px;margin-bottom:var(--kui-space-40, 8px);margin-top:0;margin-top:var(--kui-space-0, 0px)}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-ccd29028],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-ccd29028],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-ccd29028] p{color:#0d0e14;color:var(--kui-color-text, #0d0e14);font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-ccd29028]{margin-top:32px;margin-top:var(--kui-space-90, 32px)}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-ccd29028]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-ccd29028]>*:not(:first-child){margin-top:24px;margin-top:var(--kui-space-80, 24px)}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-ccd29028]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea)}.kong-ui-entity-form-block .header[data-v-7dd2f21d]{align-items:flex-start;display:flex;gap:8px;gap:var(--kui-space-40, 8px)}.kong-ui-entity-form-block .step[data-v-7dd2f21d]{align-items:center;background:#fff;background:var(--kui-color-background, #ffffff);border:1px solid #afb7c5;border:1px solid var(--kui-color-border-neutral-weak, #afb7c5);border-radius:100px;border-radius:var(--kui-border-radius-round, 100px);display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;padding:var(--kui-space-20, 4px);width:32px}.kong-ui-entity-form-block .header-content[data-v-7dd2f21d]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;gap:var(--kui-space-40, 8px);padding-top:4px;padding-top:var(--kui-space-20, 4px)}.kong-ui-entity-form-block .header-title[data-v-7dd2f21d]{color:#0d0e14;color:var(--kui-color-text, #0d0e14);font-size:18px;font-size:var(--kui-font-size-50, 18px);font-weight:700;font-weight:var(--kui-font-weight-bold, 700);line-height:24px;line-height:var(--kui-line-height-40, 24px);margin:0}.kong-ui-entity-form-block .header-description[data-v-7dd2f21d]{color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e);font-size:14px;font-size:var(--kui-font-size-30, 14px);line-height:20px;line-height:var(--kui-line-height-30, 20px);margin:0}.kong-ui-entity-form-block .header-extra[data-v-7dd2f21d]{align-items:center;display:flex;flex:0 0 auto;gap:8px;gap:var(--kui-space-40, 8px);justify-content:flex-end}.kong-ui-entity-form-block .content[data-v-7dd2f21d]{background:#fff;background:var(--kui-color-background, #ffffff);border:1px solid #e0e4ea;border:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);border-radius:6px;border-radius:var(--kui-border-radius-30, 6px);display:flex;flex-direction:column;gap:20px;gap:var(--kui-space-70, 20px);margin-top:20px;margin-top:var(--kui-space-70, 20px);padding:20px 24px;padding:var(--kui-space-70, 20px) var(--kui-space-80, 24px)}.kong-ui-entity-form-block.stepped .content[data-v-7dd2f21d]{margin-left:16px;margin-left:var(--kui-space-60, 16px)}.kong-ui-public-entity-link[data-v-6668aea9]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-6668aea9]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-6668aea9]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-6668aea9] .external-link-icon{color:#0044f4;color:var(--kui-color-text-primary, #0044f4);margin-left:4px;margin-left:var(--kui-space-20, 4px);padding:2px;padding:var(--kui-space-10, 2px)}.kong-ui-public-entity-link .entity-link-label[data-v-6668aea9]{display:inline-block;font-weight:400;font-weight:var(--kui-font-weight-regular, 400);max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-6668aea9]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-6668aea9]{margin-left:2px;margin-left:var(--kui-space-10, 2px)}.kong-ui-public-entity-empty-state[data-v-0b2e9081]{align-items:center;background-color:#fff;background-color:var(--kui-color-background, #ffffff);box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;font-family:var(--kui-font-family-text, "Inter", Roboto, Helvetica, sans-serif);gap:24px;gap:var(--kui-space-80, 24px);padding:64px 0;padding:var(--kui-space-130, 64px) var(--kui-space-0, 0px);width:100%}@media(min-width:640px){.kong-ui-public-entity-empty-state[data-v-0b2e9081]{padding:64px 96px;padding:var(--kui-space-130, 64px) var(--kui-space-150, 96px)}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-0b2e9081]{margin-bottom:8px;margin-bottom:var(--kui-space-40, 8px)}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-0b2e9081]{align-items:center;display:flex;flex-direction:column;gap:8px;gap:var(--kui-space-40, 8px);text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-0b2e9081]{align-items:center;color:#0d0e14;color:var(--kui-color-text, #0d0e14);display:flex;font-size:24px;font-size:var(--kui-font-size-70, 24px);font-weight:700;font-weight:var(--kui-font-weight-bold, 700);gap:8px;gap:var(--kui-space-40, 8px);line-height:32px;line-height:var(--kui-line-height-60, 32px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-0b2e9081]{font-size:18px;font-size:var(--kui-font-size-50, 18px)}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-0b2e9081],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-0b2e9081]{color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e);font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);line-height:20px;line-height:var(--kui-line-height-30, 20px);max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-0b2e9081],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-0b2e9081]{margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-0b2e9081]{margin-top:16px;margin-top:var(--kui-space-60, 16px)}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-0b2e9081]{color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e)}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-0b2e9081]{align-items:center;display:flex;gap:12px;gap:var(--kui-space-50, 12px)}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-0b2e9081]{display:flex;flex-wrap:wrap;gap:16px;gap:var(--kui-space-60, 16px);justify-content:space-around;margin-top:8px;margin-top:var(--kui-space-40, 8px);width:312px}@media(min-width:640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-0b2e9081]{width:calc(624px + kui-space-60);width:calc(2 * 312px + var(--kui-space-60, kui-space-60))}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-0b2e9081]{background-color:#f9fafb;background-color:var(--kui-color-background-neutral-weakest, #f9fafb);border:1px solid #e0e4ea;border:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);border-radius:6px;border-radius:var(--kui-border-radius-30, 6px);color:#afb7c5;color:var(--kui-color-text-neutral-weak, #afb7c5);gap:8px;gap:var(--kui-space-40, 8px);height:160px;padding:20px;padding:var(--kui-space-70, 20px);width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-0b2e9081]{color:#3a3f51;color:var(--kui-color-text-neutral-stronger, #3a3f51);display:flex;margin-bottom:12px;margin-bottom:var(--kui-space-50, 12px)}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-0b2e9081] .kui-icon{height:20px!important;height:var(--kui-icon-size-40, 20px)!important;width:20px!important;width:var(--kui-icon-size-40, 20px)!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-0b2e9081] .card-title{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-0b2e9081] .card-content{-webkit-box-orient:vertical;color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-0b2e9081]{border-top:1px solid #e0e4ea;border-top:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);display:flex;flex-direction:column;gap:16px;gap:var(--kui-space-60, 16px);padding-top:48px;padding-top:var(--kui-space-110, 48px);width:100%}@media(min-width:640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-0b2e9081]{width:calc(624px + kui-space-60);width:calc(2 * 312px + var(--kui-space-60, kui-space-60))}}.kong-ui-public-sensitive-input[data-v-f64f729c]{display:flex;flex-direction:column;gap:8px;gap:var(--kui-space-40, 8px)}.kong-ui-public-sensitive-input[data-v-f64f729c] .after-content-wrapper{align-items:center;gap:4px!important;gap:var(--kui-space-20, 4px)!important}.kong-ui-public-sensitive-input[data-v-f64f729c] .input{padding-right:var(--v673e9b78)!important}.kong-ui-public-sensitive-input .sensitive-input-action[data-v-f64f729c]{color:#0044f4;color:var(--kui-color-text-primary, #0044f4);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);white-space:nowrap}.kong-ui-public-sensitive-input .sensitive-input-toggle[data-v-f64f729c]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);cursor:pointer}.kong-ui-public-sensitive-input .sensitive-input-error-message[data-v-f64f729c]{color:#d60027;color:var(--kui-color-text-danger, #d60027);font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:-4px;margin-top:calc(-1 * var(--kui-space-20, 4px))}.kong-ui-public-sensitive-input .sensitive-input-textarea-actions[data-v-f64f729c]{display:flex;justify-content:flex-end}.kong-ui-public-sensitive-input .sensitive-input-hint[data-v-f64f729c]{align-items:center;background-color:#eefaff;background-color:var(--kui-color-background-info-weakest, #eefaff);border-radius:6px;border-radius:var(--kui-border-radius-30, 6px);color:#0044f4;color:var(--kui-color-text-info, #0044f4);display:flex;gap:8px;gap:var(--kui-space-40, 8px);padding:8px 12px;padding:var(--kui-space-40, 8px) var(--kui-space-50, 12px)}.kong-ui-public-sensitive-input .sensitive-input-hint .sensitive-input-hint-icon[data-v-f64f729c]{flex-shrink:0}.kong-ui-public-sensitive-input .sensitive-input-hint .sensitive-input-hint-text[data-v-f64f729c]{flex:1;font-size:14px;font-size:var(--kui-font-size-30, 14px)}.kong-ui-public-sensitive-input .sensitive-input-hint .sensitive-input-copy[data-v-f64f729c]{display:inline-flex;font-size:12px;font-size:var(--kui-font-size-20, 12px);gap:4px;gap:var(--kui-space-20, 4px)}.button-row[data-v-863b9beb]{align-items:center;display:flex;gap:12px;gap:var(--kui-space-50, 12px)}.kong-ui-entities-key-sets-list[data-v-863b9beb]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-863b9beb]{margin-right:12px;margin-right:var(--kui-space-50, 12px)}.kong-ui-entities-key-sets-form[data-v-e66ae12a]{width:100%}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { AxiosError } from 'axios';
|
|
3
|
+
import type { KongManagerKeySetEntityConfig, KonnectKeySetEntityConfig } from '../types';
|
|
4
|
+
import '@kong-ui-public/entities-shared/dist/style.css';
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
7
|
+
config: {
|
|
8
|
+
type: PropType<KonnectKeySetEntityConfig | KongManagerKeySetEntityConfig>;
|
|
9
|
+
required: true;
|
|
10
|
+
validator: (config: KonnectKeySetEntityConfig | KongManagerKeySetEntityConfig) => boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* External link for documentation that determines visibility of Documentation button
|
|
14
|
+
*/
|
|
15
|
+
configCardDoc: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
required: false;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Control visibility of card title content
|
|
22
|
+
*/
|
|
23
|
+
hideTitle: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
28
|
+
loading: (isLoading: boolean) => any;
|
|
29
|
+
"fetch:success": (data: Record<string, any>) => any;
|
|
30
|
+
"fetch:error": (error: AxiosError<unknown, any, any>) => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
33
|
+
config: {
|
|
34
|
+
type: PropType<KonnectKeySetEntityConfig | KongManagerKeySetEntityConfig>;
|
|
35
|
+
required: true;
|
|
36
|
+
validator: (config: KonnectKeySetEntityConfig | KongManagerKeySetEntityConfig) => boolean;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* External link for documentation that determines visibility of Documentation button
|
|
40
|
+
*/
|
|
41
|
+
configCardDoc: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
required: false;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Control visibility of card title content
|
|
48
|
+
*/
|
|
49
|
+
hideTitle: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{
|
|
54
|
+
onLoading?: ((isLoading: boolean) => any) | undefined;
|
|
55
|
+
"onFetch:success"?: ((data: Record<string, any>) => any) | undefined;
|
|
56
|
+
"onFetch:error"?: ((error: AxiosError<unknown, any, any>) => any) | undefined;
|
|
57
|
+
}>, {
|
|
58
|
+
configCardDoc: string;
|
|
59
|
+
hideTitle: boolean;
|
|
60
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
61
|
+
declare const _default: typeof __VLS_export;
|
|
62
|
+
export default _default;
|
|
63
|
+
//# sourceMappingURL=KeySetConfigCard.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeySetConfigCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetConfigCard.vue"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EAE1B,MAAM,UAAU,CAAA;AAIjB,OAAO,gDAAgD,CAAA;AA2HvD,QAAA,MAAM,YAAY;IAGhB,oHAAoH;;cAElG,QAAQ,CAAC,yBAAyB,GAAG,6BAA6B,CAAC;;4BAE/D,yBAAyB,GAAG,6BAA6B,KAAG,OAAO;;IAQzF;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;;IAtBH,oHAAoH;;cAElG,QAAQ,CAAC,yBAAyB,GAAG,6BAA6B,CAAC;;4BAE/D,yBAAyB,GAAG,6BAA6B,KAAG,OAAO;;IAQzF;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;;;;4EAMH,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { AxiosError } from 'axios';
|
|
3
|
+
import type { KonnectKeySetFormConfig, KongManagerKeySetFormConfig } from '../types';
|
|
4
|
+
import '@kong-ui-public/entities-shared/dist/style.css';
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
7
|
+
config: {
|
|
8
|
+
type: PropType<KonnectKeySetFormConfig | KongManagerKeySetFormConfig>;
|
|
9
|
+
required: true;
|
|
10
|
+
validator: (config: KonnectKeySetFormConfig | KongManagerKeySetFormConfig) => boolean;
|
|
11
|
+
};
|
|
12
|
+
/** If a valid Key Set ID is provided, it will put the form in Edit mode instead of Create */
|
|
13
|
+
keySetId: {
|
|
14
|
+
type: PropType<string | null>;
|
|
15
|
+
required: false;
|
|
16
|
+
default: null;
|
|
17
|
+
};
|
|
18
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
19
|
+
error: (error: AxiosError<unknown, any, any>) => any;
|
|
20
|
+
update: (data: Record<string, any>) => any;
|
|
21
|
+
loading: (isLoading: boolean) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
24
|
+
config: {
|
|
25
|
+
type: PropType<KonnectKeySetFormConfig | KongManagerKeySetFormConfig>;
|
|
26
|
+
required: true;
|
|
27
|
+
validator: (config: KonnectKeySetFormConfig | KongManagerKeySetFormConfig) => boolean;
|
|
28
|
+
};
|
|
29
|
+
/** If a valid Key Set ID is provided, it will put the form in Edit mode instead of Create */
|
|
30
|
+
keySetId: {
|
|
31
|
+
type: PropType<string | null>;
|
|
32
|
+
required: false;
|
|
33
|
+
default: null;
|
|
34
|
+
};
|
|
35
|
+
}>> & Readonly<{
|
|
36
|
+
onError?: ((error: AxiosError<unknown, any, any>) => any) | undefined;
|
|
37
|
+
onUpdate?: ((data: Record<string, any>) => any) | undefined;
|
|
38
|
+
onLoading?: ((isLoading: boolean) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
keySetId: string | null;
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
42
|
+
declare const _default: typeof __VLS_export;
|
|
43
|
+
export default _default;
|
|
44
|
+
//# sourceMappingURL=KeySetForm.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeySetForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetForm.vue"],"names":[],"mappings":"AA0NA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAGnC,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;AAUtD,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAG5B,MAAM,UAAU,CAAA;AAIjB,OAAO,gDAAgD,CAAA;AAsTvD,QAAA,MAAM,YAAY;IAGhB,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;IAQrF,6FAA6F;;cAE3E,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;;IAdzC,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;IAQrF,6FAA6F;;cAE3E,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;;;4EAKzC,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { AxiosError } from 'axios';
|
|
3
|
+
import type { KongManagerKeySetListConfig, KonnectKeySetListConfig, EntityRow, CopyEventPayload } from '../types';
|
|
4
|
+
import '@kong-ui-public/entities-shared/dist/style.css';
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
7
|
+
config: {
|
|
8
|
+
type: PropType<KonnectKeySetListConfig | KongManagerKeySetListConfig>;
|
|
9
|
+
required: true;
|
|
10
|
+
validator: (config: KonnectKeySetListConfig | KongManagerKeySetListConfig) => boolean;
|
|
11
|
+
};
|
|
12
|
+
cacheIdentifier: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
|
|
17
|
+
canCreate: {
|
|
18
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
19
|
+
required: false;
|
|
20
|
+
default: () => Promise<boolean>;
|
|
21
|
+
};
|
|
22
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
|
|
23
|
+
canDelete: {
|
|
24
|
+
type: PropType<(row: EntityRow) => boolean | Promise<boolean>>;
|
|
25
|
+
required: false;
|
|
26
|
+
default: () => Promise<boolean>;
|
|
27
|
+
};
|
|
28
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
|
|
29
|
+
canEdit: {
|
|
30
|
+
type: PropType<(row: EntityRow) => boolean | Promise<boolean>>;
|
|
31
|
+
required: false;
|
|
32
|
+
default: () => Promise<boolean>;
|
|
33
|
+
};
|
|
34
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can retrieve (view details) a given entity */
|
|
35
|
+
canRetrieve: {
|
|
36
|
+
type: PropType<(row: EntityRow) => boolean | Promise<boolean>>;
|
|
37
|
+
required: false;
|
|
38
|
+
default: () => Promise<boolean>;
|
|
39
|
+
};
|
|
40
|
+
/** default to false, setting to true will teleport the toolbar button to the destination in the consuming app */
|
|
41
|
+
useActionOutside: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
46
|
+
error: (error: AxiosError<unknown, any, any>) => any;
|
|
47
|
+
"click:learn-more": () => any;
|
|
48
|
+
"copy:success": (payload: CopyEventPayload) => any;
|
|
49
|
+
"copy:error": (payload: CopyEventPayload) => any;
|
|
50
|
+
"delete:success": (keySet: EntityRow) => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
52
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
53
|
+
config: {
|
|
54
|
+
type: PropType<KonnectKeySetListConfig | KongManagerKeySetListConfig>;
|
|
55
|
+
required: true;
|
|
56
|
+
validator: (config: KonnectKeySetListConfig | KongManagerKeySetListConfig) => boolean;
|
|
57
|
+
};
|
|
58
|
+
cacheIdentifier: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
|
|
63
|
+
canCreate: {
|
|
64
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
65
|
+
required: false;
|
|
66
|
+
default: () => Promise<boolean>;
|
|
67
|
+
};
|
|
68
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
|
|
69
|
+
canDelete: {
|
|
70
|
+
type: PropType<(row: EntityRow) => boolean | Promise<boolean>>;
|
|
71
|
+
required: false;
|
|
72
|
+
default: () => Promise<boolean>;
|
|
73
|
+
};
|
|
74
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
|
|
75
|
+
canEdit: {
|
|
76
|
+
type: PropType<(row: EntityRow) => boolean | Promise<boolean>>;
|
|
77
|
+
required: false;
|
|
78
|
+
default: () => Promise<boolean>;
|
|
79
|
+
};
|
|
80
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can retrieve (view details) a given entity */
|
|
81
|
+
canRetrieve: {
|
|
82
|
+
type: PropType<(row: EntityRow) => boolean | Promise<boolean>>;
|
|
83
|
+
required: false;
|
|
84
|
+
default: () => Promise<boolean>;
|
|
85
|
+
};
|
|
86
|
+
/** default to false, setting to true will teleport the toolbar button to the destination in the consuming app */
|
|
87
|
+
useActionOutside: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
}>> & Readonly<{
|
|
92
|
+
onError?: ((error: AxiosError<unknown, any, any>) => any) | undefined;
|
|
93
|
+
"onClick:learn-more"?: (() => any) | undefined;
|
|
94
|
+
"onCopy:success"?: ((payload: CopyEventPayload) => any) | undefined;
|
|
95
|
+
"onCopy:error"?: ((payload: CopyEventPayload) => any) | undefined;
|
|
96
|
+
"onDelete:success"?: ((keySet: EntityRow) => any) | undefined;
|
|
97
|
+
}>, {
|
|
98
|
+
cacheIdentifier: string;
|
|
99
|
+
canCreate: () => boolean | Promise<boolean>;
|
|
100
|
+
canDelete: (row: EntityRow) => boolean | Promise<boolean>;
|
|
101
|
+
canEdit: (row: EntityRow) => boolean | Promise<boolean>;
|
|
102
|
+
canRetrieve: (row: EntityRow) => boolean | Promise<boolean>;
|
|
103
|
+
useActionOutside: boolean;
|
|
104
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
105
|
+
declare const _default: typeof __VLS_export;
|
|
106
|
+
export default _default;
|
|
107
|
+
//# sourceMappingURL=KeySetList.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeySetList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetList.vue"],"names":[],"mappings":"AAwiBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAoBvC,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAA;AASjB,OAAO,gDAAgD,CAAA;AA29BvD,QAAA,MAAM,YAAY;IAGhB,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;;;;;IAYrF,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;;;;IAxCjH,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;;;;;IAYrF,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;;;;;qBAtB9E,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;uBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;4EAU3E,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;;;;AAG/B,wBAEC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import KeySetList from './components/KeySetList.vue';
|
|
2
|
+
import KeySetForm from './components/KeySetForm.vue';
|
|
3
|
+
import KeySetConfigCard from './components/KeySetConfigCard.vue';
|
|
4
|
+
export { KeySetList, KeySetForm, KeySetConfigCard };
|
|
5
|
+
export * from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,gBAAgB,MAAM,mCAAmC,CAAA;AAEhE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAA;AAEnD,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
list: {
|
|
3
|
+
konnect: string;
|
|
4
|
+
kongManager: string;
|
|
5
|
+
};
|
|
6
|
+
form: {
|
|
7
|
+
konnect: {
|
|
8
|
+
create: string;
|
|
9
|
+
edit: string;
|
|
10
|
+
};
|
|
11
|
+
kongManager: {
|
|
12
|
+
create: string;
|
|
13
|
+
edit: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=key-sets-endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key-sets-endpoints.d.ts","sourceRoot":"","sources":["../../src/key-sets-endpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAGA,wBAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAGA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { KonnectBaseEntityConfig, KongManagerBaseEntityConfig, ConfigurationSchemaItem } from '@kong-ui-public/entities-shared';
|
|
2
|
+
/** Konnect KeySet entity config */
|
|
3
|
+
export interface KonnectKeySetEntityConfig extends KonnectBaseEntityConfig {
|
|
4
|
+
}
|
|
5
|
+
/** Kong Manager KeySet entity config */
|
|
6
|
+
export interface KongManagerKeySetEntityConfig extends KongManagerBaseEntityConfig {
|
|
7
|
+
}
|
|
8
|
+
export interface KeySetConfigurationSchema {
|
|
9
|
+
id: ConfigurationSchemaItem;
|
|
10
|
+
name: ConfigurationSchemaItem;
|
|
11
|
+
last_updated: ConfigurationSchemaItem;
|
|
12
|
+
created: ConfigurationSchemaItem;
|
|
13
|
+
tags: ConfigurationSchemaItem;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=key-set-config-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key-set-config-card.d.ts","sourceRoot":"","sources":["../../../src/types/key-set-config-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAEpI,mCAAmC;AACnC,MAAM,WAAW,yBAA0B,SAAQ,uBAAuB;CAAG;AAE7E,wCAAwC;AACxC,MAAM,WAAW,6BAA8B,SAAQ,2BAA2B;CAAG;AAErF,MAAM,WAAW,yBAAyB;IAExC,EAAE,EAAE,uBAAuB,CAAA;IAC3B,IAAI,EAAE,uBAAuB,CAAA;IAC7B,YAAY,EAAE,uBAAuB,CAAA;IACrC,OAAO,EAAE,uBAAuB,CAAA;IAChC,IAAI,EAAE,uBAAuB,CAAA;CAC9B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
import type { KonnectBaseFormConfig, KongManagerBaseFormConfig } from '@kong-ui-public/entities-shared';
|
|
3
|
+
/** Konnect Key Set form config */
|
|
4
|
+
export interface KonnectKeySetFormConfig extends KonnectBaseFormConfig {
|
|
5
|
+
/** Route to return to if canceling create/edit a Key Set */
|
|
6
|
+
cancelRoute: RouteLocationRaw;
|
|
7
|
+
}
|
|
8
|
+
/** Kong Manager Key Set form config */
|
|
9
|
+
export interface KongManagerKeySetFormConfig extends KongManagerBaseFormConfig {
|
|
10
|
+
/** Route to return to if canceling create/edit a Key Set */
|
|
11
|
+
cancelRoute: RouteLocationRaw;
|
|
12
|
+
}
|
|
13
|
+
export interface KeySetFormFields {
|
|
14
|
+
name: string;
|
|
15
|
+
tags?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface KeySetFormState {
|
|
18
|
+
/** Form fields */
|
|
19
|
+
fields: KeySetFormFields;
|
|
20
|
+
/** Form readonly state (only used when saving entity details) */
|
|
21
|
+
isReadonly: boolean;
|
|
22
|
+
/** The error message to show on the form */
|
|
23
|
+
errorMessage: string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=key-set-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key-set-form.d.ts","sourceRoot":"","sources":["../../../src/types/key-set-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAEvG,kCAAkC;AAClC,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IACpE,4DAA4D;IAC5D,WAAW,EAAE,gBAAgB,CAAA;CAC9B;AAED,uCAAuC;AACvC,MAAM,WAAW,2BAA4B,SAAQ,yBAAyB;IAC5E,4DAA4D;IAC5D,WAAW,EAAE,gBAAgB,CAAA;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,kBAAkB;IAClB,MAAM,EAAE,gBAAgB,CAAA;IACxB,iEAAiE;IACjE,UAAU,EAAE,OAAO,CAAA;IACnB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAA;CACrB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
import type { FilterSchema, KongManagerBaseTableConfig, KonnectBaseTableConfig } from '@kong-ui-public/entities-shared';
|
|
3
|
+
export interface BaseKeySetListConfig {
|
|
4
|
+
/** Route for creating a key set */
|
|
5
|
+
createRoute: RouteLocationRaw;
|
|
6
|
+
/** A function that returns the route for viewing a key set */
|
|
7
|
+
getViewRoute: (id: string) => RouteLocationRaw;
|
|
8
|
+
/** A function that returns the route for editing a key set */
|
|
9
|
+
getEditRoute: (id: string) => RouteLocationRaw;
|
|
10
|
+
}
|
|
11
|
+
/** Konnect key list config */
|
|
12
|
+
export interface KonnectKeySetListConfig extends KonnectBaseTableConfig, BaseKeySetListConfig {
|
|
13
|
+
}
|
|
14
|
+
/** Kong Manager key list config */
|
|
15
|
+
export interface KongManagerKeySetListConfig extends KongManagerBaseTableConfig, BaseKeySetListConfig {
|
|
16
|
+
/** FilterSchema for fuzzy match */
|
|
17
|
+
filterSchema?: FilterSchema;
|
|
18
|
+
}
|
|
19
|
+
export interface EntityRow extends Record<string, any> {
|
|
20
|
+
id: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
kid: string;
|
|
23
|
+
}
|
|
24
|
+
/** Copy field event payload */
|
|
25
|
+
export interface CopyEventPayload {
|
|
26
|
+
/** The entity row */
|
|
27
|
+
entity: EntityRow;
|
|
28
|
+
/** The field being copied. If omitted, the entity JSON is being copied. */
|
|
29
|
+
field?: string;
|
|
30
|
+
/** The toaster message */
|
|
31
|
+
message: string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=key-set-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key-set-list.d.ts","sourceRoot":"","sources":["../../../src/types/key-set-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAEvH,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,WAAW,EAAE,gBAAgB,CAAA;IAC7B,8DAA8D;IAC9D,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,gBAAgB,CAAA;IAC9C,8DAA8D;IAC9D,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,gBAAgB,CAAA;CAC/C;AAED,8BAA8B;AAC9B,MAAM,WAAW,uBAAwB,SAAQ,sBAAsB,EAAE,oBAAoB;CAAG;AAEhG,mCAAmC;AACnC,MAAM,WAAW,2BAA4B,SAAQ,0BAA0B,EAAE,oBAAoB;IACnG,mCAAmC;IACnC,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B;AAED,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACpD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC/B,qBAAqB;IACrB,MAAM,EAAE,SAAS,CAAA;IACjB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-key-sets",
|
|
3
|
-
"version": "3.14.2
|
|
3
|
+
"version": "3.14.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-key-sets.umd.js",
|
|
6
6
|
"module": "./dist/entities-key-sets.es.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@kong-ui-public/entities-shared": "^3.68.2
|
|
24
|
+
"@kong-ui-public/entities-shared": "^3.68.2",
|
|
25
25
|
"@kong-ui-public/i18n": "^2.5.1",
|
|
26
26
|
"@kong/icons": "^1.58.0",
|
|
27
27
|
"@kong/kongponents": "^9.64.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vue-router": "^4.6.4 || ^5.0.6"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@kong-ui-public/entities-shared": "^3.68.2
|
|
33
|
+
"@kong-ui-public/entities-shared": "^3.68.2",
|
|
34
34
|
"@kong-ui-public/i18n": "^2.5.1",
|
|
35
35
|
"@kong/icons": "^1.62.1",
|
|
36
36
|
"@kong/kongponents": "9.64.18",
|