@kong-ui-public/entities-consumer-credentials 3.8.2-pr.3235.1ca65bc7d.0 → 3.8.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.
@@ -0,0 +1,536 @@
1
+ import { defineComponent as Y, computed as T, ref as b, watch as Z, onBeforeMount as ee, resolveComponent as D, openBlock as _, createElementBlock as te, createVNode as l, unref as r, withCtx as a, createTextVNode as y, toDisplayString as u, createBlock as C, createCommentVNode as I, createElementVNode as B, Teleport as ae } from "vue";
2
+ import { AddIcon as ne } from "@kong/icons";
3
+ import { createI18n as ce, i18nTComponent as le } from "@kong-ui-public/i18n";
4
+ import { useAxios as ie, useFetcher as re, useDeleteUrlBuilder as se, EntityTypes as oe, FetcherStatus as de, EntityBaseTable as ue, PermissionsWrapper as j, TableTags as he, EntityDeleteModal as ye } from "@kong-ui-public/entities-shared";
5
+ const pe = {
6
+ title: "Consumer credentials",
7
+ list: {
8
+ toolbar_actions: {
9
+ acls: {
10
+ new: "New ACL credential"
11
+ },
12
+ "basic-auth": {
13
+ new: "New Basic Auth credential"
14
+ },
15
+ "key-auth": {
16
+ new: "New Key Auth credential"
17
+ },
18
+ "key-auth-enc": {
19
+ new: "New Key Auth encrypted credential"
20
+ },
21
+ oauth2: {
22
+ new: "New OAuth 2.0 credential"
23
+ },
24
+ "hmac-auth": {
25
+ new: "New HMAC credential"
26
+ },
27
+ jwt: {
28
+ new: "New JWT credential"
29
+ }
30
+ },
31
+ table_headers: {
32
+ acls: {
33
+ group: "Group",
34
+ created_at: "Created at",
35
+ tags: "Tags"
36
+ },
37
+ "basic-auth": {
38
+ password: "Credential",
39
+ username: "Username",
40
+ created_at: "Created at",
41
+ tags: "Tags"
42
+ },
43
+ "key-auth": {
44
+ key: "Key",
45
+ created_at: "Created at",
46
+ tags: "Tags"
47
+ },
48
+ "key-auth-enc": {
49
+ key: "Key",
50
+ created_at: "Created at",
51
+ tags: "Tags"
52
+ },
53
+ oauth2: {
54
+ name: "Name",
55
+ client_id: "Client ID",
56
+ client_secret: "Client secret",
57
+ created_at: "Created at",
58
+ tags: "Tags"
59
+ },
60
+ "hmac-auth": {
61
+ username: "Username",
62
+ secret: "Secret",
63
+ created_at: "Created at",
64
+ tags: "Tags"
65
+ },
66
+ jwt: {
67
+ key: "Key",
68
+ algorithm: "Algorithm",
69
+ created_at: "Created at",
70
+ tags: "Tags"
71
+ }
72
+ },
73
+ empty_state: {
74
+ acls: {
75
+ title: "Configure a New ACL credential",
76
+ cta: "New ACL credential"
77
+ },
78
+ "basic-auth": {
79
+ title: "Configure a New Basic Auth credential",
80
+ cta: "New Basic Auth credential"
81
+ },
82
+ "key-auth": {
83
+ title: "Configure a New Key Auth credential",
84
+ cta: "New Key Auth credential"
85
+ },
86
+ "key-auth-enc": {
87
+ title: "Configure a New Key Auth Encrypted credential",
88
+ cta: "New Key Auth Encrypted credential"
89
+ },
90
+ oauth2: {
91
+ title: "Configure a New OAuth 2.0 credential",
92
+ cta: "New OAuth 2.0 credential"
93
+ },
94
+ "hmac-auth": {
95
+ title: "Configure a New HMAC credential",
96
+ cta: "New HMAC credential"
97
+ },
98
+ jwt: {
99
+ title: "Configure a New JWT credential",
100
+ cta: "New JWT credential"
101
+ }
102
+ }
103
+ },
104
+ actions: {
105
+ copy_id: "Copy ID",
106
+ copy_credential: "Copy credential",
107
+ copy_key: "Copy key",
108
+ copy_secret: "Copy secret",
109
+ copy_json: "Copy JSON",
110
+ edit: "Edit",
111
+ delete: "Delete"
112
+ },
113
+ delete: {
114
+ acls: {
115
+ title: "Delete an ACL credential"
116
+ },
117
+ "basic-auth": {
118
+ title: "Delete a Basic Auth credential"
119
+ },
120
+ "key-auth": {
121
+ title: "Delete a Key Auth credential"
122
+ },
123
+ "key-auth-enc": {
124
+ title: "Delete a Key Auth encrypted credential"
125
+ },
126
+ oauth2: {
127
+ title: "Delete an OAuth 2.0 credential"
128
+ },
129
+ "hmac-auth": {
130
+ title: "Delete an HMAC credential"
131
+ },
132
+ jwt: {
133
+ title: "Delete a JWT credential"
134
+ },
135
+ description: "This action cannot be reversed."
136
+ },
137
+ error: {
138
+ general: "Credentials could not be retrieved",
139
+ delete: "The credential could not be deleted at this time.",
140
+ copy: "Failed to copy to clipboard"
141
+ },
142
+ copy: {
143
+ success: "Copied {val} to clipboard",
144
+ success_brief: "Successfully copied to clipboard"
145
+ }
146
+ }, ge = {
147
+ credentials: pe
148
+ };
149
+ function fe() {
150
+ const n = ce("en-us", ge);
151
+ return {
152
+ i18n: n,
153
+ i18nT: le(n)
154
+ // Translation component <i18n-t>
155
+ };
156
+ }
157
+ const me = {
158
+ useI18n: fe
159
+ }, be = {
160
+ list: {
161
+ konnect: "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}/consumers/{consumerId}/{plugin}",
162
+ kongManager: "/{workspace}/consumers/{consumerId}/{plugin}"
163
+ }
164
+ }, _e = { class: "kong-ui-entities-consumer-credentials-list" }, ke = /* @__PURE__ */ Y({
165
+ __name: "ConsumerCredentialList",
166
+ props: {
167
+ /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
168
+ config: {
169
+ type: Object,
170
+ required: !0,
171
+ validator: (n) => !(!n || !["konnect", "kongManager"].includes(n == null ? void 0 : n.app) || !n.createRoute || !n.getEditRoute)
172
+ },
173
+ // used to override the default identifier for the cache entry
174
+ cacheIdentifier: {
175
+ type: String,
176
+ default: ""
177
+ },
178
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
179
+ canCreate: {
180
+ type: Function,
181
+ required: !1,
182
+ default: async () => !0
183
+ },
184
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
185
+ canDelete: {
186
+ type: Function,
187
+ required: !1,
188
+ default: async () => !0
189
+ },
190
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
191
+ canEdit: {
192
+ type: Function,
193
+ required: !1,
194
+ default: async () => !0
195
+ },
196
+ /** default to false, setting to true will teleport the toolbar button to the destination in the consuming app */
197
+ useActionOutside: {
198
+ type: Boolean,
199
+ default: !1
200
+ }
201
+ },
202
+ emits: ["error", "copy:success", "copy:error", "delete:success"],
203
+ setup(n, { emit: K }) {
204
+ var O;
205
+ const p = K, i = n, { i18n: { t: e, formatUnixTimeStamp: S } } = me.useI18n(), { axiosInstance: P } = ie((O = i.config) == null ? void 0 : O.axiosRequestConfig), F = {
206
+ acls: {
207
+ group: { label: e("credentials.list.table_headers.acls.group") },
208
+ created_at: { label: e("credentials.list.table_headers.acls.created_at") },
209
+ tags: { label: e("credentials.list.table_headers.acls.tags") }
210
+ },
211
+ "basic-auth": {
212
+ username: { label: e("credentials.list.table_headers.basic-auth.username") },
213
+ created_at: { label: e("credentials.list.table_headers.basic-auth.created_at") },
214
+ tags: { label: e("credentials.list.table_headers.basic-auth.tags") }
215
+ },
216
+ "key-auth": {
217
+ key: { label: e("credentials.list.table_headers.key-auth.key") },
218
+ created_at: { label: e("credentials.list.table_headers.key-auth.created_at") },
219
+ tags: { label: e("credentials.list.table_headers.key-auth.tags") }
220
+ },
221
+ "key-auth-enc": {
222
+ key: { label: e("credentials.list.table_headers.key-auth-enc.key") },
223
+ created_at: { label: e("credentials.list.table_headers.key-auth-enc.created_at") },
224
+ tags: { label: e("credentials.list.table_headers.key-auth-enc.tags") }
225
+ },
226
+ oauth2: {
227
+ name: { label: e("credentials.list.table_headers.oauth2.name") },
228
+ client_id: { label: e("credentials.list.table_headers.oauth2.client_id") },
229
+ client_secret: { label: e("credentials.list.table_headers.oauth2.client_secret") },
230
+ created_at: { label: e("credentials.list.table_headers.oauth2.created_at") },
231
+ tags: { label: e("credentials.list.table_headers.oauth2.tags") }
232
+ },
233
+ "hmac-auth": {
234
+ username: { label: e("credentials.list.table_headers.hmac-auth.username") },
235
+ secret: { label: e("credentials.list.table_headers.hmac-auth.secret") },
236
+ created_at: { label: e("credentials.list.table_headers.hmac-auth.created_at") },
237
+ tags: { label: e("credentials.list.table_headers.hmac-auth.tags") }
238
+ },
239
+ jwt: {
240
+ key: { label: e("credentials.list.table_headers.jwt.key") },
241
+ algorithm: { label: e("credentials.list.table_headers.jwt.algorithm") },
242
+ created_at: { label: e("credentials.list.table_headers.jwt.created_at") },
243
+ tags: { label: e("credentials.list.table_headers.jwt.tags") }
244
+ }
245
+ }, R = T(() => F[i.config.plugin]), $ = T(() => {
246
+ let c = `${i.config.apiBaseUrl}${be.list[i.config.app]}`;
247
+ return i.config.app === "konnect" && (c = c.replace(/{controlPlaneId}/gi, i.config.controlPlaneId || "")), c.replace(/\/{workspace}/gi, i.config.workspace ? `/${i.config.workspace}` : "").replace(/{consumerId}/gi, i.config.consumerId || "").replace(/{plugin}/gi, i.config.plugin || "");
248
+ }), {
249
+ fetcher: U,
250
+ fetcherState: J,
251
+ fetcherCacheKey: x
252
+ } = re(T(() => ({ ...i.config, cacheIdentifier: i.cacheIdentifier })), $), L = () => {
253
+ x.value++;
254
+ }, v = b(null), f = async (c, s, h) => {
255
+ const o = s ? c[s] : JSON.stringify(c);
256
+ if (!await h(o)) {
257
+ H(c, s);
258
+ return;
259
+ }
260
+ q(c, s);
261
+ }, q = (c, s) => {
262
+ p("copy:success", {
263
+ entity: c,
264
+ field: s,
265
+ message: s && !["password", "key", "client_secret", "secret"].includes(s) ? e("credentials.copy.success", { val: c[s] }) : e("credentials.copy.success_brief")
266
+ });
267
+ }, H = (c, s) => {
268
+ p("copy:error", {
269
+ entity: c,
270
+ field: s,
271
+ message: e("credentials.error.copy")
272
+ });
273
+ }, V = (c) => ({
274
+ label: e("credentials.actions.edit"),
275
+ to: i.config.getEditRoute(c)
276
+ }), w = b(void 0), A = b(!1), N = b(!1), M = b(""), W = se(i.config, $.value), z = T(() => oe[i.config.plugin]), G = (c) => {
277
+ w.value = c, A.value = !0;
278
+ }, Q = () => {
279
+ A.value = !1;
280
+ }, X = async () => {
281
+ var c, s, h;
282
+ if ((c = w.value) != null && c.id) {
283
+ N.value = !0;
284
+ try {
285
+ await P.delete(W(w.value.id)), N.value = !1, A.value = !1, x.value++, p("delete:success", w.value);
286
+ } catch (o) {
287
+ M.value = ((h = (s = o.response) == null ? void 0 : s.data) == null ? void 0 : h.message) || o.message || e("credentials.error.delete"), p("error", o);
288
+ } finally {
289
+ N.value = !1;
290
+ }
291
+ }
292
+ };
293
+ Z(J, (c) => {
294
+ var s, h, o;
295
+ if (c.status === de.Error) {
296
+ v.value = {
297
+ title: e("credentials.error.general")
298
+ }, (o = (h = (s = c.error) == null ? void 0 : s.response) == null ? void 0 : h.data) != null && o.message && (v.value.message = c.error.response.data.message), p("error", c.error);
299
+ return;
300
+ }
301
+ v.value = null;
302
+ });
303
+ const E = b({
304
+ ctaPath: i.config.createRoute,
305
+ ctaText: void 0,
306
+ message: "",
307
+ title: e("credentials.title")
308
+ });
309
+ return ee(async () => {
310
+ await i.canCreate() && (E.value.title = e(`credentials.list.empty_state.${i.config.plugin}.title`), E.value.ctaText = e(`credentials.list.empty_state.${i.config.plugin}.cta`));
311
+ }), (c, s) => {
312
+ const h = D("KButton"), o = D("KCopy"), g = D("KDropdownItem"), m = D("KClipboardProvider");
313
+ return _(), te("div", _e, [
314
+ l(r(ue), {
315
+ "cache-identifier": n.cacheIdentifier,
316
+ "disable-row-click": "",
317
+ "disable-sorting": "",
318
+ "empty-state-options": E.value,
319
+ "enable-entity-actions": "",
320
+ "error-message": v.value,
321
+ fetcher: r(U),
322
+ "fetcher-cache-key": r(x),
323
+ "pagination-type": "offset",
324
+ "preferences-storage-key": "kong-ui-entities-consumer-credentials-list",
325
+ "table-headers": R.value,
326
+ onSort: L
327
+ }, {
328
+ "toolbar-button": a(() => [
329
+ (_(), C(ae, {
330
+ disabled: !n.useActionOutside,
331
+ to: "#kong-ui-app-page-header-action-button"
332
+ }, [
333
+ l(r(j), {
334
+ "auth-function": () => n.canCreate()
335
+ }, {
336
+ default: a(() => [
337
+ l(h, {
338
+ appearance: "primary",
339
+ "data-testid": "toolbar-add-credential",
340
+ size: n.useActionOutside ? "medium" : "large",
341
+ to: n.config.createRoute
342
+ }, {
343
+ default: a(() => [
344
+ l(r(ne)),
345
+ y(" " + u(r(e)(`credentials.list.toolbar_actions.${n.config.plugin}.new`)), 1)
346
+ ]),
347
+ _: 1
348
+ }, 8, ["size", "to"])
349
+ ]),
350
+ _: 1
351
+ }, 8, ["auth-function"])
352
+ ], 8, ["disabled"]))
353
+ ]),
354
+ group: a(({ rowValue: t }) => [
355
+ B("b", null, u(t ?? "-"), 1)
356
+ ]),
357
+ name: a(({ rowValue: t }) => [
358
+ B("b", null, u(t ?? "-"), 1)
359
+ ]),
360
+ username: a(({ rowValue: t }) => [
361
+ B("span", null, u(t ?? "-"), 1)
362
+ ]),
363
+ password: a(({ rowValue: t }) => [
364
+ l(o, {
365
+ format: "redacted",
366
+ text: t,
367
+ truncate: ""
368
+ }, null, 8, ["text"])
369
+ ]),
370
+ key: a(({ rowValue: t }) => [
371
+ l(o, {
372
+ format: "redacted",
373
+ text: t,
374
+ truncate: ""
375
+ }, null, 8, ["text"])
376
+ ]),
377
+ client_secret: a(({ rowValue: t }) => [
378
+ l(o, {
379
+ format: "redacted",
380
+ text: t,
381
+ truncate: ""
382
+ }, null, 8, ["text"])
383
+ ]),
384
+ secret: a(({ rowValue: t }) => [
385
+ l(o, {
386
+ format: "redacted",
387
+ text: t,
388
+ truncate: ""
389
+ }, null, 8, ["text"])
390
+ ]),
391
+ created_at: a(({ rowValue: t }) => [
392
+ y(u(r(S)(t)), 1)
393
+ ]),
394
+ tags: a(({ rowValue: t }) => [
395
+ l(r(he), { tags: t }, null, 8, ["tags"])
396
+ ]),
397
+ actions: a(({ row: t }) => [
398
+ l(m, null, {
399
+ default: a(({ copyToClipboard: d }) => [
400
+ l(g, {
401
+ "data-testid": "action-entity-copy-id",
402
+ onClick: (k) => f(t, "id", d)
403
+ }, {
404
+ default: a(() => [
405
+ y(u(r(e)("credentials.actions.copy_id")), 1)
406
+ ]),
407
+ _: 1
408
+ }, 8, ["onClick"])
409
+ ]),
410
+ _: 2
411
+ }, 1024),
412
+ n.config.plugin === "basic-auth" ? (_(), C(m, { key: 0 }, {
413
+ default: a(({ copyToClipboard: d }) => [
414
+ l(g, {
415
+ "data-testid": "action-entity-copy-credential",
416
+ onClick: (k) => f(t, "password", d)
417
+ }, {
418
+ default: a(() => [
419
+ y(u(r(e)("credentials.actions.copy_credential")), 1)
420
+ ]),
421
+ _: 1
422
+ }, 8, ["onClick"])
423
+ ]),
424
+ _: 2
425
+ }, 1024)) : I("", !0),
426
+ ["key-auth", "key-auth-enc", "jwt"].includes(n.config.plugin) ? (_(), C(m, { key: 1 }, {
427
+ default: a(({ copyToClipboard: d }) => [
428
+ l(g, {
429
+ "data-testid": "action-entity-copy-key",
430
+ onClick: (k) => f(t, "key", d)
431
+ }, {
432
+ default: a(() => [
433
+ y(u(r(e)("credentials.actions.copy_key")), 1)
434
+ ]),
435
+ _: 1
436
+ }, 8, ["onClick"])
437
+ ]),
438
+ _: 2
439
+ }, 1024)) : I("", !0),
440
+ n.config.plugin === "oauth2" ? (_(), C(m, { key: 2 }, {
441
+ default: a(({ copyToClipboard: d }) => [
442
+ l(g, {
443
+ "data-testid": "action-entity-copy-secret",
444
+ onClick: (k) => f(t, "client_secret", d)
445
+ }, {
446
+ default: a(() => [
447
+ y(u(r(e)("credentials.actions.copy_secret")), 1)
448
+ ]),
449
+ _: 1
450
+ }, 8, ["onClick"])
451
+ ]),
452
+ _: 2
453
+ }, 1024)) : I("", !0),
454
+ n.config.plugin === "hmac-auth" ? (_(), C(m, { key: 3 }, {
455
+ default: a(({ copyToClipboard: d }) => [
456
+ l(g, {
457
+ "data-testid": "action-entity-copy-secret",
458
+ onClick: (k) => f(t, "secret", d)
459
+ }, {
460
+ default: a(() => [
461
+ y(u(r(e)("credentials.actions.copy_secret")), 1)
462
+ ]),
463
+ _: 1
464
+ }, 8, ["onClick"])
465
+ ]),
466
+ _: 2
467
+ }, 1024)) : I("", !0),
468
+ l(m, null, {
469
+ default: a(({ copyToClipboard: d }) => [
470
+ l(g, {
471
+ "data-testid": "action-entity-copy-json",
472
+ onClick: (k) => f(t, void 0, d)
473
+ }, {
474
+ default: a(() => [
475
+ y(u(r(e)("credentials.actions.copy_json")), 1)
476
+ ]),
477
+ _: 1
478
+ }, 8, ["onClick"])
479
+ ]),
480
+ _: 2
481
+ }, 1024),
482
+ l(r(j), {
483
+ "auth-function": () => n.canEdit(t)
484
+ }, {
485
+ default: a(() => [
486
+ l(g, {
487
+ "data-testid": "action-entity-edit",
488
+ "has-divider": "",
489
+ item: V(t.id)
490
+ }, null, 8, ["item"])
491
+ ]),
492
+ _: 2
493
+ }, 1032, ["auth-function"]),
494
+ l(r(j), {
495
+ "auth-function": () => n.canDelete(t)
496
+ }, {
497
+ default: a(() => [
498
+ l(g, {
499
+ danger: "",
500
+ "data-testid": "action-entity-delete",
501
+ "has-divider": "",
502
+ onClick: (d) => G(t)
503
+ }, {
504
+ default: a(() => [
505
+ y(u(r(e)("credentials.actions.delete")), 1)
506
+ ]),
507
+ _: 1
508
+ }, 8, ["onClick"])
509
+ ]),
510
+ _: 2
511
+ }, 1032, ["auth-function"])
512
+ ]),
513
+ _: 1
514
+ }, 8, ["cache-identifier", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "table-headers"]),
515
+ l(r(ye), {
516
+ "action-pending": N.value,
517
+ description: r(e)("credentials.delete.description"),
518
+ "entity-type": z.value,
519
+ error: M.value,
520
+ title: r(e)(`credentials.delete.${n.config.plugin}.title`),
521
+ visible: A.value,
522
+ onCancel: Q,
523
+ onProceed: X
524
+ }, null, 8, ["action-pending", "description", "entity-type", "error", "title", "visible"])
525
+ ]);
526
+ };
527
+ }
528
+ }), Ce = (n, K) => {
529
+ const p = n.__vccOpts || n;
530
+ for (const [i, e] of K)
531
+ p[i] = e;
532
+ return p;
533
+ }, Te = /* @__PURE__ */ Ce(ke, [["__scopeId", "data-v-a8e45434"]]);
534
+ export {
535
+ Te as ConsumerCredentialList
536
+ };
@@ -0,0 +1 @@
1
+ (function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d["kong-ui-public-entities-consumer-credentials"]={},d.Vue,d.KongIcons,d["kong-ui-public-i18n"],d["kong-ui-public-entities-shared"]))})(this,function(d,e,A,x,o){"use strict";const B={credentials:{title:"Consumer credentials",list:{toolbar_actions:{acls:{new:"New ACL credential"},"basic-auth":{new:"New Basic Auth credential"},"key-auth":{new:"New Key Auth credential"},"key-auth-enc":{new:"New Key Auth encrypted credential"},oauth2:{new:"New OAuth 2.0 credential"},"hmac-auth":{new:"New HMAC credential"},jwt:{new:"New JWT credential"}},table_headers:{acls:{group:"Group",created_at:"Created at",tags:"Tags"},"basic-auth":{password:"Credential",username:"Username",created_at:"Created at",tags:"Tags"},"key-auth":{key:"Key",created_at:"Created at",tags:"Tags"},"key-auth-enc":{key:"Key",created_at:"Created at",tags:"Tags"},oauth2:{name:"Name",client_id:"Client ID",client_secret:"Client secret",created_at:"Created at",tags:"Tags"},"hmac-auth":{username:"Username",secret:"Secret",created_at:"Created at",tags:"Tags"},jwt:{key:"Key",algorithm:"Algorithm",created_at:"Created at",tags:"Tags"}},empty_state:{acls:{title:"Configure a New ACL credential",cta:"New ACL credential"},"basic-auth":{title:"Configure a New Basic Auth credential",cta:"New Basic Auth credential"},"key-auth":{title:"Configure a New Key Auth credential",cta:"New Key Auth credential"},"key-auth-enc":{title:"Configure a New Key Auth Encrypted credential",cta:"New Key Auth Encrypted credential"},oauth2:{title:"Configure a New OAuth 2.0 credential",cta:"New OAuth 2.0 credential"},"hmac-auth":{title:"Configure a New HMAC credential",cta:"New HMAC credential"},jwt:{title:"Configure a New JWT credential",cta:"New JWT credential"}}},actions:{copy_id:"Copy ID",copy_credential:"Copy credential",copy_key:"Copy key",copy_secret:"Copy secret",copy_json:"Copy JSON",edit:"Edit",delete:"Delete"},delete:{acls:{title:"Delete an ACL credential"},"basic-auth":{title:"Delete a Basic Auth credential"},"key-auth":{title:"Delete a Key Auth credential"},"key-auth-enc":{title:"Delete a Key Auth encrypted credential"},oauth2:{title:"Delete an OAuth 2.0 credential"},"hmac-auth":{title:"Delete an HMAC credential"},jwt:{title:"Delete a JWT credential"},description:"This action cannot be reversed."},error:{general:"Credentials could not be retrieved",delete:"The credential 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"}}};function I(){const n=x.createI18n("en-us",B);return{i18n:n,i18nT:x.i18nTComponent(n)}}const K={useI18n:I},E={list:{konnect:"/v2/control-planes/{controlPlaneId}/core-entities/{workspace}/consumers/{consumerId}/{plugin}",kongManager:"/{workspace}/consumers/{consumerId}/{plugin}"}},j={class:"kong-ui-entities-consumer-credentials-list"},S=((n,k)=>{const p=n.__vccOpts||n;for(const[i,t]of k)p[i]=t;return p})(e.defineComponent({__name:"ConsumerCredentialList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getEditRoute)},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},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(n,{emit:k}){var D;const p=k,i=n,{i18n:{t,formatUnixTimeStamp:$}}=K.useI18n(),{axiosInstance:M}=o.useAxios((D=i.config)==null?void 0:D.axiosRequestConfig),O={acls:{group:{label:t("credentials.list.table_headers.acls.group")},created_at:{label:t("credentials.list.table_headers.acls.created_at")},tags:{label:t("credentials.list.table_headers.acls.tags")}},"basic-auth":{username:{label:t("credentials.list.table_headers.basic-auth.username")},created_at:{label:t("credentials.list.table_headers.basic-auth.created_at")},tags:{label:t("credentials.list.table_headers.basic-auth.tags")}},"key-auth":{key:{label:t("credentials.list.table_headers.key-auth.key")},created_at:{label:t("credentials.list.table_headers.key-auth.created_at")},tags:{label:t("credentials.list.table_headers.key-auth.tags")}},"key-auth-enc":{key:{label:t("credentials.list.table_headers.key-auth-enc.key")},created_at:{label:t("credentials.list.table_headers.key-auth-enc.created_at")},tags:{label:t("credentials.list.table_headers.key-auth-enc.tags")}},oauth2:{name:{label:t("credentials.list.table_headers.oauth2.name")},client_id:{label:t("credentials.list.table_headers.oauth2.client_id")},client_secret:{label:t("credentials.list.table_headers.oauth2.client_secret")},created_at:{label:t("credentials.list.table_headers.oauth2.created_at")},tags:{label:t("credentials.list.table_headers.oauth2.tags")}},"hmac-auth":{username:{label:t("credentials.list.table_headers.hmac-auth.username")},secret:{label:t("credentials.list.table_headers.hmac-auth.secret")},created_at:{label:t("credentials.list.table_headers.hmac-auth.created_at")},tags:{label:t("credentials.list.table_headers.hmac-auth.tags")}},jwt:{key:{label:t("credentials.list.table_headers.jwt.key")},algorithm:{label:t("credentials.list.table_headers.jwt.algorithm")},created_at:{label:t("credentials.list.table_headers.jwt.created_at")},tags:{label:t("credentials.list.table_headers.jwt.tags")}}},P=e.computed(()=>O[i.config.plugin]),V=e.computed(()=>{let c=`${i.config.apiBaseUrl}${E.list[i.config.app]}`;return i.config.app==="konnect"&&(c=c.replace(/{controlPlaneId}/gi,i.config.controlPlaneId||"")),c.replace(/\/{workspace}/gi,i.config.workspace?`/${i.config.workspace}`:"").replace(/{consumerId}/gi,i.config.consumerId||"").replace(/{plugin}/gi,i.config.plugin||"")}),{fetcher:q,fetcherState:F,fetcherCacheKey:w}=o.useFetcher(e.computed(()=>({...i.config,cacheIdentifier:i.cacheIdentifier})),V),L=()=>{w.value++},m=e.ref(null),y=async(c,r,u)=>{const l=r?c[r]:JSON.stringify(c);if(!await u(l)){U(c,r);return}R(c,r)},R=(c,r)=>{p("copy:success",{entity:c,field:r,message:r&&!["password","key","client_secret","secret"].includes(r)?t("credentials.copy.success",{val:c[r]}):t("credentials.copy.success_brief")})},U=(c,r)=>{p("copy:error",{entity:c,field:r,message:t("credentials.error.copy")})},W=c=>({label:t("credentials.actions.edit"),to:i.config.getEditRoute(c)}),C=e.ref(void 0),b=e.ref(!1),_=e.ref(!1),T=e.ref(""),J=o.useDeleteUrlBuilder(i.config,V.value),H=e.computed(()=>o.EntityTypes[i.config.plugin]),z=c=>{C.value=c,b.value=!0},G=()=>{b.value=!1},Q=async()=>{var c,r,u;if((c=C.value)!=null&&c.id){_.value=!0;try{await M.delete(J(C.value.id)),_.value=!1,b.value=!1,w.value++,p("delete:success",C.value)}catch(l){T.value=((u=(r=l.response)==null?void 0:r.data)==null?void 0:u.message)||l.message||t("credentials.error.delete"),p("error",l)}finally{_.value=!1}}};e.watch(F,c=>{var r,u,l;if(c.status===o.FetcherStatus.Error){m.value={title:t("credentials.error.general")},(l=(u=(r=c.error)==null?void 0:r.response)==null?void 0:u.data)!=null&&l.message&&(m.value.message=c.error.response.data.message),p("error",c.error);return}m.value=null});const N=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:"",title:t("credentials.title")});return e.onBeforeMount(async()=>{await i.canCreate()&&(N.value.title=t(`credentials.list.empty_state.${i.config.plugin}.title`),N.value.ctaText=t(`credentials.list.empty_state.${i.config.plugin}.cta`))}),(c,r)=>{const u=e.resolveComponent("KButton"),l=e.resolveComponent("KCopy"),h=e.resolveComponent("KDropdownItem"),f=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",j,[e.createVNode(e.unref(o.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"disable-row-click":"","disable-sorting":"","empty-state-options":N.value,"enable-entity-actions":"","error-message":m.value,fetcher:e.unref(q),"fetcher-cache-key":e.unref(w),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-consumer-credentials-list","table-headers":P.value,onSort:L},{"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(o.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.createVNode(u,{appearance:"primary","data-testid":"toolbar-add-credential",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(A.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(t)(`credentials.list.toolbar_actions.${n.config.plugin}.new`)),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),group:e.withCtx(({rowValue:a})=>[e.createElementVNode("b",null,e.toDisplayString(a??"-"),1)]),name:e.withCtx(({rowValue:a})=>[e.createElementVNode("b",null,e.toDisplayString(a??"-"),1)]),username:e.withCtx(({rowValue:a})=>[e.createElementVNode("span",null,e.toDisplayString(a??"-"),1)]),password:e.withCtx(({rowValue:a})=>[e.createVNode(l,{format:"redacted",text:a,truncate:""},null,8,["text"])]),key:e.withCtx(({rowValue:a})=>[e.createVNode(l,{format:"redacted",text:a,truncate:""},null,8,["text"])]),client_secret:e.withCtx(({rowValue:a})=>[e.createVNode(l,{format:"redacted",text:a,truncate:""},null,8,["text"])]),secret:e.withCtx(({rowValue:a})=>[e.createVNode(l,{format:"redacted",text:a,truncate:""},null,8,["text"])]),created_at:e.withCtx(({rowValue:a})=>[e.createTextVNode(e.toDisplayString(e.unref($)(a)),1)]),tags:e.withCtx(({rowValue:a})=>[e.createVNode(e.unref(o.TableTags),{tags:a},null,8,["tags"])]),actions:e.withCtx(({row:a})=>[e.createVNode(f,null,{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(h,{"data-testid":"action-entity-copy-id",onClick:g=>y(a,"id",s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("credentials.actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),n.config.plugin==="basic-auth"?(e.openBlock(),e.createBlock(f,{key:0},{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(h,{"data-testid":"action-entity-copy-credential",onClick:g=>y(a,"password",s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("credentials.actions.copy_credential")),1)]),_:1},8,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),["key-auth","key-auth-enc","jwt"].includes(n.config.plugin)?(e.openBlock(),e.createBlock(f,{key:1},{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(h,{"data-testid":"action-entity-copy-key",onClick:g=>y(a,"key",s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("credentials.actions.copy_key")),1)]),_:1},8,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),n.config.plugin==="oauth2"?(e.openBlock(),e.createBlock(f,{key:2},{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(h,{"data-testid":"action-entity-copy-secret",onClick:g=>y(a,"client_secret",s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("credentials.actions.copy_secret")),1)]),_:1},8,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),n.config.plugin==="hmac-auth"?(e.openBlock(),e.createBlock(f,{key:3},{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(h,{"data-testid":"action-entity-copy-secret",onClick:g=>y(a,"secret",s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("credentials.actions.copy_secret")),1)]),_:1},8,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(f,null,{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(h,{"data-testid":"action-entity-copy-json",onClick:g=>y(a,void 0,s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("credentials.actions.copy_json")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(e.unref(o.PermissionsWrapper),{"auth-function":()=>n.canEdit(a)},{default:e.withCtx(()=>[e.createVNode(h,{"data-testid":"action-entity-edit","has-divider":"",item:W(a.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(o.PermissionsWrapper),{"auth-function":()=>n.canDelete(a)},{default:e.withCtx(()=>[e.createVNode(h,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:s=>z(a)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("credentials.actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),e.createVNode(e.unref(o.EntityDeleteModal),{"action-pending":_.value,description:e.unref(t)("credentials.delete.description"),"entity-type":H.value,error:T.value,title:e.unref(t)(`credentials.delete.${n.config.plugin}.title`),visible:b.value,onCancel:G,onProceed:Q},null,8,["action-pending","description","entity-type","error","title","visible"])])}}}),[["__scopeId","data-v-a8e45434"]]);d.ConsumerCredentialList=S,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.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-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-b6987b3c]{align-items:center;border-bottom:var(--v25a763c4);box-sizing:border-box;display:var(--v1ac90e12);padding:16px;padding:var(--kui-space-60, 16px);padding-left:0;width:100%}.config-card-details-row .config-card-details-label[data-v-b6987b3c]{box-sizing:border-box;padding-right:16px;padding-right:var(--kui-space-60, 16px);width:var(--v45a716ee)}.config-card-details-row .config-card-details-label label[data-v-b6987b3c]{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-b6987b3c]{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-b6987b3c]{min-width:0}.config-card-details-row .config-card-details-value[data-v-b6987b3c]{box-sizing:border-box;width:var(--v45a28b38)}.config-card-details-row .config-card-details-value .truncated[data-v-b6987b3c]{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-b6987b3c]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-b6987b3c] .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-b6987b3c]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-b6987b3c]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.config-card-details-row[data-v-b6987b3c] .k-label{margin-bottom:0}.config-card-details-row[data-v-b6987b3c] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-b6987b3c] .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:#000933;background-color:var(--kui-color-background-inverse, #000933);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;padding:8px 0 8px 12px;padding:var(--kui-space-40, 8px) var(--kui-space-0, 0px) var(--kui-space-40, 8px) var(--kui-space-50, 12px)}.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(--c7479fcc);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-f9989a30]{margin-bottom:16px;margin-bottom:var(--kui-space-60, 16px)}.deck-config .k-code-block[data-v-f9989a30]{margin-top:12px;margin-top:var(--kui-space-50, 12px)}.deck-config .k-code-block.customization[data-v-f9989a30]{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-f9989a30]{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-f9989a30]:not(:first-child){margin-top:16px;margin-top:var(--kui-space-60, 16px)}.deck-config .konnect-pat-actions[data-v-f9989a30]{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-f9989a30]{margin-top:8px;margin-top:var(--kui-space-40, 8px)}.deck-config .customization-footer-reminder[data-v-f9989a30]{margin-top:16px;margin-top:var(--kui-space-60, 16px)}.config-card-prop-section-title[data-v-d530ff19]{color:#000933;color:var(--kui-color-text, #000933);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-4e8b39ce]{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-4e8b39ce]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-4e8b39ce]{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-4e8b39ce]{align-items:center}.kong-ui-entity-base-config-card .config-card-actions .sensitive-fields-checkbox[data-v-4e8b39ce] .checkbox-label{width:max-content}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-4e8b39ce]{color:#000933;color:var(--kui-color-text, #000933);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-4e8b39ce]:not(:has(.config-card-details-after)) .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .config-card-details-after[data-v-4e8b39ce]{padding-top:16px;padding-top:var(--kui-space-60, 16px)}.kong-ui-entity-base-config-card .book-icon[data-v-4e8b39ce]{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-32b5ebdc]{box-sizing:border-box;max-width:1536px;max-width:var(--kui-breakpoint-desktop, 1536px);width:100%}.kong-ui-entity-base-form[data-v-32b5ebdc] .k-slideout-title{color:#000933!important;color:var(--kui-color-text, #000933)!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-32b5ebdc] .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-32b5ebdc] .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-32b5ebdc] .tab-item.active>div.tab-link.has-panels{color:#000933!important;color:var(--kui-color-text, #000933)!important;font-weight:600!important;font-weight:var(--kui-font-weight-semibold, 600)!important}.kong-ui-entity-base-form[data-v-32b5ebdc] .slideout-content{overflow-y:unset!important}.kong-ui-entity-base-form.new-form-layout[data-v-32b5ebdc]{border:none;padding:0}.kong-ui-entity-base-form.new-form-layout[data-v-32b5ebdc]>.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-32b5ebdc]{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-32b5ebdc]{display:flex;flex-direction:row;justify-content:flex-end;margin-bottom:16px;margin-bottom:var(--kui-space-60, 16px)}.form-actions[data-v-32b5ebdc]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px;margin-top:var(--kui-space-80, 24px)}.form-actions[data-v-32b5ebdc] .k-button:last-of-type,.form-actions[data-v-32b5ebdc] .k-button:nth-last-of-type(2){margin-inline-start:16px;margin-inline-start:var(--kui-space-60, 16px)}.form-actions-reverted[data-v-32b5ebdc]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-09e101d4]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-09e101d4]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-09e101d4]{display:none}.kong-ui-entity-delete-modal .message[data-v-fc366e0c],.kong-ui-entity-delete-modal .description[data-v-fc366e0c]{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-fc366e0c]{font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.kong-ui-entity-delete-modal .description[data-v-fc366e0c]{margin-top:32px;margin-top:var(--kui-space-90, 32px)}.kong-ui-entity-delete-modal .body-stacked-copy .description[data-v-fc366e0c]{margin-top:0;margin-top:var(--kui-space-0, 0px)}.kong-ui-entity-delete-modal .body-stacked-copy .description>p[data-v-fc366e0c]{margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-entity-delete-modal .body-stacked-copy .message[data-v-fc366e0c]{margin-bottom:0;margin-bottom:var(--kui-space-0, 0px)}.kong-ui-entity-delete-modal[data-v-fc366e0c] .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-fc366e0c] .prompt-content+.prompt-confirmation-container{margin-top:32px;margin-top:var(--kui-space-90, 32px)}.kong-ui-entity-delete-error[data-v-fc366e0c]{margin-bottom:12px;margin-bottom:var(--kui-space-50, 12px)}.kong-ui-entity-filter-input[data-v-d3d2bd8b]{width:100%}.kong-ui-entity-filter-clear[data-v-d3d2bd8b]{cursor:pointer}.kong-ui-entity-filter[data-v-d3d2bd8b]{display:flex;position:relative}.kong-ui-entity-filter[data-v-d3d2bd8b] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-d3d2bd8b] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-d3d2bd8b]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-d3d2bd8b]{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-d3d2bd8b]{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-d3d2bd8b]{align-items:center;cursor:pointer;display:flex;line-height:24px;line-height:var(--kui-line-height-40, 24px)}.menu-item-title.expanded[data-v-d3d2bd8b]{color:#232633;color:var(--kui-color-text-neutral-strongest, #232633)}.menu-item-expand-icon[data-v-d3d2bd8b]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-d3d2bd8b]{transform:rotate(180deg)}.menu-item-indicator[data-v-d3d2bd8b]{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-d3d2bd8b]{align-items:center;display:flex;justify-content:space-between;margin-top:16px;margin-top:var(--kui-space-60, 16px)}.menu-item-body[data-v-d3d2bd8b] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-d3d2bd8b] .k-input{width:100%}.menu-item-body[data-v-d3d2bd8b] .k-select-input .input{font-size:12px}.menu-item-body[data-v-d3d2bd8b] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-d3d2bd8b]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-d3d2bd8b]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-d3d2bd8b]{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:#000933;color:var(--kui-color-text, #000933);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:#000933;color:var(--kui-color-text, #000933);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-8e48a559]{align-items:flex-start;display:flex;gap:8px;gap:var(--kui-space-40, 8px)}.kong-ui-entity-form-block .step[data-v-8e48a559]{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-8e48a559]{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-8e48a559]{color:#000933;color:var(--kui-color-text, #000933);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-8e48a559]{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-8e48a559]{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-8e48a559]{background:#f9fafb;background: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);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-8e48a559]{margin-left:16px;margin-left:var(--kui-space-60, 16px)}.kong-ui-public-entity-link[data-v-a18d7efa]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-a18d7efa]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-a18d7efa]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-a18d7efa] .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-a18d7efa]{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-a18d7efa]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-a18d7efa]{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:#000933;color:var(--kui-color-text, #000933);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))}}.deck-command-editor-wrapper[data-v-c024a8eb]{position:relative}.deck-command-editor-wrapper .deck-command-editor[data-v-c024a8eb]{height:300px;margin-top:12px;margin-top:var(--kui-space-50, 12px);width:100%}.deck-command-editor-wrapper .deck-command-copy-button[data-v-c024a8eb]{opacity:0;position:absolute;right:10px;top:10px;transition:opacity linear .2s;transition:opacity linear var(--kui-animation-duration-20, .2s)}.deck-command-editor-wrapper:hover .deck-command-copy-button[data-v-c024a8eb]{opacity:1}.editor-skeleton[data-v-ec59bbd1]{margin-top:4px;margin-top:var(--kui-space-20, 4px)}.kong-ui-entities-consumer-credentials-list[data-v-a8e45434]{width:100%}
@@ -0,0 +1,92 @@
1
+ import type { PropType } from 'vue';
2
+ import type { AxiosError } from 'axios';
3
+ import type { KongManagerConsumerCredentialListConfig, KonnectConsumerCredentialListConfig, 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<KonnectConsumerCredentialListConfig | KongManagerConsumerCredentialListConfig>;
9
+ required: true;
10
+ validator: (config: KonnectConsumerCredentialListConfig | KongManagerConsumerCredentialListConfig) => 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
+ /** default to false, setting to true will teleport the toolbar button to the destination in the consuming app */
35
+ useActionOutside: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
40
+ error: (error: AxiosError<unknown, any>) => any;
41
+ "copy:success": (payload: CopyEventPayload) => any;
42
+ "copy:error": (payload: CopyEventPayload) => any;
43
+ "delete:success": (credential: EntityRow) => any;
44
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
45
+ /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
46
+ config: {
47
+ type: PropType<KonnectConsumerCredentialListConfig | KongManagerConsumerCredentialListConfig>;
48
+ required: true;
49
+ validator: (config: KonnectConsumerCredentialListConfig | KongManagerConsumerCredentialListConfig) => boolean;
50
+ };
51
+ cacheIdentifier: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
56
+ canCreate: {
57
+ type: PropType<() => boolean | Promise<boolean>>;
58
+ required: false;
59
+ default: () => Promise<boolean>;
60
+ };
61
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
62
+ canDelete: {
63
+ type: PropType<(row: EntityRow) => boolean | Promise<boolean>>;
64
+ required: false;
65
+ default: () => Promise<boolean>;
66
+ };
67
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
68
+ canEdit: {
69
+ type: PropType<(row: EntityRow) => boolean | Promise<boolean>>;
70
+ required: false;
71
+ default: () => Promise<boolean>;
72
+ };
73
+ /** default to false, setting to true will teleport the toolbar button to the destination in the consuming app */
74
+ useActionOutside: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ }>> & Readonly<{
79
+ onError?: ((error: AxiosError<unknown, any>) => any) | undefined;
80
+ "onCopy:success"?: ((payload: CopyEventPayload) => any) | undefined;
81
+ "onCopy:error"?: ((payload: CopyEventPayload) => any) | undefined;
82
+ "onDelete:success"?: ((credential: EntityRow) => any) | undefined;
83
+ }>, {
84
+ cacheIdentifier: string;
85
+ canCreate: () => boolean | Promise<boolean>;
86
+ canDelete: (row: EntityRow) => boolean | Promise<boolean>;
87
+ canEdit: (row: EntityRow) => boolean | Promise<boolean>;
88
+ useActionOutside: boolean;
89
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
90
+ declare const _default: typeof __VLS_export;
91
+ export default _default;
92
+ //# sourceMappingURL=ConsumerCredentialList.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConsumerCredentialList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ConsumerCredentialList.vue"],"names":[],"mappings":"AAqeA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAevC,OAAO,KAAK,EAEV,uCAAuC,EACvC,mCAAmC,EACnC,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAA;AAMjB,OAAO,gDAAgD,CAAA;AAi6BvD,QAAA,MAAM,YAAY;IAGhB,oHAAoH;;cAElG,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC,KAAG,OAAO;;;;;;IAW7G,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,iHAAiH;;;;;;;;;;;IAjCjH,oHAAoH;;cAElG,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC,KAAG,OAAO;;;;;;IAW7G,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,iHAAiH;;;;;;;;;;;;qBAhB9E,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;4EAU3E,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,6 @@
1
+ import useI18n from './useI18n';
2
+ declare const _default: {
3
+ useI18n: typeof useI18n;
4
+ };
5
+ export default _default;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -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,8 @@
1
+ declare const _default: {
2
+ list: {
3
+ konnect: string;
4
+ kongManager: string;
5
+ };
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=consumer-credentials-endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consumer-credentials-endpoints.d.ts","sourceRoot":"","sources":["../../src/consumer-credentials-endpoints.ts"],"names":[],"mappings":";;;;;;AAAA,wBAKC"}
@@ -0,0 +1,4 @@
1
+ import ConsumerCredentialList from './components/ConsumerCredentialList.vue';
2
+ export { ConsumerCredentialList };
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,yCAAyC,CAAA;AAE5E,OAAO,EAAE,sBAAsB,EAAE,CAAA;AAEjC,cAAc,SAAS,CAAA"}
@@ -0,0 +1,32 @@
1
+ import type { RouteLocationRaw } from 'vue-router';
2
+ import type { KongManagerBaseTableConfig, KonnectBaseTableConfig } from '@kong-ui-public/entities-shared';
3
+ export type CredentialPlugins = 'acls' | 'basic-auth' | 'key-auth' | 'key-auth-enc' | 'oauth2' | 'hmac-auth' | 'jwt';
4
+ export interface BaseConsumerCredentialListConfig {
5
+ /** Consumer ID */
6
+ consumerId: string;
7
+ /** Credential plugin name */
8
+ plugin: CredentialPlugins;
9
+ /** Route for creating a consumer credential */
10
+ createRoute: RouteLocationRaw;
11
+ /** A function that returns the route for editing a consumer credential */
12
+ getEditRoute: (id: string) => RouteLocationRaw;
13
+ }
14
+ /** Konnect consumer credential list config */
15
+ export interface KonnectConsumerCredentialListConfig extends KonnectBaseTableConfig, BaseConsumerCredentialListConfig {
16
+ }
17
+ /** Kong Manager consumer credential list config */
18
+ export interface KongManagerConsumerCredentialListConfig extends KongManagerBaseTableConfig, BaseConsumerCredentialListConfig {
19
+ }
20
+ export interface EntityRow extends Record<string, any> {
21
+ id: string;
22
+ }
23
+ /** Copy field event payload */
24
+ export interface CopyEventPayload {
25
+ /** The entity row */
26
+ entity: EntityRow;
27
+ /** The field being copied. If omitted, the entity JSON is being copied. */
28
+ field?: string;
29
+ /** The toaster message */
30
+ message: string;
31
+ }
32
+ //# sourceMappingURL=consumer-credential-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consumer-credential-list.d.ts","sourceRoot":"","sources":["../../../src/types/consumer-credential-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAEzG,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,cAAc,GAAG,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAA;AAEpH,MAAM,WAAW,gCAAgC;IAC/C,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,6BAA6B;IAC7B,MAAM,EAAE,iBAAiB,CAAA;IACzB,+CAA+C;IAC/C,WAAW,EAAE,gBAAgB,CAAA;IAC7B,0EAA0E;IAC1E,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,gBAAgB,CAAA;CAC/C;AAED,8CAA8C;AAC9C,MAAM,WAAW,mCAAoC,SAAQ,sBAAsB,EAAE,gCAAgC;CAAG;AAExH,mDAAmD;AACnD,MAAM,WAAW,uCAAwC,SAAQ,0BAA0B,EAAE,gCAAgC;CAAG;AAEhI,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACpD,EAAE,EAAE,MAAM,CAAA;CACX;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"}
@@ -0,0 +1,2 @@
1
+ export * from './consumer-credential-list';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAGA,cAAc,4BAA4B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-consumer-credentials",
3
- "version": "3.8.2-pr.3235.1ca65bc7d.0",
3
+ "version": "3.8.2",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-consumer-credentials.umd.js",
6
6
  "module": "./dist/entities-consumer-credentials.es.js",
@@ -26,7 +26,7 @@
26
26
  "axios": "^1.15.2",
27
27
  "vue": ">= 3.3.13 < 4",
28
28
  "vue-router": "^4.6.4 || ^5.0.6",
29
- "@kong-ui-public/entities-shared": "^3.45.2-pr.3235.1ca65bc7d.0",
29
+ "@kong-ui-public/entities-shared": "^3.45.2",
30
30
  "@kong-ui-public/i18n": "^2.4.6"
31
31
  },
32
32
  "devDependencies": {
@@ -36,7 +36,7 @@
36
36
  "axios": "^1.15.2",
37
37
  "vue": "^3.5.33",
38
38
  "vue-router": "^5.0.6",
39
- "@kong-ui-public/entities-shared": "^3.45.2-pr.3235.1ca65bc7d.0",
39
+ "@kong-ui-public/entities-shared": "^3.45.2",
40
40
  "@kong-ui-public/i18n": "^2.4.6"
41
41
  },
42
42
  "repository": {