@kong-ui-public/entities-consumer-groups 3.8.8-pr.2120.9b8e91c43.0 → 3.8.8-pr.2120.ab02c9a17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -144,7 +144,7 @@ const be = {
|
|
|
144
144
|
getConsumers: `${N}/consumer_groups/{id}/consumers`
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
},
|
|
147
|
+
}, vo = { class: "add-to-group-form-container" }, yo = { class: "add-to-group-cta-text" }, ho = {
|
|
148
148
|
key: 0,
|
|
149
149
|
class: "kong-ui-entity-add-to-groups-error"
|
|
150
150
|
}, _o = { key: 0 }, bo = /* @__PURE__ */ _e({
|
|
@@ -165,7 +165,7 @@ const be = {
|
|
|
165
165
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
166
166
|
setup(e, { emit: L }) {
|
|
167
167
|
var j;
|
|
168
|
-
const { i18n: { t: u } } = be.useI18n(), t = e,
|
|
168
|
+
const { i18n: { t: u } } = be.useI18n(), t = e, y = L, { axiosInstance: i } = Ee((j = t.config) == null ? void 0 : j.axiosRequestConfig), n = I([]), {
|
|
169
169
|
debouncedQueryChange: E,
|
|
170
170
|
loading: ie,
|
|
171
171
|
allRecords: D,
|
|
@@ -191,10 +191,10 @@ const be = {
|
|
|
191
191
|
const k = te.value ? Z.value.find((b) => b.id === d) : (f = D.value) == null ? void 0 : f.find((b) => b.id === d);
|
|
192
192
|
return k ? k.name : d;
|
|
193
193
|
}, de = () => {
|
|
194
|
-
x.value = "", R.value = [], M.value = [],
|
|
194
|
+
x.value = "", R.value = [], M.value = [], y("cancel");
|
|
195
195
|
}, R = I([]), $ = I(!1), x = I(""), me = async () => {
|
|
196
196
|
if (!n.value.length) {
|
|
197
|
-
x.value = "", M.value = [],
|
|
197
|
+
x.value = "", M.value = [], y("cancel");
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
200
|
$.value = !0, x.value = "", R.value = [], M.value = [];
|
|
@@ -203,9 +203,9 @@ const be = {
|
|
|
203
203
|
let f = !0;
|
|
204
204
|
k.forEach((b) => {
|
|
205
205
|
b.status !== "fulfilled" && (f = !1);
|
|
206
|
-
}), f ? (R.value = [], M.value = [],
|
|
206
|
+
}), f ? (R.value = [], M.value = [], y("add:success", n.value), n.value = []) : (R.value.length && y("add:partial-success", R.value), n.value = [], re(k));
|
|
207
207
|
} catch {
|
|
208
|
-
x.value = u("consumer_groups.errors.add"),
|
|
208
|
+
x.value = u("consumer_groups.errors.add"), y("error", x.value);
|
|
209
209
|
} finally {
|
|
210
210
|
$.value = !1;
|
|
211
211
|
}
|
|
@@ -246,8 +246,8 @@ const be = {
|
|
|
246
246
|
onProceed: me
|
|
247
247
|
}, {
|
|
248
248
|
default: p(() => [
|
|
249
|
-
F("div",
|
|
250
|
-
F("p",
|
|
249
|
+
F("div", vo, [
|
|
250
|
+
F("p", yo, G(s(u)("consumer_groups.consumers.add.ctaText")), 1),
|
|
251
251
|
g(f, {
|
|
252
252
|
modelValue: n.value,
|
|
253
253
|
"onUpdate:modelValue": k[0] || (k[0] = (ee) => n.value = ee),
|
|
@@ -283,8 +283,8 @@ const be = {
|
|
|
283
283
|
}
|
|
284
284
|
}), $e = (e, L) => {
|
|
285
285
|
const u = e.__vccOpts || e;
|
|
286
|
-
for (const [t,
|
|
287
|
-
u[t] =
|
|
286
|
+
for (const [t, y] of L)
|
|
287
|
+
u[t] = y;
|
|
288
288
|
return u;
|
|
289
289
|
}, Co = /* @__PURE__ */ $e(bo, [["__scopeId", "data-v-4260ce03"]]), ko = { class: "kong-ui-entities-consumer-groups-list" }, Io = { class: "button-row" }, wo = { class: "empty-state-icon-gateway" }, Eo = /* @__PURE__ */ _e({
|
|
290
290
|
__name: "ConsumerGroupList",
|
|
@@ -341,7 +341,7 @@ const be = {
|
|
|
341
341
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
342
342
|
setup(e, { emit: L }) {
|
|
343
343
|
var Se;
|
|
344
|
-
const u = L, t = e, { i18nT:
|
|
344
|
+
const u = L, t = e, { i18nT: y, i18n: { t: i } } = be.useI18n(), n = Fe(), { axiosInstance: E } = Ee((Se = t.config) == null ? void 0 : Se.axiosRequestConfig), ie = _(() => t.config.app !== "kongManager" || !!t.config.disableSorting), D = {
|
|
345
345
|
// the Name column is non-hidable
|
|
346
346
|
name: { label: i("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 }
|
|
347
347
|
};
|
|
@@ -376,7 +376,7 @@ const be = {
|
|
|
376
376
|
fetcher: pe,
|
|
377
377
|
fetcherState: ge,
|
|
378
378
|
fetcherCacheKey: M
|
|
379
|
-
} = Xe(_(() => ({ ...t.config, cacheIdentifier: t.cacheIdentifier })), V, me), re = () => {
|
|
379
|
+
} = Xe(_(() => ({ ...t.config, cacheIdentifier: t.cacheIdentifier })), V.value, me), re = () => {
|
|
380
380
|
B.value = "";
|
|
381
381
|
}, j = () => {
|
|
382
382
|
M.value++;
|
|
@@ -417,7 +417,7 @@ const be = {
|
|
|
417
417
|
}), ee = (r) => ({
|
|
418
418
|
label: i("consumer_groups.actions.edit"),
|
|
419
419
|
to: t.config.getEditRoute(r)
|
|
420
|
-
}), K = I(void 0), ne = I(!1), oe = I(!1), fe = I(""),
|
|
420
|
+
}), K = I(void 0), ne = I(!1), oe = I(!1), fe = I(""), ve = Ze(t.config, V.value), o = (r) => {
|
|
421
421
|
K.value = r, ne.value = !0;
|
|
422
422
|
}, a = () => {
|
|
423
423
|
ne.value = !1;
|
|
@@ -426,7 +426,7 @@ const be = {
|
|
|
426
426
|
if ((r = K.value) != null && r.id) {
|
|
427
427
|
oe.value = !0;
|
|
428
428
|
try {
|
|
429
|
-
await E.delete(
|
|
429
|
+
await E.delete(ve(K.value.id)), oe.value = !1, ne.value = !1, M.value++, u("delete:success", K.value);
|
|
430
430
|
} catch (w) {
|
|
431
431
|
fe.value = ((h = (m = w.response) == null ? void 0 : m.data) == null ? void 0 : h.message) || w.message || i("consumer_groups.errors.delete"), u("error", w);
|
|
432
432
|
} finally {
|
|
@@ -498,7 +498,7 @@ const be = {
|
|
|
498
498
|
"row-attributes": ce,
|
|
499
499
|
"table-headers": s(le),
|
|
500
500
|
onClearSearchInput: re,
|
|
501
|
-
"onClick:row": m[4] || (m[4] = (
|
|
501
|
+
"onClick:row": m[4] || (m[4] = (v) => b(v)),
|
|
502
502
|
onEmptyStateCtaClicked: S,
|
|
503
503
|
onSort: j,
|
|
504
504
|
onState: s(se)
|
|
@@ -507,7 +507,7 @@ const be = {
|
|
|
507
507
|
$.value ? W("", !0) : (A(), z(s(oo), {
|
|
508
508
|
key: 0,
|
|
509
509
|
modelValue: B.value,
|
|
510
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
510
|
+
"onUpdate:modelValue": m[0] || (m[0] = (v) => B.value = v),
|
|
511
511
|
config: te.value
|
|
512
512
|
}, null, 8, ["modelValue", "config"]))
|
|
513
513
|
]),
|
|
@@ -523,7 +523,7 @@ const be = {
|
|
|
523
523
|
class: "open-learning-hub",
|
|
524
524
|
"data-testid": "consumer-groups-learn-more-button",
|
|
525
525
|
icon: "",
|
|
526
|
-
onClick: m[1] || (m[1] = (
|
|
526
|
+
onClick: m[1] || (m[1] = (v) => r.$emit("click:learn-more"))
|
|
527
527
|
}, {
|
|
528
528
|
default: p(() => [
|
|
529
529
|
g(s(Te), { decorative: "" })
|
|
@@ -552,21 +552,21 @@ const be = {
|
|
|
552
552
|
])
|
|
553
553
|
], 8, ["disabled"]))
|
|
554
554
|
]),
|
|
555
|
-
name: p(({ rowValue:
|
|
556
|
-
F("b", null, G(
|
|
555
|
+
name: p(({ rowValue: v }) => [
|
|
556
|
+
F("b", null, G(v ?? "-"), 1)
|
|
557
557
|
]),
|
|
558
|
-
consumers_count: p(({ rowValue:
|
|
559
|
-
ue(G(
|
|
558
|
+
consumers_count: p(({ rowValue: v }) => [
|
|
559
|
+
ue(G(v ?? "-"), 1)
|
|
560
560
|
]),
|
|
561
|
-
tags: p(({ rowValue:
|
|
562
|
-
g(s(to), { tags:
|
|
561
|
+
tags: p(({ rowValue: v }) => [
|
|
562
|
+
g(s(to), { tags: v }, null, 8, ["tags"])
|
|
563
563
|
]),
|
|
564
|
-
actions: p(({ row:
|
|
564
|
+
actions: p(({ row: v }) => [
|
|
565
565
|
g(H, null, {
|
|
566
|
-
default: p(({ copyToClipboard:
|
|
566
|
+
default: p(({ copyToClipboard: ye }) => [
|
|
567
567
|
g(w, {
|
|
568
568
|
"data-testid": "action-entity-copy-id",
|
|
569
|
-
onClick: (Ne) => k(
|
|
569
|
+
onClick: (Ne) => k(v, ye)
|
|
570
570
|
}, {
|
|
571
571
|
default: p(() => [
|
|
572
572
|
ue(G(s(i)("consumer_groups.actions.copy_id")), 1)
|
|
@@ -577,10 +577,10 @@ const be = {
|
|
|
577
577
|
_: 2
|
|
578
578
|
}, 1024),
|
|
579
579
|
g(H, null, {
|
|
580
|
-
default: p(({ copyToClipboard:
|
|
580
|
+
default: p(({ copyToClipboard: ye }) => [
|
|
581
581
|
g(w, {
|
|
582
582
|
"data-testid": "action-entity-copy-json",
|
|
583
|
-
onClick: (Ne) => f(
|
|
583
|
+
onClick: (Ne) => f(v, ye)
|
|
584
584
|
}, {
|
|
585
585
|
default: p(() => [
|
|
586
586
|
ue(G(s(i)("consumer_groups.actions.copy_json")), 1)
|
|
@@ -591,37 +591,37 @@ const be = {
|
|
|
591
591
|
_: 2
|
|
592
592
|
}, 1024),
|
|
593
593
|
g(s(he), {
|
|
594
|
-
"auth-function": () => e.canRetrieve(
|
|
594
|
+
"auth-function": () => e.canRetrieve(v)
|
|
595
595
|
}, {
|
|
596
596
|
default: p(() => [
|
|
597
597
|
g(w, {
|
|
598
598
|
"data-testid": "action-entity-view",
|
|
599
599
|
"has-divider": "",
|
|
600
|
-
item: O(
|
|
600
|
+
item: O(v.id)
|
|
601
601
|
}, null, 8, ["item"])
|
|
602
602
|
]),
|
|
603
603
|
_: 2
|
|
604
604
|
}, 1032, ["auth-function"]),
|
|
605
605
|
g(s(he), {
|
|
606
|
-
"auth-function": () => e.canEdit(
|
|
606
|
+
"auth-function": () => e.canEdit(v)
|
|
607
607
|
}, {
|
|
608
608
|
default: p(() => [
|
|
609
609
|
g(w, {
|
|
610
610
|
"data-testid": "action-entity-edit",
|
|
611
|
-
item: ee(
|
|
611
|
+
item: ee(v.id)
|
|
612
612
|
}, null, 8, ["item"])
|
|
613
613
|
]),
|
|
614
614
|
_: 2
|
|
615
615
|
}, 1032, ["auth-function"]),
|
|
616
616
|
g(s(he), {
|
|
617
|
-
"auth-function": () => e.canDelete(
|
|
617
|
+
"auth-function": () => e.canDelete(v)
|
|
618
618
|
}, {
|
|
619
619
|
default: p(() => [
|
|
620
620
|
g(w, {
|
|
621
621
|
danger: "",
|
|
622
622
|
"data-testid": "action-entity-delete",
|
|
623
623
|
"has-divider": "",
|
|
624
|
-
onClick: () => e.config.consumerId ? De(
|
|
624
|
+
onClick: () => e.config.consumerId ? De(v) : o(v)
|
|
625
625
|
}, {
|
|
626
626
|
default: p(() => [
|
|
627
627
|
ue(G(e.config.consumerId ? s(i)("consumer_groups.actions.exit") : s(i)("consumer_groups.actions.delete")), 1)
|
|
@@ -646,7 +646,7 @@ const be = {
|
|
|
646
646
|
class: "open-learning-hub",
|
|
647
647
|
"data-testid": "consumer-groups-learn-more-button",
|
|
648
648
|
icon: "",
|
|
649
|
-
onClick: m[2] || (m[2] = (
|
|
649
|
+
onClick: m[2] || (m[2] = (v) => r.$emit("click:learn-more"))
|
|
650
650
|
}, {
|
|
651
651
|
default: p(() => [
|
|
652
652
|
g(s(Te), { decorative: "" })
|
|
@@ -660,7 +660,7 @@ const be = {
|
|
|
660
660
|
!B.value && e.enableV2EmptyStates && e.config.app === "konnect" ? {
|
|
661
661
|
name: "empty-state",
|
|
662
662
|
fn: p(() => {
|
|
663
|
-
var
|
|
663
|
+
var v;
|
|
664
664
|
return [
|
|
665
665
|
g(s(so), {
|
|
666
666
|
"action-button-text": s(i)("consumer_groups.list.toolbar_actions.new_consumer_group"),
|
|
@@ -671,7 +671,7 @@ const be = {
|
|
|
671
671
|
"learn-more": e.config.app === "konnect",
|
|
672
672
|
title: s(i)("consumer_groups.list.empty_state_v2.title"),
|
|
673
673
|
"onClick:create": Z,
|
|
674
|
-
"onClick:learnMore": m[3] || (m[3] = (
|
|
674
|
+
"onClick:learnMore": m[3] || (m[3] = (ye) => r.$emit("click:learn-more"))
|
|
675
675
|
}, ke({
|
|
676
676
|
image: p(() => [
|
|
677
677
|
F("div", wo, [
|
|
@@ -683,7 +683,7 @@ const be = {
|
|
|
683
683
|
]),
|
|
684
684
|
_: 2
|
|
685
685
|
}, [
|
|
686
|
-
(
|
|
686
|
+
(v = e.config) != null && v.isControlPlaneGroup ? {
|
|
687
687
|
name: "message",
|
|
688
688
|
fn: p(() => [
|
|
689
689
|
ue(G(s(i)("consumer_groups.list.empty_state_v2.group")), 1)
|
|
@@ -713,8 +713,8 @@ const be = {
|
|
|
713
713
|
config: e.config,
|
|
714
714
|
"data-testid": "add-to-group-modal",
|
|
715
715
|
visible: l.value,
|
|
716
|
-
"onAdd:partialSuccess": m[5] || (m[5] = (
|
|
717
|
-
"onAdd:success": m[6] || (m[6] = (
|
|
716
|
+
"onAdd:partialSuccess": m[5] || (m[5] = (v) => U(v, !0)),
|
|
717
|
+
"onAdd:success": m[6] || (m[6] = (v) => U(v)),
|
|
718
718
|
onCancel: T
|
|
719
719
|
}, null, 8, ["config", "visible"])) : W("", !0),
|
|
720
720
|
e.config.consumerId && P.value ? (A(), z(qe, {
|
|
@@ -727,7 +727,7 @@ const be = {
|
|
|
727
727
|
onProceed: Oe
|
|
728
728
|
}, {
|
|
729
729
|
default: p(() => [
|
|
730
|
-
g(s(
|
|
730
|
+
g(s(y), {
|
|
731
731
|
class: "exit-modal-message",
|
|
732
732
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
733
733
|
tag: "p"
|
|
@@ -752,7 +752,7 @@ const be = {
|
|
|
752
752
|
]);
|
|
753
753
|
};
|
|
754
754
|
}
|
|
755
|
-
}), Ko = /* @__PURE__ */ $e(Eo, [["__scopeId", "data-v-
|
|
755
|
+
}), Ko = /* @__PURE__ */ $e(Eo, [["__scopeId", "data-v-c31b2868"]]), $o = { class: "kong-ui-entities-consumer-group-form" }, xo = { class: "select-item-container" }, Mo = { class: "select-item-label" }, So = {
|
|
756
756
|
key: 0,
|
|
757
757
|
class: "select-item-description"
|
|
758
758
|
}, Go = /* @__PURE__ */ _e({
|
|
@@ -777,8 +777,8 @@ const be = {
|
|
|
777
777
|
},
|
|
778
778
|
emits: ["update", "error", "loading"],
|
|
779
779
|
setup(e, { emit: L }) {
|
|
780
|
-
var oe, fe,
|
|
781
|
-
const u = e, t = L, { i18n: { t:
|
|
780
|
+
var oe, fe, ve;
|
|
781
|
+
const u = e, t = L, { i18n: { t: y } } = be.useI18n(), i = Fe(), n = Ae({
|
|
782
782
|
fields: {
|
|
783
783
|
name: "",
|
|
784
784
|
tags: "",
|
|
@@ -799,7 +799,7 @@ const be = {
|
|
|
799
799
|
} = Be(u.config, (fe = X.form[(oe = u.config) == null ? void 0 : oe.app]) == null ? void 0 : fe.consumersList, "", {
|
|
800
800
|
fetchedItemsKey: "data",
|
|
801
801
|
searchKeys: ["username", "custom_id", "id"]
|
|
802
|
-
}), { axiosInstance: V } = Ee((
|
|
802
|
+
}), { axiosInstance: V } = Ee((ve = u.config) == null ? void 0 : ve.axiosRequestConfig), { getMessageFromError: B } = ao(), te = uo(), Y = _(() => Z.value.map((o) => ({
|
|
803
803
|
label: o.username || o.custom_id,
|
|
804
804
|
value: o.id,
|
|
805
805
|
selected: n.fields.consumers.includes(o.id),
|
|
@@ -860,7 +860,7 @@ const be = {
|
|
|
860
860
|
if (n.fields.consumers.length > 0 && o)
|
|
861
861
|
try {
|
|
862
862
|
const a = n.fields.consumers.map((l) => d(l, o)), C = await Promise.allSettled(a);
|
|
863
|
-
O(C,
|
|
863
|
+
O(C, y("consumer_groups.errors.add_consumer"), o);
|
|
864
864
|
} catch (a) {
|
|
865
865
|
f(a);
|
|
866
866
|
}
|
|
@@ -879,14 +879,14 @@ const be = {
|
|
|
879
879
|
if (a.length > 0)
|
|
880
880
|
try {
|
|
881
881
|
const l = a.map((T) => k(T)), c = await Promise.allSettled(l);
|
|
882
|
-
O(c,
|
|
882
|
+
O(c, y("consumer_groups.errors.remove_consumer"));
|
|
883
883
|
} catch (l) {
|
|
884
884
|
f(l);
|
|
885
885
|
}
|
|
886
886
|
if (o.length > 0)
|
|
887
887
|
try {
|
|
888
888
|
const l = o.map((T) => d(T)), c = await Promise.allSettled(l);
|
|
889
|
-
O(c,
|
|
889
|
+
O(c, y("consumer_groups.errors.add_consumer"));
|
|
890
890
|
} catch (l) {
|
|
891
891
|
f(l);
|
|
892
892
|
}
|
|
@@ -920,8 +920,8 @@ const be = {
|
|
|
920
920
|
}, {
|
|
921
921
|
default: p(() => [
|
|
922
922
|
g(s(Pe), {
|
|
923
|
-
description: s(
|
|
924
|
-
title: s(
|
|
923
|
+
description: s(y)("consumer_groups.form.general_info.description"),
|
|
924
|
+
title: s(y)("consumer_groups.form.general_info.title")
|
|
925
925
|
}, {
|
|
926
926
|
default: p(() => [
|
|
927
927
|
g(C, {
|
|
@@ -930,8 +930,8 @@ const be = {
|
|
|
930
930
|
modelModifiers: { trim: !0 },
|
|
931
931
|
autocomplete: "off",
|
|
932
932
|
"data-testid": "consumer-group-form-name",
|
|
933
|
-
label: s(
|
|
934
|
-
placeholder: s(
|
|
933
|
+
label: s(y)("consumer_groups.form.fields.name.label"),
|
|
934
|
+
placeholder: s(y)("consumer_groups.form.fields.name.placeholder"),
|
|
935
935
|
required: "",
|
|
936
936
|
type: "text"
|
|
937
937
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
@@ -941,13 +941,13 @@ const be = {
|
|
|
941
941
|
modelModifiers: { trim: !0 },
|
|
942
942
|
autocomplete: "off",
|
|
943
943
|
"data-testid": "consumer-group-form-tags",
|
|
944
|
-
help: s(
|
|
945
|
-
label: s(
|
|
944
|
+
help: s(y)("consumer_groups.form.fields.tags.help"),
|
|
945
|
+
label: s(y)("consumer_groups.form.fields.tags.label"),
|
|
946
946
|
"label-attributes": {
|
|
947
|
-
info: s(
|
|
947
|
+
info: s(y)("consumer_groups.form.fields.tags.tooltip"),
|
|
948
948
|
tooltipAttributes: { maxWidth: "400" }
|
|
949
949
|
},
|
|
950
|
-
placeholder: s(
|
|
950
|
+
placeholder: s(y)("consumer_groups.form.fields.tags.placeholder"),
|
|
951
951
|
type: "text"
|
|
952
952
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder"])
|
|
953
953
|
]),
|
|
@@ -955,9 +955,9 @@ const be = {
|
|
|
955
955
|
}, 8, ["description", "title"]),
|
|
956
956
|
e.hideConsumers ? W("", !0) : (A(), z(s(Pe), {
|
|
957
957
|
key: 0,
|
|
958
|
-
description: s(
|
|
958
|
+
description: s(y)("consumer_groups.form.consumers.description"),
|
|
959
959
|
"has-divider": "",
|
|
960
|
-
title: s(
|
|
960
|
+
title: s(y)("consumer_groups.form.consumers.title")
|
|
961
961
|
}, {
|
|
962
962
|
default: p(() => [
|
|
963
963
|
g(l, {
|
|
@@ -966,9 +966,9 @@ const be = {
|
|
|
966
966
|
appearance: "select",
|
|
967
967
|
autosuggest: "",
|
|
968
968
|
items: Y.value,
|
|
969
|
-
label: s(
|
|
969
|
+
label: s(y)("consumer_groups.form.fields.consumers.label"),
|
|
970
970
|
loading: s(D),
|
|
971
|
-
placeholder: s(
|
|
971
|
+
placeholder: s(y)("consumer_groups.form.fields.consumers.placeholder"),
|
|
972
972
|
width: "auto",
|
|
973
973
|
onQueryChange: s(ie)
|
|
974
974
|
}, {
|
|
@@ -1019,7 +1019,7 @@ const be = {
|
|
|
1019
1019
|
},
|
|
1020
1020
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1021
1021
|
setup(e) {
|
|
1022
|
-
const L = e, { i18n: { t: u } } = be.useI18n(), t = _(() => X.form[L.config.app].edit),
|
|
1022
|
+
const L = e, { i18n: { t: u } } = be.useI18n(), t = _(() => X.form[L.config.app].edit), y = I({
|
|
1023
1023
|
id: {},
|
|
1024
1024
|
name: {},
|
|
1025
1025
|
created_at: {},
|
|
@@ -1032,7 +1032,7 @@ const be = {
|
|
|
1032
1032
|
g(s(lo), {
|
|
1033
1033
|
config: e.config,
|
|
1034
1034
|
"config-card-doc": e.configCardDoc,
|
|
1035
|
-
"config-schema":
|
|
1035
|
+
"config-schema": y.value,
|
|
1036
1036
|
"data-key": "consumer_group",
|
|
1037
1037
|
"entity-type": s(Ke).ConsumerGroup,
|
|
1038
1038
|
"fetch-url": t.value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function($,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):($=typeof globalThis<"u"?globalThis:$||self,e($["kong-ui-public-entities-consumer-groups"]={},$.Vue,$.VueRouter,$.KongIcons,$["kong-ui-public-i18n"],$["kong-ui-public-entities-shared"]))})(this,function($,e,me,ae,pe,p){"use strict";const he="#00abd2",Ce="24px",_e={consumer_groups:{list:{table_headers:{name:"Name",consumers_count:"Consumers",tags:"Tags",id:"ID"},empty_state:{title:"Configure a New Consumer Group",description:"Use consumer groups to manage custom rate limiting configuration for subsets of consumers.",title_for_consumer:"Add to a consumer group"},empty_state_v2:{title:"Configure your first consumer group",group:"Consumer groups created in gateways within this group will automatically appear here.",description:"Organize consumers into groups to easily apply policies like rate limiting and authentication across the entire group."},toolbar_actions:{new_consumer_group:"New consumer group"}},title:"Consumer Groups",search:{placeholder:"Filter by exact name or ID"},actions:{add_to_group:"Add to consumer group",create:"New consumer group",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",exit:"Exit",view:"View Details"},delete:{title:"Delete a Consumer Group",description:"Deleting this group will remove all its plugins and rate limit configuration. This action cannot be reversed."},consumers:{add:{title:"Add To Consumer Groups",ctaText:"Add this consumer to consumer groups",consumer_groups_label:"Consumer Groups",consumer_group_placeholder:"Add to consumer groups",footer:"Search by exact name or ID to find consumer groups not included in the list"},exit:{title:"Exit from a Consumer Group",confirmation:"Are you sure you want to remove consumer {consumer} from consumer group {consumerGroup}?",confirmationNoUsername:"Are you sure you want this consumer to exit from consumer group {consumerGroup}?",description:"Exiting from the group could change the rate limit policy applied to this consumer."}},errors:{general:"Consumer Groups could not be retrieved",delete:"The consumer group could not be deleted at this time.",copy:"Failed to copy to clipboard",add:"The consumer could not be added to some groups at this time.",already_added:"The consumer is already in this consumer group",add_consumer:"An unexpected error occurred while adding consumers. Please try again.",remove_consumer:"An unexpected error occurred while removing consumers. Please try again."},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{general_info:{title:"General Information",description:"General information will help identify and manage this consumer group."},consumers:{title:"Consumers",description:"Add or remove consumers from this group"},fields:{name:{label:"Name",placeholder:"Enter a unique name for this consumer group "},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."},consumers:{label:"Consumers",placeholder:"Select one or more consumers"}}}}};function ke(){const o=pe.createI18n("en-us",_e);return{i18n:o,i18nT:pe.i18nTComponent(o)}}const ce={useI18n:ke},D="/v2/control-planes/{controlPlaneId}/core-entities",P="/{workspace}",q={list:{konnect:{all:`${D}/consumer_groups`,forModal:`${D}/consumer_groups`,forConsumer:`${D}/consumers/{consumerId}/consumer_groups`,oneForConsumer:`${D}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`},kongManager:{all:`${P}/consumer_groups?counter=true`,forModal:`${P}/consumer_groups`,forConsumer:`${P}/consumers/{consumerId}/consumer_groups`,oneForConsumer:`${P}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`}},form:{konnect:{consumersList:`${D}/consumers`,create:`${D}/consumer_groups`,edit:`${D}/consumer_groups/{id}`,addConsumer:`${D}/consumer_groups/{id}/consumers`,removeConsumer:`${D}/consumer_groups/{id}/consumers/{consumerId}`,getConsumers:`${D}/consumer_groups/{id}/consumers`},kongManager:{consumersList:`${P}/consumers`,create:`${P}/consumer_groups`,edit:`${P}/consumer_groups/{id}`,addConsumer:`${P}/consumer_groups/{id}/consumers`,removeConsumer:`${P}/consumer_groups/{id}/consumers/{consumerId}`,getConsumers:`${P}/consumer_groups/{id}/consumers`}}},be={class:"add-to-group-form-container"},we={class:"add-to-group-cta-text"},Ve={key:0,class:"kong-ui-entity-add-to-groups-error"},Ie={key:0},xe=e.defineComponent({__name:"AddToGroupModal",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||!o.consumerId)},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","add:success","add:partial-success","error"],setup(o,{emit:U}){var R;const{i18n:{t:c}}=ce.useI18n(),r=o,y=U,{axiosInstance:i}=p.useAxios((R=r.config)==null?void 0:R.axiosRequestConfig),s=e.ref([]),{debouncedQueryChange:w,loading:Y,allRecords:S,error:v,loadItems:ee,results:j}=p.useDebouncedFilter(r.config,q.list[r.config.app].forModal,"",{fetchedItemsKey:"data",searchKeys:["name","id"]}),T=e.computed(()=>v.value?c("consumer_groups.errors.general"):""),M=e.ref(0),z=e.computed(()=>S.value===void 0),L=e.computed(()=>j.value.map(d=>({label:d.name,value:d.id,selected:s.value.includes(d.id),data:d}))),J=d=>{var f;const k=z.value?j.value.find(C=>C.id===d):(f=S.value)==null?void 0:f.find(C=>C.id===d);return k?k.name:d},oe=()=>{I.value="",F.value=[],x.value=[],y("cancel")},F=e.ref([]),V=e.ref(!1),I=e.ref(""),te=async()=>{if(!s.value.length){I.value="",x.value=[],y("cancel");return}V.value=!0,I.value="",F.value=[],x.value=[];try{const d=s.value.map(C=>ne(C)),k=await Promise.allSettled(d);let f=!0;k.forEach(C=>{C.status!=="fulfilled"&&(f=!1)}),f?(F.value=[],x.value=[],y("add:success",s.value),s.value=[]):(F.value.length&&y("add:partial-success",F.value),s.value=[],W(k))}catch{I.value=c("consumer_groups.errors.add"),y("error",I.value)}finally{V.value=!1}},re=e.computed(()=>{var k,f,C,K;let d=`${r.config.apiBaseUrl}${q.list[r.config.app].forConsumer}`;return r.config.app==="konnect"?d=d.replace(/{controlPlaneId}/gi,((k=r.config)==null?void 0:k.controlPlaneId)||"").replace(/{consumerId}/gi,((f=r.config)==null?void 0:f.consumerId)||""):r.config.app==="kongManager"&&(d=d.replace(/\/{workspace}/gi,(C=r.config)!=null&&C.workspace?`/${r.config.workspace}`:"").replace(/{consumerId}/gi,((K=r.config)==null?void 0:K.consumerId)||"")),d}),ne=async d=>{const k={group:d};try{const f=await i.post(re.value,k);return F.value.push(d),f}catch(f){let C=`${J(d)} - ${f.message}`;return f.response.status===409&&(C=`${J(d)} - ${c("consumer_groups.errors.already_added")}`),Promise.reject(Error(C))}},x=e.ref([]),W=d=>{x.value=d.map(k=>{var f;return(f=k.reason)==null?void 0:f.message}).filter(Boolean)};return e.watch(L,()=>{M.value++},{immediate:!0,deep:!0}),e.watch(()=>r.visible,()=>{r.visible&&ee()},{immediate:!0}),(d,k)=>{const f=e.resolveComponent("KMultiselect"),C=e.resolveComponent("KAlert"),K=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(K,{"action-button-disabled":V.value,class:"kong-ui-entities-add-to-groups-modal","data-testid":"add-to-group-modal",title:e.unref(c)("consumer_groups.consumers.add.title"),visible:o.visible,onCancel:oe,onProceed:te},{default:e.withCtx(()=>[e.createElementVNode("div",be,[e.createElementVNode("p",we,e.toDisplayString(e.unref(c)("consumer_groups.consumers.add.ctaText")),1),e.createVNode(f,{modelValue:s.value,"onUpdate:modelValue":k[0]||(k[0]=Q=>s.value=Q),autosuggest:"","data-testid":"add-to-groups-multiselect","dropdown-footer-text":z.value?e.unref(c)("consumer_groups.consumers.add.footer"):void 0,items:L.value,label:e.unref(c)("consumer_groups.consumers.add.consumer_groups_label"),loading:e.unref(Y),placeholder:e.unref(c)("consumer_groups.consumers.add.consumer_group_placeholder"),readonly:V.value,required:"",width:"100%",onQueryChange:e.unref(w)},null,8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),I.value||T.value||x.value.length?(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(C,{appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(e.unref(c)("consumer_groups.errors.add")),1),x.value.length?(e.openBlock(),e.createElementBlock("ul",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Q,G)=>(e.openBlock(),e.createElementBlock("li",{key:G},e.toDisplayString(Q),1))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,e.toDisplayString(I.value||T.value),1)]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["action-button-disabled","title","visible"])}}}),ue=(o,U)=>{const c=o.__vccOpts||o;for(const[r,y]of U)c[r]=y;return c},Ee=ue(xe,[["__scopeId","data-v-4260ce03"]]),Ne={class:"kong-ui-entities-consumer-groups-list"},$e={class:"button-row"},Be={class:"empty-state-icon-gateway"},Te=ue(e.defineComponent({__name:"ConsumerGroupList",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||!o.createRoute||!o.getViewRoute||!o.getEditRoute||o.app==="kongManager"&&!o.isExactMatch&&!o.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},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","add:success","remove:success"],setup(o,{emit:U}){var ye;const c=U,r=o,{i18nT:y,i18n:{t:i}}=ce.useI18n(),s=me.useRouter(),{axiosInstance:w}=p.useAxios((ye=r.config)==null?void 0:ye.axiosRequestConfig),Y=e.computed(()=>r.config.app!=="kongManager"||!!r.config.disableSorting),S={name:{label:i("consumer_groups.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1}};r.config.app==="kongManager"&&(S.consumers_count={label:i("consumer_groups.list.table_headers.consumers_count"),searchable:!1,sortable:!1}),S.tags={label:i("consumer_groups.list.table_headers.tags"),sortable:!1};const v=S,ee=n=>({"data-testid":n.username??n.custom_id??n.id}),j=()=>{r.config.consumerId?u():s.push(r.config.createRoute)},T=e.computed(()=>{var m,h,b,O;let n=`${r.config.apiBaseUrl}${q.list[r.config.app][V.value?"forConsumer":"all"]}`;return r.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((m=r.config)==null?void 0:m.controlPlaneId)||"").replace(/{consumerId}/gi,((h=r.config)==null?void 0:h.consumerId)||""):r.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(b=r.config)!=null&&b.workspace?`/${r.config.workspace}`:"").replace(/{consumerId}/gi,((O=r.config)==null?void 0:O.consumerId)||"")),n}),M=e.ref(""),z=e.computed(()=>{const n=r.config.app==="konnect"||r.config.isExactMatch;return n?{isExactMatch:n,fields:{username:S.name,id:{label:i("consumer_groups.list.table_headers.id")}},placeholder:i("consumer_groups.search.placeholder")}:{isExactMatch:n,fields:{name:S.name},schema:r.config.filterSchema}}),{hasRecords:L,handleStateChange:J}=p.useTableState(M),oe=e.computed(()=>L.value&&r.config.app==="konnect"),F=e.computed(()=>!r.enableV2EmptyStates&&r.config.app==="konnect"),V=e.computed(()=>!!r.config.consumerId),I=e.computed(()=>V.value?"kong-ui-entities-consumer-groups-list-in-consumer-page":"kong-ui-entities-consumer-groups-list"),te=e.computed(()=>r.config.app==="konnect"&&M.value?"consumer_group":V.value&&!r.config.paginatedEndpoint?"consumer_groups":void 0),{fetcher:re,fetcherState:ne,fetcherCacheKey:x}=p.useFetcher(e.computed(()=>({...r.config,cacheIdentifier:r.cacheIdentifier})),T,te),W=()=>{M.value=""},R=()=>{x.value++},d=e.ref(null),k=async(n,m)=>{const h=n.id;if(!await m(h)){c("copy:error",{entity:n,field:"id",message:i("consumer_groups.errors.copy")});return}c("copy:success",{entity:n,field:"id",message:i("consumer_groups.copy.success",{val:h})})},f=async(n,m)=>{const h=JSON.stringify(n);if(!await m(h)){c("copy:error",{entity:n,message:i("consumer_groups.errors.copy")});return}c("copy:success",{entity:n,message:i("consumer_groups.copy.success_brief")})},C=async n=>{var h;await((h=r.canRetrieve)==null?void 0:h.call(r,n))&&s.push(r.config.getViewRoute(n.id))},K=n=>({label:i("consumer_groups.actions.view"),to:r.config.getViewRoute(n)}),Q=n=>({label:i("consumer_groups.actions.edit"),to:r.config.getEditRoute(n)}),G=e.ref(void 0),X=e.ref(!1),H=e.ref(!1),se=e.ref(""),ie=p.useDeleteUrlBuilder(r.config,T.value),t=n=>{G.value=n,X.value=!0},a=()=>{X.value=!1},_=async()=>{var n,m,h;if((n=G.value)!=null&&n.id){H.value=!0;try{await w.delete(ie(G.value.id)),H.value=!1,X.value=!1,x.value++,c("delete:success",G.value)}catch(b){se.value=((h=(m=b.response)==null?void 0:m.data)==null?void 0:h.message)||b.message||i("consumer_groups.errors.delete"),c("error",b)}finally{H.value=!1}}},l=e.ref(!1),u=()=>{l.value=!0},N=()=>{l.value=!1},A=(n,m)=>{m||N(),x.value++,c("add:success",n)},E=()=>{V.value&&u()},B=e.ref(void 0),Z=e.ref(!1),Ke=e.ref(""),Ue=n=>{B.value=n,Z.value=!0},fe=()=>{Z.value=!1,B.value=void 0},Re=e.computed(()=>{var m,h,b,O;let n=`${r.config.apiBaseUrl}${q.list[r.config.app].oneForConsumer}`;return r.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((m=r.config)==null?void 0:m.controlPlaneId)||"").replace(/{consumerId}/gi,((h=r.config)==null?void 0:h.consumerId)||""):r.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(b=r.config)!=null&&b.workspace?`/${r.config.workspace}`:"").replace(/{consumerId}/gi,((O=r.config)==null?void 0:O.consumerId)||"")),n}),ge=e.ref(!1),qe=async()=>{if(B.value){ge.value=!0;try{const n=Re.value.replace(/{consumerGroupId}/gi,B.value.id);await w.delete(n),c("remove:success",B.value),fe(),x.value++}catch(n){Ke.value=n.message||i("consumer_groups.errors.delete"),c("error",n)}finally{ge.value=!1}}};e.watch(ne,n=>{var m,h,b;if(n.status===p.FetcherStatus.Error){d.value={title:i("consumer_groups.errors.general")},(b=(h=(m=n.error)==null?void 0:m.response)==null?void 0:h.data)!=null&&b.message&&(d.value.message=n.error.response.data.message),c("error",n.error);return}d.value=null});const de=e.ref({ctaPath:V.value?void 0:r.config.createRoute,ctaText:void 0,message:`${i("consumer_groups.list.empty_state.description")}${r.config.additionMessageForEmptyState?` ${r.config.additionMessageForEmptyState}`:""}`,title:i("consumer_groups.title")});return e.onBeforeMount(async()=>{await r.canCreate()&&(de.value.title=V.value?i("consumer_groups.list.empty_state.title_for_consumer"):i("consumer_groups.list.empty_state.title"),de.value.ctaText=V.value?i("consumer_groups.actions.add_to_group"):i("consumer_groups.actions.create"))}),(n,m)=>{const h=e.resolveComponent("KButton"),b=e.resolveComponent("KDropdownItem"),O=e.resolveComponent("KClipboardProvider"),Oe=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-pagination":V.value&&!o.config.paginatedEndpoint,"disable-sorting":Y.value,"empty-state-options":de.value,"enable-entity-actions":"","error-message":d.value,fetcher:e.unref(re),"fetcher-cache-key":e.unref(x),"pagination-type":"offset","preferences-storage-key":I.value,query:M.value,"row-attributes":ee,"table-headers":e.unref(v),onClearSearchInput:W,"onClick:row":m[4]||(m[4]=g=>C(g)),onEmptyStateCtaClicked:E,onSort:R,onState:e.unref(J)},e.createSlots({"toolbar-filter":e.withCtx(()=>[V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(p.EntityFilter),{key:0,modelValue:M.value,"onUpdate:modelValue":m[0]||(m[0]=g=>M.value=g),config:z.value},null,8,["modelValue","config"]))]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",$e,[oe.value?(e.openBlock(),e.createBlock(h,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"consumer-groups-learn-more-button",icon:"",onClick:m[1]||(m[1]=g=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(h,{appearance:"primary","data-testid":"toolbar-add-consumer-group",size:o.useActionOutside?"medium":"large",onClick:j},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.AddIcon)),e.createTextVNode(" "+e.toDisplayString(o.config.consumerId?e.unref(i)("consumer_groups.actions.add_to_group"):e.unref(i)("consumer_groups.list.toolbar_actions.new_consumer_group")),1)]),_:1},8,["size"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:g})=>[e.createElementVNode("b",null,e.toDisplayString(g??"-"),1)]),consumers_count:e.withCtx(({rowValue:g})=>[e.createTextVNode(e.toDisplayString(g??"-"),1)]),tags:e.withCtx(({rowValue:g})=>[e.createVNode(e.unref(p.TableTags),{tags:g},null,8,["tags"])]),actions:e.withCtx(({row:g})=>[e.createVNode(O,null,{default:e.withCtx(({copyToClipboard:le})=>[e.createVNode(b,{"data-testid":"action-entity-copy-id",onClick:je=>k(g,le)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("consumer_groups.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(O,null,{default:e.withCtx(({copyToClipboard:le})=>[e.createVNode(b,{"data-testid":"action-entity-copy-json",onClick:je=>f(g,le)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("consumer_groups.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canRetrieve(g)},{default:e.withCtx(()=>[e.createVNode(b,{"data-testid":"action-entity-view","has-divider":"",item:K(g.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canEdit(g)},{default:e.withCtx(()=>[e.createVNode(b,{"data-testid":"action-entity-edit",item:Q(g.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canDelete(g)},{default:e.withCtx(()=>[e.createVNode(b,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>o.config.consumerId?Ue(g):t(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.config.consumerId?e.unref(i)("consumer_groups.actions.exit"):e.unref(i)("consumer_groups.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(L)&&F.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(h,{appearance:"secondary",class:"open-learning-hub","data-testid":"consumer-groups-learn-more-button",icon:"",onClick:m[2]||(m[2]=g=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!M.value&&o.enableV2EmptyStates&&o.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var g;return[e.createVNode(e.unref(p.EntityEmptyState),{"action-button-text":e.unref(i)("consumer_groups.list.toolbar_actions.new_consumer_group"),appearance:"secondary","can-create":()=>o.canCreate(),"data-testid":"consumer-groups-entity-empty-state",description:e.unref(i)("consumer_groups.list.empty_state_v2.description"),"learn-more":o.config.app==="konnect",title:e.unref(i)("consumer_groups.list.empty_state_v2.title"),"onClick:create":j,"onClick:learnMore":m[3]||(m[3]=le=>n.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",Be,[e.createVNode(e.unref(ae.TeamIcon),{color:e.unref(he),size:e.unref(Ce)},null,8,["color","size"])])]),_:2},[(g=o.config)!=null&&g.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("consumer_groups.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-pagination","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","preferences-storage-key","query","table-headers","onState"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":H.value,"data-testid":"delete-consumer-group-modal",description:e.unref(i)("consumer_groups.delete.description"),"entity-name":G.value&&(G.value.name||G.value.id),"entity-type":e.unref(p.EntityTypes).ConsumerGroup,error:se.value,title:e.unref(i)("consumer_groups.delete.title"),visible:X.value,onCancel:a,onProceed:_},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),o.config.consumerId?(e.openBlock(),e.createBlock(Ee,{key:0,config:o.config,"data-testid":"add-to-group-modal",visible:l.value,"onAdd:partialSuccess":m[5]||(m[5]=g=>A(g,!0)),"onAdd:success":m[6]||(m[6]=g=>A(g)),onCancel:N},null,8,["config","visible"])):e.createCommentVNode("",!0),o.config.consumerId&&B.value?(e.openBlock(),e.createBlock(Oe,{key:1,"action-button-appearance":"danger","data-testid":"exit-group-modal",title:e.unref(i)("consumer_groups.consumers.exit.title"),visible:Z.value,onCancel:fe,onProceed:qe},{default:e.withCtx(()=>[e.createVNode(e.unref(y),{class:"exit-modal-message",keypath:o.config.consumerUsername?"consumer_groups.consumers.exit.confirmation":"consumer_groups.consumers.exit.confirmationNoUsername",tag:"p"},e.createSlots({consumerGroup:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(B.value.name||B.value.id),1)]),_:2},[o.config.consumerUsername?{name:"consumer",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(o.config.consumerUsername),1)]),key:"0"}:void 0]),1032,["keypath"]),e.createElementVNode("p",null,e.toDisplayString(e.unref(i)("consumer_groups.consumers.exit.description")),1)]),_:1},8,["title","visible"])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-dbf64903"]]),Me={class:"kong-ui-entities-consumer-group-form"},Ge={class:"select-item-container"},Ae={class:"select-item-label"},De={key:0,class:"select-item-description"},Pe=ue(e.defineComponent({__name:"ConsumerGroupForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||(o==null?void 0:o.app)==="konnect"&&!(o!=null&&o.controlPlaneId)||(o==null?void 0:o.app)==="kongManager"&&typeof(o==null?void 0:o.workspace)!="string"||!(o!=null&&o.cancelRoute))},consumerGroupId:{type:String,required:!1,default:""},hideConsumers:{type:Boolean,default:!1}},emits:["update","error","loading"],setup(o,{emit:U}){var H,se,ie;const c=o,r=U,{i18n:{t:y}}=ce.useI18n(),i=me.useRouter(),s=e.reactive({fields:{name:"",tags:"",consumers:[]},errorMessage:"",readonly:!1}),w=e.reactive({name:"",tags:"",consumers:[]}),{debouncedQueryChange:Y,loading:S,error:v,loadItems:ee,results:j}=p.useDebouncedFilter(c.config,(se=q.form[(H=c.config)==null?void 0:H.app])==null?void 0:se.consumersList,"",{fetchedItemsKey:"data",searchKeys:["username","custom_id","id"]}),{axiosInstance:T}=p.useAxios((ie=c.config)==null?void 0:ie.axiosRequestConfig),{getMessageFromError:M}=p.useErrors(),z=p.useValidators(),L=e.computed(()=>j.value.map(t=>({label:t.username||t.custom_id,value:t.id,selected:s.fields.consumers.includes(t.id),data:t}))),J=e.computed(()=>{var t,a;return(a=q.form[(t=c.config)==null?void 0:t.app])==null?void 0:a.edit}),oe=e.computed(()=>c.consumerGroupId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),F=e.computed(()=>!!s.fields.name&&!W.value),V=e.computed(()=>JSON.stringify(s.fields)!==JSON.stringify(w)),I=(t,a="",_="")=>{var u,N,A,E,B,Z;let l=`${(u=c.config)==null?void 0:u.apiBaseUrl}${q.form[(N=c.config)==null?void 0:N.app][t]}`;return((A=c.config)==null?void 0:A.app)==="konnect"?l=l.replace(/{controlPlaneId}/gi,((E=c.config)==null?void 0:E.controlPlaneId)||""):((B=c.config)==null?void 0:B.app)==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(Z=c.config)!=null&&Z.workspace?`/${c.config.workspace}`:"")),l=l.replace(/{id}/gi,a||c.consumerGroupId),(t==="addConsumer"||t==="removeConsumer")&&(l=l.replace(/{consumerId}/gi,_)),l},te=()=>{var t;i.push(((t=c.config)==null?void 0:t.cancelRoute)||{name:"consumer-group-list"})},re=t=>{r("error",t)},ne=t=>{r("loading",t)},x=async t=>{var _,l,u,N,A;s.fields.name=((_=t==null?void 0:t.item)==null?void 0:_.name)||((l=t==null?void 0:t.consumer_group)==null?void 0:l.name)||(t==null?void 0:t.name)||"";const a=((u=t==null?void 0:t.item)==null?void 0:u.tags)||(t==null?void 0:t.consumer_group.tags)||(t==null?void 0:t.tags)||[];if(s.fields.tags=(a==null?void 0:a.join(", "))||"","consumers"in t)s.fields.consumers=((N=t==null?void 0:t.consumers)==null?void 0:N.map(E=>E.id))||[];else try{const{data:E}=await T.get(I("getConsumers"));s.fields.consumers="consumers"in E?(A=E==null?void 0:E.consumers)==null?void 0:A.map(B=>B.id):[]}catch(E){f(E)}Object.assign(w,s.fields)},W=e.computed(()=>z.utf8Name(s.fields.name)),R=e.computed(()=>{var t,a;return{name:s.fields.name,tags:(a=(t=s.fields.tags.split(","))==null?void 0:t.map(_=>String(_||"").trim()))==null?void 0:a.filter(_=>_!=="")}}),d=async(t,a="")=>await T.post(I("addConsumer",a,t),{consumer:t}),k=async(t,a="")=>await T.delete(I("removeConsumer",a,t)),f=t=>{s.errorMessage=M(t),r("error",t)},C=(t=c.consumerGroupId)=>{Object.assign(w,s.fields),r("update",{...s.fields,id:t})},K=(t,a,_=c.consumerGroupId)=>{const l=t==null?void 0:t.find(u=>u.status!=="fulfilled");l?f({code:l.status,message:a}):C(_)},Q=async()=>{let t="";try{const{data:a}=await T.post(I("create"),R.value);t="item"in a?a.item.id:a.id}catch(a){f(a)}if(s.fields.consumers.length>0&&t)try{const a=s.fields.consumers.map(l=>d(l,t)),_=await Promise.allSettled(a);K(_,y("consumer_groups.errors.add_consumer"),t)}catch(a){f(a)}else s.fields.consumers.length===0&&t&&C(t)},G=async()=>{var _;try{((_=c.config)==null?void 0:_.app)==="konnect"?await T.put(I("edit"),R.value):await T.patch(I("edit"),R.value)}catch(l){f(l)}const t=s.fields.consumers.filter(l=>!w.consumers.includes(l)),a=w.consumers.filter(l=>!s.fields.consumers.includes(l));if(a.length===0&&t.length===0)C();else{if(a.length>0)try{const l=a.map(N=>k(N)),u=await Promise.allSettled(l);K(u,y("consumer_groups.errors.remove_consumer"))}catch(l){f(l)}if(t.length>0)try{const l=t.map(N=>d(N)),u=await Promise.allSettled(l);K(u,y("consumer_groups.errors.add_consumer"))}catch(l){f(l)}}},X=async()=>{try{s.readonly=!0,oe.value===p.EntityBaseFormType.Create?await Q():await G()}finally{s.readonly=!1}};return e.onBeforeMount(async()=>{await ee()}),(t,a)=>{const _=e.resolveComponent("KInput"),l=e.resolveComponent("KMultiselect");return e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(e.unref(p.EntityBaseForm),{"can-submit":F.value&&V.value,config:o.config,"edit-id":o.consumerGroupId,"entity-type":e.unref(p.SupportedEntityType).ConsumerGroup,"error-message":s.errorMessage||e.unref(v)||W.value,"fetch-url":J.value,"form-fields":R.value,"is-readonly":s.readonly,onCancel:te,"onFetch:error":a[3]||(a[3]=u=>re(u)),"onFetch:success":x,onLoading:a[4]||(a[4]=u=>ne(u)),onSubmit:X},{default:e.withCtx(()=>[e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(y)("consumer_groups.form.general_info.description"),title:e.unref(y)("consumer_groups.form.general_info.title")},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:s.fields.name,"onUpdate:modelValue":a[0]||(a[0]=u=>s.fields.name=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-group-form-name",label:e.unref(y)("consumer_groups.form.fields.name.label"),placeholder:e.unref(y)("consumer_groups.form.fields.name.placeholder"),required:"",type:"text"},null,8,["modelValue","label","placeholder"]),e.createVNode(_,{modelValue:s.fields.tags,"onUpdate:modelValue":a[1]||(a[1]=u=>s.fields.tags=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-group-form-tags",help:e.unref(y)("consumer_groups.form.fields.tags.help"),label:e.unref(y)("consumer_groups.form.fields.tags.label"),"label-attributes":{info:e.unref(y)("consumer_groups.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(y)("consumer_groups.form.fields.tags.placeholder"),type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder"])]),_:1},8,["description","title"]),o.hideConsumers?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(p.EntityFormSection),{key:0,description:e.unref(y)("consumer_groups.form.consumers.description"),"has-divider":"",title:e.unref(y)("consumer_groups.form.consumers.title")},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:s.fields.consumers,"onUpdate:modelValue":a[2]||(a[2]=u=>s.fields.consumers=u),appearance:"select",autosuggest:"",items:L.value,label:e.unref(y)("consumer_groups.form.fields.consumers.label"),loading:e.unref(S),placeholder:e.unref(y)("consumer_groups.form.fields.consumers.placeholder"),width:"auto",onQueryChange:e.unref(Y)},{"item-template":e.withCtx(({item:u})=>{var N,A,E;return[e.createElementVNode("div",Ge,[e.createElementVNode("div",Ae,e.toDisplayString(u.label),1),(N=u==null?void 0:u.data)!=null&&N.username&&((A=u==null?void 0:u.data)!=null&&A.custom_id)?(e.openBlock(),e.createElementBlock("div",De,e.toDisplayString((E=u==null?void 0:u.data)==null?void 0:E.custom_id),1)):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","items","label","loading","placeholder","onQueryChange"])]),_:1},8,["description","title"]))]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-1e5f8adb"]]),Se={class:"kong-ui-consumer-group-entity-config-card"},Fe=e.defineComponent({__name:"ConsumerGroupConfigCard",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string"||!o.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(o){const U=o,{i18n:{t:c}}=ce.useI18n(),r=e.computed(()=>q.form[U.config.app].edit),y=e.ref({id:{},name:{},created_at:{},updated_at:{},tags:{tooltip:c("consumer_groups.form.fields.tags.tooltip")}});return(i,s)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createVNode(e.unref(p.EntityBaseConfigCard),{config:o.config,"config-card-doc":o.configCardDoc,"config-schema":y.value,"data-key":"consumer_group","entity-type":e.unref(p.SupportedEntityType).ConsumerGroup,"fetch-url":r.value,"hide-title":o.hideTitle,"onFetch:error":s[0]||(s[0]=w=>i.$emit("fetch:error",w)),"onFetch:success":s[1]||(s[1]=w=>i.$emit("fetch:success",w)),onLoading:s[2]||(s[2]=w=>i.$emit("loading",w))},null,8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});$.ConsumerGroupConfigCard=Fe,$.ConsumerGroupForm=Pe,$.ConsumerGroupList=Te,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function($,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):($=typeof globalThis<"u"?globalThis:$||self,e($["kong-ui-public-entities-consumer-groups"]={},$.Vue,$.VueRouter,$.KongIcons,$["kong-ui-public-i18n"],$["kong-ui-public-entities-shared"]))})(this,function($,e,me,ae,pe,p){"use strict";const he="#00abd2",Ce="24px",_e={consumer_groups:{list:{table_headers:{name:"Name",consumers_count:"Consumers",tags:"Tags",id:"ID"},empty_state:{title:"Configure a New Consumer Group",description:"Use consumer groups to manage custom rate limiting configuration for subsets of consumers.",title_for_consumer:"Add to a consumer group"},empty_state_v2:{title:"Configure your first consumer group",group:"Consumer groups created in gateways within this group will automatically appear here.",description:"Organize consumers into groups to easily apply policies like rate limiting and authentication across the entire group."},toolbar_actions:{new_consumer_group:"New consumer group"}},title:"Consumer Groups",search:{placeholder:"Filter by exact name or ID"},actions:{add_to_group:"Add to consumer group",create:"New consumer group",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",exit:"Exit",view:"View Details"},delete:{title:"Delete a Consumer Group",description:"Deleting this group will remove all its plugins and rate limit configuration. This action cannot be reversed."},consumers:{add:{title:"Add To Consumer Groups",ctaText:"Add this consumer to consumer groups",consumer_groups_label:"Consumer Groups",consumer_group_placeholder:"Add to consumer groups",footer:"Search by exact name or ID to find consumer groups not included in the list"},exit:{title:"Exit from a Consumer Group",confirmation:"Are you sure you want to remove consumer {consumer} from consumer group {consumerGroup}?",confirmationNoUsername:"Are you sure you want this consumer to exit from consumer group {consumerGroup}?",description:"Exiting from the group could change the rate limit policy applied to this consumer."}},errors:{general:"Consumer Groups could not be retrieved",delete:"The consumer group could not be deleted at this time.",copy:"Failed to copy to clipboard",add:"The consumer could not be added to some groups at this time.",already_added:"The consumer is already in this consumer group",add_consumer:"An unexpected error occurred while adding consumers. Please try again.",remove_consumer:"An unexpected error occurred while removing consumers. Please try again."},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{general_info:{title:"General Information",description:"General information will help identify and manage this consumer group."},consumers:{title:"Consumers",description:"Add or remove consumers from this group"},fields:{name:{label:"Name",placeholder:"Enter a unique name for this consumer group "},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."},consumers:{label:"Consumers",placeholder:"Select one or more consumers"}}}}};function ke(){const o=pe.createI18n("en-us",_e);return{i18n:o,i18nT:pe.i18nTComponent(o)}}const ce={useI18n:ke},D="/v2/control-planes/{controlPlaneId}/core-entities",P="/{workspace}",q={list:{konnect:{all:`${D}/consumer_groups`,forModal:`${D}/consumer_groups`,forConsumer:`${D}/consumers/{consumerId}/consumer_groups`,oneForConsumer:`${D}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`},kongManager:{all:`${P}/consumer_groups?counter=true`,forModal:`${P}/consumer_groups`,forConsumer:`${P}/consumers/{consumerId}/consumer_groups`,oneForConsumer:`${P}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`}},form:{konnect:{consumersList:`${D}/consumers`,create:`${D}/consumer_groups`,edit:`${D}/consumer_groups/{id}`,addConsumer:`${D}/consumer_groups/{id}/consumers`,removeConsumer:`${D}/consumer_groups/{id}/consumers/{consumerId}`,getConsumers:`${D}/consumer_groups/{id}/consumers`},kongManager:{consumersList:`${P}/consumers`,create:`${P}/consumer_groups`,edit:`${P}/consumer_groups/{id}`,addConsumer:`${P}/consumer_groups/{id}/consumers`,removeConsumer:`${P}/consumer_groups/{id}/consumers/{consumerId}`,getConsumers:`${P}/consumer_groups/{id}/consumers`}}},be={class:"add-to-group-form-container"},we={class:"add-to-group-cta-text"},Ve={key:0,class:"kong-ui-entity-add-to-groups-error"},Ie={key:0},xe=e.defineComponent({__name:"AddToGroupModal",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||!o.consumerId)},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","add:success","add:partial-success","error"],setup(o,{emit:U}){var R;const{i18n:{t:c}}=ce.useI18n(),r=o,y=U,{axiosInstance:i}=p.useAxios((R=r.config)==null?void 0:R.axiosRequestConfig),s=e.ref([]),{debouncedQueryChange:w,loading:Y,allRecords:S,error:v,loadItems:ee,results:j}=p.useDebouncedFilter(r.config,q.list[r.config.app].forModal,"",{fetchedItemsKey:"data",searchKeys:["name","id"]}),T=e.computed(()=>v.value?c("consumer_groups.errors.general"):""),M=e.ref(0),z=e.computed(()=>S.value===void 0),L=e.computed(()=>j.value.map(d=>({label:d.name,value:d.id,selected:s.value.includes(d.id),data:d}))),J=d=>{var f;const k=z.value?j.value.find(C=>C.id===d):(f=S.value)==null?void 0:f.find(C=>C.id===d);return k?k.name:d},oe=()=>{I.value="",F.value=[],x.value=[],y("cancel")},F=e.ref([]),V=e.ref(!1),I=e.ref(""),te=async()=>{if(!s.value.length){I.value="",x.value=[],y("cancel");return}V.value=!0,I.value="",F.value=[],x.value=[];try{const d=s.value.map(C=>ne(C)),k=await Promise.allSettled(d);let f=!0;k.forEach(C=>{C.status!=="fulfilled"&&(f=!1)}),f?(F.value=[],x.value=[],y("add:success",s.value),s.value=[]):(F.value.length&&y("add:partial-success",F.value),s.value=[],W(k))}catch{I.value=c("consumer_groups.errors.add"),y("error",I.value)}finally{V.value=!1}},re=e.computed(()=>{var k,f,C,K;let d=`${r.config.apiBaseUrl}${q.list[r.config.app].forConsumer}`;return r.config.app==="konnect"?d=d.replace(/{controlPlaneId}/gi,((k=r.config)==null?void 0:k.controlPlaneId)||"").replace(/{consumerId}/gi,((f=r.config)==null?void 0:f.consumerId)||""):r.config.app==="kongManager"&&(d=d.replace(/\/{workspace}/gi,(C=r.config)!=null&&C.workspace?`/${r.config.workspace}`:"").replace(/{consumerId}/gi,((K=r.config)==null?void 0:K.consumerId)||"")),d}),ne=async d=>{const k={group:d};try{const f=await i.post(re.value,k);return F.value.push(d),f}catch(f){let C=`${J(d)} - ${f.message}`;return f.response.status===409&&(C=`${J(d)} - ${c("consumer_groups.errors.already_added")}`),Promise.reject(Error(C))}},x=e.ref([]),W=d=>{x.value=d.map(k=>{var f;return(f=k.reason)==null?void 0:f.message}).filter(Boolean)};return e.watch(L,()=>{M.value++},{immediate:!0,deep:!0}),e.watch(()=>r.visible,()=>{r.visible&&ee()},{immediate:!0}),(d,k)=>{const f=e.resolveComponent("KMultiselect"),C=e.resolveComponent("KAlert"),K=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(K,{"action-button-disabled":V.value,class:"kong-ui-entities-add-to-groups-modal","data-testid":"add-to-group-modal",title:e.unref(c)("consumer_groups.consumers.add.title"),visible:o.visible,onCancel:oe,onProceed:te},{default:e.withCtx(()=>[e.createElementVNode("div",be,[e.createElementVNode("p",we,e.toDisplayString(e.unref(c)("consumer_groups.consumers.add.ctaText")),1),e.createVNode(f,{modelValue:s.value,"onUpdate:modelValue":k[0]||(k[0]=Q=>s.value=Q),autosuggest:"","data-testid":"add-to-groups-multiselect","dropdown-footer-text":z.value?e.unref(c)("consumer_groups.consumers.add.footer"):void 0,items:L.value,label:e.unref(c)("consumer_groups.consumers.add.consumer_groups_label"),loading:e.unref(Y),placeholder:e.unref(c)("consumer_groups.consumers.add.consumer_group_placeholder"),readonly:V.value,required:"",width:"100%",onQueryChange:e.unref(w)},null,8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),I.value||T.value||x.value.length?(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(C,{appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(e.unref(c)("consumer_groups.errors.add")),1),x.value.length?(e.openBlock(),e.createElementBlock("ul",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Q,G)=>(e.openBlock(),e.createElementBlock("li",{key:G},e.toDisplayString(Q),1))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,e.toDisplayString(I.value||T.value),1)]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["action-button-disabled","title","visible"])}}}),ue=(o,U)=>{const c=o.__vccOpts||o;for(const[r,y]of U)c[r]=y;return c},Ee=ue(xe,[["__scopeId","data-v-4260ce03"]]),Ne={class:"kong-ui-entities-consumer-groups-list"},$e={class:"button-row"},Be={class:"empty-state-icon-gateway"},Te=ue(e.defineComponent({__name:"ConsumerGroupList",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||!o.createRoute||!o.getViewRoute||!o.getEditRoute||o.app==="kongManager"&&!o.isExactMatch&&!o.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},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","add:success","remove:success"],setup(o,{emit:U}){var ye;const c=U,r=o,{i18nT:y,i18n:{t:i}}=ce.useI18n(),s=me.useRouter(),{axiosInstance:w}=p.useAxios((ye=r.config)==null?void 0:ye.axiosRequestConfig),Y=e.computed(()=>r.config.app!=="kongManager"||!!r.config.disableSorting),S={name:{label:i("consumer_groups.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1}};r.config.app==="kongManager"&&(S.consumers_count={label:i("consumer_groups.list.table_headers.consumers_count"),searchable:!1,sortable:!1}),S.tags={label:i("consumer_groups.list.table_headers.tags"),sortable:!1};const v=S,ee=n=>({"data-testid":n.username??n.custom_id??n.id}),j=()=>{r.config.consumerId?u():s.push(r.config.createRoute)},T=e.computed(()=>{var m,h,b,O;let n=`${r.config.apiBaseUrl}${q.list[r.config.app][V.value?"forConsumer":"all"]}`;return r.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((m=r.config)==null?void 0:m.controlPlaneId)||"").replace(/{consumerId}/gi,((h=r.config)==null?void 0:h.consumerId)||""):r.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(b=r.config)!=null&&b.workspace?`/${r.config.workspace}`:"").replace(/{consumerId}/gi,((O=r.config)==null?void 0:O.consumerId)||"")),n}),M=e.ref(""),z=e.computed(()=>{const n=r.config.app==="konnect"||r.config.isExactMatch;return n?{isExactMatch:n,fields:{username:S.name,id:{label:i("consumer_groups.list.table_headers.id")}},placeholder:i("consumer_groups.search.placeholder")}:{isExactMatch:n,fields:{name:S.name},schema:r.config.filterSchema}}),{hasRecords:L,handleStateChange:J}=p.useTableState(M),oe=e.computed(()=>L.value&&r.config.app==="konnect"),F=e.computed(()=>!r.enableV2EmptyStates&&r.config.app==="konnect"),V=e.computed(()=>!!r.config.consumerId),I=e.computed(()=>V.value?"kong-ui-entities-consumer-groups-list-in-consumer-page":"kong-ui-entities-consumer-groups-list"),te=e.computed(()=>r.config.app==="konnect"&&M.value?"consumer_group":V.value&&!r.config.paginatedEndpoint?"consumer_groups":void 0),{fetcher:re,fetcherState:ne,fetcherCacheKey:x}=p.useFetcher(e.computed(()=>({...r.config,cacheIdentifier:r.cacheIdentifier})),T.value,te),W=()=>{M.value=""},R=()=>{x.value++},d=e.ref(null),k=async(n,m)=>{const h=n.id;if(!await m(h)){c("copy:error",{entity:n,field:"id",message:i("consumer_groups.errors.copy")});return}c("copy:success",{entity:n,field:"id",message:i("consumer_groups.copy.success",{val:h})})},f=async(n,m)=>{const h=JSON.stringify(n);if(!await m(h)){c("copy:error",{entity:n,message:i("consumer_groups.errors.copy")});return}c("copy:success",{entity:n,message:i("consumer_groups.copy.success_brief")})},C=async n=>{var h;await((h=r.canRetrieve)==null?void 0:h.call(r,n))&&s.push(r.config.getViewRoute(n.id))},K=n=>({label:i("consumer_groups.actions.view"),to:r.config.getViewRoute(n)}),Q=n=>({label:i("consumer_groups.actions.edit"),to:r.config.getEditRoute(n)}),G=e.ref(void 0),X=e.ref(!1),H=e.ref(!1),se=e.ref(""),ie=p.useDeleteUrlBuilder(r.config,T.value),t=n=>{G.value=n,X.value=!0},a=()=>{X.value=!1},_=async()=>{var n,m,h;if((n=G.value)!=null&&n.id){H.value=!0;try{await w.delete(ie(G.value.id)),H.value=!1,X.value=!1,x.value++,c("delete:success",G.value)}catch(b){se.value=((h=(m=b.response)==null?void 0:m.data)==null?void 0:h.message)||b.message||i("consumer_groups.errors.delete"),c("error",b)}finally{H.value=!1}}},l=e.ref(!1),u=()=>{l.value=!0},N=()=>{l.value=!1},A=(n,m)=>{m||N(),x.value++,c("add:success",n)},E=()=>{V.value&&u()},B=e.ref(void 0),Z=e.ref(!1),Ke=e.ref(""),Ue=n=>{B.value=n,Z.value=!0},fe=()=>{Z.value=!1,B.value=void 0},Re=e.computed(()=>{var m,h,b,O;let n=`${r.config.apiBaseUrl}${q.list[r.config.app].oneForConsumer}`;return r.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((m=r.config)==null?void 0:m.controlPlaneId)||"").replace(/{consumerId}/gi,((h=r.config)==null?void 0:h.consumerId)||""):r.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(b=r.config)!=null&&b.workspace?`/${r.config.workspace}`:"").replace(/{consumerId}/gi,((O=r.config)==null?void 0:O.consumerId)||"")),n}),ge=e.ref(!1),qe=async()=>{if(B.value){ge.value=!0;try{const n=Re.value.replace(/{consumerGroupId}/gi,B.value.id);await w.delete(n),c("remove:success",B.value),fe(),x.value++}catch(n){Ke.value=n.message||i("consumer_groups.errors.delete"),c("error",n)}finally{ge.value=!1}}};e.watch(ne,n=>{var m,h,b;if(n.status===p.FetcherStatus.Error){d.value={title:i("consumer_groups.errors.general")},(b=(h=(m=n.error)==null?void 0:m.response)==null?void 0:h.data)!=null&&b.message&&(d.value.message=n.error.response.data.message),c("error",n.error);return}d.value=null});const de=e.ref({ctaPath:V.value?void 0:r.config.createRoute,ctaText:void 0,message:`${i("consumer_groups.list.empty_state.description")}${r.config.additionMessageForEmptyState?` ${r.config.additionMessageForEmptyState}`:""}`,title:i("consumer_groups.title")});return e.onBeforeMount(async()=>{await r.canCreate()&&(de.value.title=V.value?i("consumer_groups.list.empty_state.title_for_consumer"):i("consumer_groups.list.empty_state.title"),de.value.ctaText=V.value?i("consumer_groups.actions.add_to_group"):i("consumer_groups.actions.create"))}),(n,m)=>{const h=e.resolveComponent("KButton"),b=e.resolveComponent("KDropdownItem"),O=e.resolveComponent("KClipboardProvider"),Oe=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-pagination":V.value&&!o.config.paginatedEndpoint,"disable-sorting":Y.value,"empty-state-options":de.value,"enable-entity-actions":"","error-message":d.value,fetcher:e.unref(re),"fetcher-cache-key":e.unref(x),"pagination-type":"offset","preferences-storage-key":I.value,query:M.value,"row-attributes":ee,"table-headers":e.unref(v),onClearSearchInput:W,"onClick:row":m[4]||(m[4]=g=>C(g)),onEmptyStateCtaClicked:E,onSort:R,onState:e.unref(J)},e.createSlots({"toolbar-filter":e.withCtx(()=>[V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(p.EntityFilter),{key:0,modelValue:M.value,"onUpdate:modelValue":m[0]||(m[0]=g=>M.value=g),config:z.value},null,8,["modelValue","config"]))]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",$e,[oe.value?(e.openBlock(),e.createBlock(h,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"consumer-groups-learn-more-button",icon:"",onClick:m[1]||(m[1]=g=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(h,{appearance:"primary","data-testid":"toolbar-add-consumer-group",size:o.useActionOutside?"medium":"large",onClick:j},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.AddIcon)),e.createTextVNode(" "+e.toDisplayString(o.config.consumerId?e.unref(i)("consumer_groups.actions.add_to_group"):e.unref(i)("consumer_groups.list.toolbar_actions.new_consumer_group")),1)]),_:1},8,["size"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:g})=>[e.createElementVNode("b",null,e.toDisplayString(g??"-"),1)]),consumers_count:e.withCtx(({rowValue:g})=>[e.createTextVNode(e.toDisplayString(g??"-"),1)]),tags:e.withCtx(({rowValue:g})=>[e.createVNode(e.unref(p.TableTags),{tags:g},null,8,["tags"])]),actions:e.withCtx(({row:g})=>[e.createVNode(O,null,{default:e.withCtx(({copyToClipboard:le})=>[e.createVNode(b,{"data-testid":"action-entity-copy-id",onClick:je=>k(g,le)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("consumer_groups.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(O,null,{default:e.withCtx(({copyToClipboard:le})=>[e.createVNode(b,{"data-testid":"action-entity-copy-json",onClick:je=>f(g,le)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("consumer_groups.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canRetrieve(g)},{default:e.withCtx(()=>[e.createVNode(b,{"data-testid":"action-entity-view","has-divider":"",item:K(g.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canEdit(g)},{default:e.withCtx(()=>[e.createVNode(b,{"data-testid":"action-entity-edit",item:Q(g.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canDelete(g)},{default:e.withCtx(()=>[e.createVNode(b,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>o.config.consumerId?Ue(g):t(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.config.consumerId?e.unref(i)("consumer_groups.actions.exit"):e.unref(i)("consumer_groups.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(L)&&F.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(h,{appearance:"secondary",class:"open-learning-hub","data-testid":"consumer-groups-learn-more-button",icon:"",onClick:m[2]||(m[2]=g=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!M.value&&o.enableV2EmptyStates&&o.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var g;return[e.createVNode(e.unref(p.EntityEmptyState),{"action-button-text":e.unref(i)("consumer_groups.list.toolbar_actions.new_consumer_group"),appearance:"secondary","can-create":()=>o.canCreate(),"data-testid":"consumer-groups-entity-empty-state",description:e.unref(i)("consumer_groups.list.empty_state_v2.description"),"learn-more":o.config.app==="konnect",title:e.unref(i)("consumer_groups.list.empty_state_v2.title"),"onClick:create":j,"onClick:learnMore":m[3]||(m[3]=le=>n.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",Be,[e.createVNode(e.unref(ae.TeamIcon),{color:e.unref(he),size:e.unref(Ce)},null,8,["color","size"])])]),_:2},[(g=o.config)!=null&&g.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("consumer_groups.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-pagination","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","preferences-storage-key","query","table-headers","onState"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":H.value,"data-testid":"delete-consumer-group-modal",description:e.unref(i)("consumer_groups.delete.description"),"entity-name":G.value&&(G.value.name||G.value.id),"entity-type":e.unref(p.EntityTypes).ConsumerGroup,error:se.value,title:e.unref(i)("consumer_groups.delete.title"),visible:X.value,onCancel:a,onProceed:_},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),o.config.consumerId?(e.openBlock(),e.createBlock(Ee,{key:0,config:o.config,"data-testid":"add-to-group-modal",visible:l.value,"onAdd:partialSuccess":m[5]||(m[5]=g=>A(g,!0)),"onAdd:success":m[6]||(m[6]=g=>A(g)),onCancel:N},null,8,["config","visible"])):e.createCommentVNode("",!0),o.config.consumerId&&B.value?(e.openBlock(),e.createBlock(Oe,{key:1,"action-button-appearance":"danger","data-testid":"exit-group-modal",title:e.unref(i)("consumer_groups.consumers.exit.title"),visible:Z.value,onCancel:fe,onProceed:qe},{default:e.withCtx(()=>[e.createVNode(e.unref(y),{class:"exit-modal-message",keypath:o.config.consumerUsername?"consumer_groups.consumers.exit.confirmation":"consumer_groups.consumers.exit.confirmationNoUsername",tag:"p"},e.createSlots({consumerGroup:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(B.value.name||B.value.id),1)]),_:2},[o.config.consumerUsername?{name:"consumer",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(o.config.consumerUsername),1)]),key:"0"}:void 0]),1032,["keypath"]),e.createElementVNode("p",null,e.toDisplayString(e.unref(i)("consumer_groups.consumers.exit.description")),1)]),_:1},8,["title","visible"])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-c31b2868"]]),Me={class:"kong-ui-entities-consumer-group-form"},Ge={class:"select-item-container"},Ae={class:"select-item-label"},De={key:0,class:"select-item-description"},Pe=ue(e.defineComponent({__name:"ConsumerGroupForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||(o==null?void 0:o.app)==="konnect"&&!(o!=null&&o.controlPlaneId)||(o==null?void 0:o.app)==="kongManager"&&typeof(o==null?void 0:o.workspace)!="string"||!(o!=null&&o.cancelRoute))},consumerGroupId:{type:String,required:!1,default:""},hideConsumers:{type:Boolean,default:!1}},emits:["update","error","loading"],setup(o,{emit:U}){var H,se,ie;const c=o,r=U,{i18n:{t:y}}=ce.useI18n(),i=me.useRouter(),s=e.reactive({fields:{name:"",tags:"",consumers:[]},errorMessage:"",readonly:!1}),w=e.reactive({name:"",tags:"",consumers:[]}),{debouncedQueryChange:Y,loading:S,error:v,loadItems:ee,results:j}=p.useDebouncedFilter(c.config,(se=q.form[(H=c.config)==null?void 0:H.app])==null?void 0:se.consumersList,"",{fetchedItemsKey:"data",searchKeys:["username","custom_id","id"]}),{axiosInstance:T}=p.useAxios((ie=c.config)==null?void 0:ie.axiosRequestConfig),{getMessageFromError:M}=p.useErrors(),z=p.useValidators(),L=e.computed(()=>j.value.map(t=>({label:t.username||t.custom_id,value:t.id,selected:s.fields.consumers.includes(t.id),data:t}))),J=e.computed(()=>{var t,a;return(a=q.form[(t=c.config)==null?void 0:t.app])==null?void 0:a.edit}),oe=e.computed(()=>c.consumerGroupId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),F=e.computed(()=>!!s.fields.name&&!W.value),V=e.computed(()=>JSON.stringify(s.fields)!==JSON.stringify(w)),I=(t,a="",_="")=>{var u,N,A,E,B,Z;let l=`${(u=c.config)==null?void 0:u.apiBaseUrl}${q.form[(N=c.config)==null?void 0:N.app][t]}`;return((A=c.config)==null?void 0:A.app)==="konnect"?l=l.replace(/{controlPlaneId}/gi,((E=c.config)==null?void 0:E.controlPlaneId)||""):((B=c.config)==null?void 0:B.app)==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(Z=c.config)!=null&&Z.workspace?`/${c.config.workspace}`:"")),l=l.replace(/{id}/gi,a||c.consumerGroupId),(t==="addConsumer"||t==="removeConsumer")&&(l=l.replace(/{consumerId}/gi,_)),l},te=()=>{var t;i.push(((t=c.config)==null?void 0:t.cancelRoute)||{name:"consumer-group-list"})},re=t=>{r("error",t)},ne=t=>{r("loading",t)},x=async t=>{var _,l,u,N,A;s.fields.name=((_=t==null?void 0:t.item)==null?void 0:_.name)||((l=t==null?void 0:t.consumer_group)==null?void 0:l.name)||(t==null?void 0:t.name)||"";const a=((u=t==null?void 0:t.item)==null?void 0:u.tags)||(t==null?void 0:t.consumer_group.tags)||(t==null?void 0:t.tags)||[];if(s.fields.tags=(a==null?void 0:a.join(", "))||"","consumers"in t)s.fields.consumers=((N=t==null?void 0:t.consumers)==null?void 0:N.map(E=>E.id))||[];else try{const{data:E}=await T.get(I("getConsumers"));s.fields.consumers="consumers"in E?(A=E==null?void 0:E.consumers)==null?void 0:A.map(B=>B.id):[]}catch(E){f(E)}Object.assign(w,s.fields)},W=e.computed(()=>z.utf8Name(s.fields.name)),R=e.computed(()=>{var t,a;return{name:s.fields.name,tags:(a=(t=s.fields.tags.split(","))==null?void 0:t.map(_=>String(_||"").trim()))==null?void 0:a.filter(_=>_!=="")}}),d=async(t,a="")=>await T.post(I("addConsumer",a,t),{consumer:t}),k=async(t,a="")=>await T.delete(I("removeConsumer",a,t)),f=t=>{s.errorMessage=M(t),r("error",t)},C=(t=c.consumerGroupId)=>{Object.assign(w,s.fields),r("update",{...s.fields,id:t})},K=(t,a,_=c.consumerGroupId)=>{const l=t==null?void 0:t.find(u=>u.status!=="fulfilled");l?f({code:l.status,message:a}):C(_)},Q=async()=>{let t="";try{const{data:a}=await T.post(I("create"),R.value);t="item"in a?a.item.id:a.id}catch(a){f(a)}if(s.fields.consumers.length>0&&t)try{const a=s.fields.consumers.map(l=>d(l,t)),_=await Promise.allSettled(a);K(_,y("consumer_groups.errors.add_consumer"),t)}catch(a){f(a)}else s.fields.consumers.length===0&&t&&C(t)},G=async()=>{var _;try{((_=c.config)==null?void 0:_.app)==="konnect"?await T.put(I("edit"),R.value):await T.patch(I("edit"),R.value)}catch(l){f(l)}const t=s.fields.consumers.filter(l=>!w.consumers.includes(l)),a=w.consumers.filter(l=>!s.fields.consumers.includes(l));if(a.length===0&&t.length===0)C();else{if(a.length>0)try{const l=a.map(N=>k(N)),u=await Promise.allSettled(l);K(u,y("consumer_groups.errors.remove_consumer"))}catch(l){f(l)}if(t.length>0)try{const l=t.map(N=>d(N)),u=await Promise.allSettled(l);K(u,y("consumer_groups.errors.add_consumer"))}catch(l){f(l)}}},X=async()=>{try{s.readonly=!0,oe.value===p.EntityBaseFormType.Create?await Q():await G()}finally{s.readonly=!1}};return e.onBeforeMount(async()=>{await ee()}),(t,a)=>{const _=e.resolveComponent("KInput"),l=e.resolveComponent("KMultiselect");return e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(e.unref(p.EntityBaseForm),{"can-submit":F.value&&V.value,config:o.config,"edit-id":o.consumerGroupId,"entity-type":e.unref(p.SupportedEntityType).ConsumerGroup,"error-message":s.errorMessage||e.unref(v)||W.value,"fetch-url":J.value,"form-fields":R.value,"is-readonly":s.readonly,onCancel:te,"onFetch:error":a[3]||(a[3]=u=>re(u)),"onFetch:success":x,onLoading:a[4]||(a[4]=u=>ne(u)),onSubmit:X},{default:e.withCtx(()=>[e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(y)("consumer_groups.form.general_info.description"),title:e.unref(y)("consumer_groups.form.general_info.title")},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:s.fields.name,"onUpdate:modelValue":a[0]||(a[0]=u=>s.fields.name=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-group-form-name",label:e.unref(y)("consumer_groups.form.fields.name.label"),placeholder:e.unref(y)("consumer_groups.form.fields.name.placeholder"),required:"",type:"text"},null,8,["modelValue","label","placeholder"]),e.createVNode(_,{modelValue:s.fields.tags,"onUpdate:modelValue":a[1]||(a[1]=u=>s.fields.tags=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-group-form-tags",help:e.unref(y)("consumer_groups.form.fields.tags.help"),label:e.unref(y)("consumer_groups.form.fields.tags.label"),"label-attributes":{info:e.unref(y)("consumer_groups.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(y)("consumer_groups.form.fields.tags.placeholder"),type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder"])]),_:1},8,["description","title"]),o.hideConsumers?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(p.EntityFormSection),{key:0,description:e.unref(y)("consumer_groups.form.consumers.description"),"has-divider":"",title:e.unref(y)("consumer_groups.form.consumers.title")},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:s.fields.consumers,"onUpdate:modelValue":a[2]||(a[2]=u=>s.fields.consumers=u),appearance:"select",autosuggest:"",items:L.value,label:e.unref(y)("consumer_groups.form.fields.consumers.label"),loading:e.unref(S),placeholder:e.unref(y)("consumer_groups.form.fields.consumers.placeholder"),width:"auto",onQueryChange:e.unref(Y)},{"item-template":e.withCtx(({item:u})=>{var N,A,E;return[e.createElementVNode("div",Ge,[e.createElementVNode("div",Ae,e.toDisplayString(u.label),1),(N=u==null?void 0:u.data)!=null&&N.username&&((A=u==null?void 0:u.data)!=null&&A.custom_id)?(e.openBlock(),e.createElementBlock("div",De,e.toDisplayString((E=u==null?void 0:u.data)==null?void 0:E.custom_id),1)):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","items","label","loading","placeholder","onQueryChange"])]),_:1},8,["description","title"]))]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-1e5f8adb"]]),Se={class:"kong-ui-consumer-group-entity-config-card"},Fe=e.defineComponent({__name:"ConsumerGroupConfigCard",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string"||!o.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(o){const U=o,{i18n:{t:c}}=ce.useI18n(),r=e.computed(()=>q.form[U.config.app].edit),y=e.ref({id:{},name:{},created_at:{},updated_at:{},tags:{tooltip:c("consumer_groups.form.fields.tags.tooltip")}});return(i,s)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createVNode(e.unref(p.EntityBaseConfigCard),{config:o.config,"config-card-doc":o.configCardDoc,"config-schema":y.value,"data-key":"consumer_group","entity-type":e.unref(p.SupportedEntityType).ConsumerGroup,"fetch-url":r.value,"hide-title":o.hideTitle,"onFetch:error":s[0]||(s[0]=w=>i.$emit("fetch:error",w)),"onFetch:success":s[1]||(s[1]=w=>i.$emit("fetch:success",w)),onLoading:s[2]||(s[2]=w=>i.$emit("loading",w))},null,8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});$.ConsumerGroupConfigCard=Fe,$.ConsumerGroupForm=Pe,$.ConsumerGroupList=Te,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 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}.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-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{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-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{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-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-69a1e1d7]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-69a1e1d7]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-69a1e1d7]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-69a1e1d7] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-69a1e1d7]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-b073d014]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-b073d014] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-b073d014] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-b073d014]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-b073d014] .k-button:last-of-type,.form-actions[data-v-b073d014] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-1cdbe476]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-1cdbe476]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-1cdbe476]{display:none}.kong-ui-entity-base-table[data-v-1cdbe476] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-d1bb74d1]{width:100%}.kong-ui-entity-filter-clear[data-v-d1bb74d1]{cursor:pointer}.kong-ui-entity-filter[data-v-d1bb74d1]{display:flex;position:relative}.kong-ui-entity-filter[data-v-d1bb74d1] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-d1bb74d1] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-d1bb74d1]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-d1bb74d1]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-d1bb74d1]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-d1bb74d1]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-d1bb74d1]{color:#232633}.menu-item-expand-icon[data-v-d1bb74d1]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-d1bb74d1]{transform:rotate(180deg)}.menu-item-indicator[data-v-d1bb74d1]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-d1bb74d1]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-d1bb74d1] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-d1bb74d1] .k-input{width:100%}.menu-item-body[data-v-d1bb74d1] .k-select-input .input{font-size:12px}.menu-item-body[data-v-d1bb74d1] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-d1bb74d1]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-d1bb74d1]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-d1bb74d1]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size: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-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-b6376b66]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-b6376b66]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-content{-webkit-box-orient:vertical;color:#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-b6376b66]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{width:640px}}.kong-ui-entities-add-to-groups-modal .add-to-group-cta-text[data-v-4260ce03]{margin-top:0}.kong-ui-entities-add-to-groups-modal .add-to-group-form-container[data-v-4260ce03]{margin-bottom:20px}.kong-ui-entities-add-to-groups-modal .add-to-group-form-container .kong-ui-entity-add-to-groups-error[data-v-4260ce03]{margin-top:16px}.button-row[data-v-dbf64903]{align-items:center;display:flex;gap:12px}.kong-ui-entities-consumer-groups-list[data-v-dbf64903]{width:100%}.kong-ui-entities-consumer-groups-list .kong-ui-entity-filter-input[data-v-dbf64903]{margin-right:12px}.kong-ui-entities-consumer-groups-list .exit-modal-message[data-v-dbf64903]{margin-top:0}.kong-ui-entities-consumer-group-form[data-v-1e5f8adb]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-consumer-group-form[data-v-1e5f8adb] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-consumer-group-form .select-item-container .select-item-label[data-v-1e5f8adb]{font-weight:600}.kong-ui-entities-consumer-group-form .select-item-container .select-item-description[data-v-1e5f8adb]{color:#6c7489;font-size:12px}
|
|
1
|
+
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 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}.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-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{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-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{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-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-69a1e1d7]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-69a1e1d7]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-69a1e1d7]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-69a1e1d7] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-69a1e1d7]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-b073d014]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-b073d014] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-b073d014] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-b073d014]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-b073d014] .k-button:last-of-type,.form-actions[data-v-b073d014] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-1cdbe476]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-1cdbe476]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-1cdbe476]{display:none}.kong-ui-entity-base-table[data-v-1cdbe476] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-d1bb74d1]{width:100%}.kong-ui-entity-filter-clear[data-v-d1bb74d1]{cursor:pointer}.kong-ui-entity-filter[data-v-d1bb74d1]{display:flex;position:relative}.kong-ui-entity-filter[data-v-d1bb74d1] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-d1bb74d1] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-d1bb74d1]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-d1bb74d1]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-d1bb74d1]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-d1bb74d1]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-d1bb74d1]{color:#232633}.menu-item-expand-icon[data-v-d1bb74d1]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-d1bb74d1]{transform:rotate(180deg)}.menu-item-indicator[data-v-d1bb74d1]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-d1bb74d1]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-d1bb74d1] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-d1bb74d1] .k-input{width:100%}.menu-item-body[data-v-d1bb74d1] .k-select-input .input{font-size:12px}.menu-item-body[data-v-d1bb74d1] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-d1bb74d1]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-d1bb74d1]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-d1bb74d1]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size: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-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-b6376b66]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-b6376b66]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-content{-webkit-box-orient:vertical;color:#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-b6376b66]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{width:640px}}.kong-ui-entities-add-to-groups-modal .add-to-group-cta-text[data-v-4260ce03]{margin-top:0}.kong-ui-entities-add-to-groups-modal .add-to-group-form-container[data-v-4260ce03]{margin-bottom:20px}.kong-ui-entities-add-to-groups-modal .add-to-group-form-container .kong-ui-entity-add-to-groups-error[data-v-4260ce03]{margin-top:16px}.button-row[data-v-c31b2868]{align-items:center;display:flex;gap:12px}.kong-ui-entities-consumer-groups-list[data-v-c31b2868]{width:100%}.kong-ui-entities-consumer-groups-list .kong-ui-entity-filter-input[data-v-c31b2868]{margin-right:12px}.kong-ui-entities-consumer-groups-list .exit-modal-message[data-v-c31b2868]{margin-top:0}.kong-ui-entities-consumer-group-form[data-v-1e5f8adb]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-consumer-group-form[data-v-1e5f8adb] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-consumer-group-form .select-item-container .select-item-label[data-v-1e5f8adb]{font-weight:600}.kong-ui-entities-consumer-group-form .select-item-container .select-item-description[data-v-1e5f8adb]{color:#6c7489;font-size:12px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-consumer-groups",
|
|
3
|
-
"version": "3.8.8-pr.2120.
|
|
3
|
+
"version": "3.8.8-pr.2120.ab02c9a17.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-consumer-groups.umd.js",
|
|
6
6
|
"module": "./dist/entities-consumer-groups.es.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"axios": "^1.7.7",
|
|
27
27
|
"vue": ">= 3.3.13 < 4",
|
|
28
28
|
"vue-router": "^4.4.5",
|
|
29
|
-
"@kong-ui-public/entities-shared": "^3.22.9-pr.2120.
|
|
29
|
+
"@kong-ui-public/entities-shared": "^3.22.9-pr.2120.ab02c9a17.0",
|
|
30
30
|
"@kong-ui-public/i18n": "^2.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"axios": "^1.7.7",
|
|
37
37
|
"vue": "^3.5.13",
|
|
38
38
|
"vue-router": "^4.4.5",
|
|
39
|
-
"@kong-ui-public/entities-shared": "^3.22.9-pr.2120.
|
|
39
|
+
"@kong-ui-public/entities-shared": "^3.22.9-pr.2120.ab02c9a17.0",
|
|
40
40
|
"@kong-ui-public/i18n": "^2.3.0"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|