@kong-ui-public/entities-consumer-groups 1.2.21 → 1.2.22-pr.880.cba2bebf.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumer-groups.es.js +1267 -1160
- package/dist/entities-consumer-groups.umd.js +17 -17
- package/dist/style.css +1 -1
- package/package.json +7 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as oe, ref as M, computed as S, watch as xe, renderSlot as Z, createCommentVNode as G, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as q, openBlock as f, createBlock as U, createSlots as Te, withCtx as v, createElementVNode as P, createTextVNode as Q, toDisplayString as O, createVNode as N, createElementBlock as x, renderList as ye, Fragment as ve, normalizeClass as Fe, withModifiers as rt, withDirectives as et, vShow as tt, useCssVars as fr, resolveDynamicComponent as Ue, normalizeProps as mr, guardReactiveProps as gr, mergeProps as ht, onMounted as yr, onUnmounted as hr, normalizeStyle as pn, inject as vr, pushScopeId as fn, popScopeId as mn, reactive as qt } from "vue";
|
|
2
2
|
import { useRouter as wt } from "vue-router";
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import
|
|
5
|
-
import { MethodsArray as
|
|
6
|
-
const
|
|
3
|
+
import { createI18n as At, i18nTComponent as gn } from "@kong-ui-public/i18n";
|
|
4
|
+
import br from "axios";
|
|
5
|
+
import { MethodsArray as Cr } from "@kong/kongponents";
|
|
6
|
+
const kr = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
name: "Name",
|
|
@@ -95,62 +95,62 @@ const br = {
|
|
|
95
95
|
name: "The name can be any string containing letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
},
|
|
99
|
-
consumer_groups:
|
|
98
|
+
}, _r = {
|
|
99
|
+
consumer_groups: kr
|
|
100
100
|
};
|
|
101
|
-
function
|
|
102
|
-
const e =
|
|
101
|
+
function wr() {
|
|
102
|
+
const e = At("en-us", _r);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
|
-
i18nT:
|
|
105
|
+
i18nT: gn(e)
|
|
106
106
|
// Translation component <i18n-t>
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
const ct = {
|
|
110
|
-
useI18n:
|
|
111
|
-
},
|
|
110
|
+
useI18n: wr
|
|
111
|
+
}, Ae = "/api/runtime_groups/{controlPlaneId}", Ie = "/{workspace}", $e = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
114
|
-
all: `${
|
|
115
|
-
forConsumer: `${Ie}/consumers/{consumerId}/consumer_groups`,
|
|
116
|
-
oneForConsumer: `${Ie}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
|
-
},
|
|
118
|
-
kongManager: {
|
|
119
|
-
all: `${Ae}/consumer_groups?counter=true`,
|
|
114
|
+
all: `${Ae}/consumer_groups`,
|
|
120
115
|
forConsumer: `${Ae}/consumers/{consumerId}/consumer_groups`,
|
|
121
116
|
oneForConsumer: `${Ae}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
|
+
},
|
|
118
|
+
kongManager: {
|
|
119
|
+
all: `${Ie}/consumer_groups?counter=true`,
|
|
120
|
+
forConsumer: `${Ie}/consumers/{consumerId}/consumer_groups`,
|
|
121
|
+
oneForConsumer: `${Ie}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
form: {
|
|
125
125
|
konnect: {
|
|
126
|
-
consumersList: `${Ie}/consumers`,
|
|
127
|
-
create: `${Ie}/consumer_groups`,
|
|
128
|
-
edit: `${Ie}/consumer_groups/{id}`,
|
|
129
|
-
addConsumer: `${Ie}/consumer_groups/{id}/consumers`,
|
|
130
|
-
removeConsumer: `${Ie}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
131
|
-
getConsumers: `${Ie}/consumer_groups/{id}/consumers`
|
|
132
|
-
},
|
|
133
|
-
kongManager: {
|
|
134
126
|
consumersList: `${Ae}/consumers`,
|
|
135
127
|
create: `${Ae}/consumer_groups`,
|
|
136
128
|
edit: `${Ae}/consumer_groups/{id}`,
|
|
137
129
|
addConsumer: `${Ae}/consumer_groups/{id}/consumers`,
|
|
138
130
|
removeConsumer: `${Ae}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
131
|
getConsumers: `${Ae}/consumer_groups/{id}/consumers`
|
|
132
|
+
},
|
|
133
|
+
kongManager: {
|
|
134
|
+
consumersList: `${Ie}/consumers`,
|
|
135
|
+
create: `${Ie}/consumer_groups`,
|
|
136
|
+
edit: `${Ie}/consumer_groups/{id}`,
|
|
137
|
+
addConsumer: `${Ie}/consumer_groups/{id}/consumers`,
|
|
138
|
+
removeConsumer: `${Ie}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
|
+
getConsumers: `${Ie}/consumer_groups/{id}/consumers`
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
var
|
|
144
|
-
function
|
|
143
|
+
var yn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(yn || {}), nt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nt || {}), Oe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Oe || {}), ne = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(ne || {}), be = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(be || {});
|
|
144
|
+
function It(e = {}) {
|
|
145
145
|
return {
|
|
146
|
-
axiosInstance:
|
|
146
|
+
axiosInstance: br.create({
|
|
147
147
|
withCredentials: !0,
|
|
148
148
|
timeout: 3e4,
|
|
149
149
|
...e
|
|
150
150
|
})
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Ar() {
|
|
154
154
|
return {
|
|
155
155
|
debounce: (e, n) => {
|
|
156
156
|
let t;
|
|
@@ -162,12 +162,12 @@ function _r() {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const ft = "khcp-user-table-preferences",
|
|
165
|
+
const ft = "khcp-user-table-preferences", Ir = {
|
|
166
166
|
pageSize: 30,
|
|
167
167
|
sortColumnKey: void 0,
|
|
168
168
|
sortColumnOrder: void 0
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function Sr() {
|
|
171
171
|
const e = (t) => {
|
|
172
172
|
if (typeof t == "string")
|
|
173
173
|
try {
|
|
@@ -191,17 +191,17 @@ function Ir() {
|
|
|
191
191
|
},
|
|
192
192
|
getTablePreferences: (t) => {
|
|
193
193
|
const r = n();
|
|
194
|
-
return (r == null ? void 0 : r.get(t)) || void 0 ||
|
|
194
|
+
return (r == null ? void 0 : r.get(t)) || void 0 || Ir;
|
|
195
195
|
},
|
|
196
196
|
deleteAllTablePreferences: () => {
|
|
197
197
|
localStorage.removeItem(ft);
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const xr = {
|
|
202
202
|
message: "Are you sure you want to delete this {entityType}?",
|
|
203
203
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
204
|
-
},
|
|
204
|
+
}, Tr = {
|
|
205
205
|
actions: {
|
|
206
206
|
save: "Save",
|
|
207
207
|
cancel: "Cancel",
|
|
@@ -210,13 +210,13 @@ const Ar = {
|
|
|
210
210
|
errors: {
|
|
211
211
|
edit: "The entity could not be edited at this time."
|
|
212
212
|
}
|
|
213
|
-
},
|
|
213
|
+
}, $r = {
|
|
214
214
|
emptyState: {
|
|
215
215
|
noSearchResultsTitle: "No results found",
|
|
216
216
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
217
217
|
noSearchResultsCtaText: "Clear"
|
|
218
218
|
}
|
|
219
|
-
},
|
|
219
|
+
}, jr = {
|
|
220
220
|
title: "Configuration",
|
|
221
221
|
actions: {
|
|
222
222
|
copy: "Copy JSON"
|
|
@@ -251,7 +251,7 @@ const Ar = {
|
|
|
251
251
|
entryTitle: "Entry {index}",
|
|
252
252
|
structuredFormat: "Structured"
|
|
253
253
|
}
|
|
254
|
-
},
|
|
254
|
+
}, Mr = {
|
|
255
255
|
filterButtonText: "Filter",
|
|
256
256
|
fieldLabel: "Filter by:",
|
|
257
257
|
inputPlaceholder: "Enter a value",
|
|
@@ -259,15 +259,15 @@ const Ar = {
|
|
|
259
259
|
applyButtonText: "Apply",
|
|
260
260
|
clearButtonText: "Clear",
|
|
261
261
|
clearAllButtonText: "Clear all filters"
|
|
262
|
-
},
|
|
262
|
+
}, Er = {
|
|
263
263
|
errors: {
|
|
264
264
|
fetch: "Could not fetch available items",
|
|
265
265
|
invalid: "Please select a valid value"
|
|
266
266
|
}
|
|
267
|
-
},
|
|
267
|
+
}, Or = {
|
|
268
268
|
unexpected: "An unexpected error has occurred",
|
|
269
269
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
270
|
-
},
|
|
270
|
+
}, Nr = {
|
|
271
271
|
enable: {
|
|
272
272
|
title: "Enable {entityType}",
|
|
273
273
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -278,21 +278,21 @@ const Ar = {
|
|
|
278
278
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
279
279
|
confirmText: "Yes, disable"
|
|
280
280
|
}
|
|
281
|
-
},
|
|
282
|
-
deleteModal:
|
|
283
|
-
baseForm:
|
|
284
|
-
baseTable:
|
|
285
|
-
baseConfigCard:
|
|
286
|
-
filter:
|
|
287
|
-
debouncedFilter:
|
|
288
|
-
errors:
|
|
289
|
-
toggleModal:
|
|
281
|
+
}, Fr = {
|
|
282
|
+
deleteModal: xr,
|
|
283
|
+
baseForm: Tr,
|
|
284
|
+
baseTable: $r,
|
|
285
|
+
baseConfigCard: jr,
|
|
286
|
+
filter: Mr,
|
|
287
|
+
debouncedFilter: Er,
|
|
288
|
+
errors: Or,
|
|
289
|
+
toggleModal: Nr
|
|
290
290
|
};
|
|
291
291
|
function St() {
|
|
292
|
-
const e =
|
|
292
|
+
const e = At("en-us", Fr);
|
|
293
293
|
return {
|
|
294
294
|
i18n: e,
|
|
295
|
-
i18nT:
|
|
295
|
+
i18nT: gn(e)
|
|
296
296
|
// Translation component <i18n-t>
|
|
297
297
|
};
|
|
298
298
|
}
|
|
@@ -301,31 +301,31 @@ function Br(e, n, t, r = {
|
|
|
301
301
|
searchKeys: ["id"]
|
|
302
302
|
}) {
|
|
303
303
|
t || (t = "100");
|
|
304
|
-
const { axiosInstance: o } =
|
|
304
|
+
const { axiosInstance: o } = It({
|
|
305
305
|
headers: e.requestHeaders
|
|
306
|
-
}), { i18n: { t: a } } = St(), { debounce: i } =
|
|
307
|
-
await
|
|
308
|
-
}, 200), l = M(!1), u = M(""), d = M(""), c = M([]), m = M(void 0), g =
|
|
306
|
+
}), { i18n: { t: a } } = St(), { debounce: i } = Ar(), s = i(async (h) => {
|
|
307
|
+
await A(h);
|
|
308
|
+
}, 200), l = M(!1), u = M(""), d = M(""), c = M([]), m = M(void 0), g = y(n);
|
|
309
309
|
let k = `${e.apiBaseUrl}${g}`;
|
|
310
310
|
e.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
311
311
|
const _ = async () => {
|
|
312
312
|
try {
|
|
313
313
|
l.value = !0;
|
|
314
|
-
const { data:
|
|
315
|
-
|
|
314
|
+
const { data: h } = await o.get(`${k}?size=${t}`);
|
|
315
|
+
h != null && h.next || (m.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : []), c.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : [];
|
|
316
316
|
} catch {
|
|
317
317
|
c.value = [], u.value = a("debouncedFilter.errors.fetch");
|
|
318
318
|
} finally {
|
|
319
319
|
l.value = !1;
|
|
320
320
|
}
|
|
321
|
-
}, p = M(""),
|
|
322
|
-
var b,
|
|
323
|
-
if (p.value !==
|
|
324
|
-
if (p.value =
|
|
321
|
+
}, p = M(""), A = async (h) => {
|
|
322
|
+
var b, F;
|
|
323
|
+
if (p.value !== h)
|
|
324
|
+
if (p.value = h || "", m.value === void 0)
|
|
325
325
|
try {
|
|
326
326
|
l.value = !0, u.value = "", d.value = "";
|
|
327
327
|
let H = k + "";
|
|
328
|
-
|
|
328
|
+
h && (H += `/${h}`);
|
|
329
329
|
const { data: re } = await o.get(`${H}?size=${t}`);
|
|
330
330
|
r.fetchedItemsKey in re ? c.value = re[r.fetchedItemsKey] : re != null && re.id ? c.value = [re] : c.value = [];
|
|
331
331
|
} catch (H) {
|
|
@@ -334,14 +334,14 @@ function Br(e, n, t, r = {
|
|
|
334
334
|
l.value = !1;
|
|
335
335
|
}
|
|
336
336
|
else
|
|
337
|
-
l.value = !0, d.value = "",
|
|
337
|
+
l.value = !0, d.value = "", h ? (c.value = (F = m.value) == null ? void 0 : F.filter((H) => {
|
|
338
338
|
var re;
|
|
339
|
-
let
|
|
340
|
-
for (const
|
|
341
|
-
const
|
|
342
|
-
|
|
339
|
+
let z = !1;
|
|
340
|
+
for (const w of r.searchKeys) {
|
|
341
|
+
const D = typeof H[w] == "string" ? (re = H[w]) == null ? void 0 : re.toLowerCase() : H[w];
|
|
342
|
+
D != null && D.includes(h.toLowerCase()) && (z = !0);
|
|
343
343
|
}
|
|
344
|
-
return
|
|
344
|
+
return z;
|
|
345
345
|
}), (!c.value || !c.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : c.value = m.value, l.value = !1;
|
|
346
346
|
};
|
|
347
347
|
return {
|
|
@@ -354,13 +354,13 @@ function Br(e, n, t, r = {
|
|
|
354
354
|
debouncedQueryChange: s
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
const t =
|
|
357
|
+
function Kr(e, n) {
|
|
358
|
+
const t = y(n), r = S(
|
|
359
359
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
360
360
|
);
|
|
361
361
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function qr() {
|
|
364
364
|
const { i18n: { t: e } } = St();
|
|
365
365
|
return {
|
|
366
366
|
getMessageFromError: (n) => {
|
|
@@ -388,10 +388,10 @@ function Kr() {
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
const t = M(
|
|
391
|
+
function hn(e, n) {
|
|
392
|
+
const t = M(y(e)), r = M(y(n)), o = S(
|
|
393
393
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
394
|
-
), a =
|
|
394
|
+
), a = S(
|
|
395
395
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
396
396
|
);
|
|
397
397
|
return (i) => {
|
|
@@ -406,15 +406,15 @@ function pn(e, n) {
|
|
|
406
406
|
}
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
function
|
|
410
|
-
const r =
|
|
409
|
+
function Lr(e, n, t = "data") {
|
|
410
|
+
const r = y(n), { axiosInstance: o } = It({
|
|
411
411
|
headers: e.requestHeaders
|
|
412
|
-
}), a =
|
|
413
|
-
status:
|
|
412
|
+
}), a = hn(e, r), i = M({
|
|
413
|
+
status: Oe.Idle
|
|
414
414
|
});
|
|
415
415
|
return { fetcher: async (s) => {
|
|
416
416
|
try {
|
|
417
|
-
i.value = { status:
|
|
417
|
+
i.value = { status: Oe.Loading };
|
|
418
418
|
const l = a(s), { data: u } = await o.get(l), d = t && t.replace(/[^\w-_]/gi, "");
|
|
419
419
|
let c;
|
|
420
420
|
u[d] && Array.isArray(u[d]) ? c = u[d] : c = Object.keys(u).length ? [u] : [];
|
|
@@ -428,7 +428,7 @@ function Nr(e, n, t = "data") {
|
|
|
428
428
|
} : null
|
|
429
429
|
};
|
|
430
430
|
return i.value = {
|
|
431
|
-
status:
|
|
431
|
+
status: Oe.Idle,
|
|
432
432
|
response: m
|
|
433
433
|
}, m;
|
|
434
434
|
} catch (l) {
|
|
@@ -437,18 +437,18 @@ function Nr(e, n, t = "data") {
|
|
|
437
437
|
total: 0
|
|
438
438
|
};
|
|
439
439
|
return s.query && l.response.status === 404 ? (i.value = {
|
|
440
|
-
status:
|
|
440
|
+
status: Oe.NoResults,
|
|
441
441
|
response: u,
|
|
442
442
|
error: l
|
|
443
443
|
}, u) : (i.value = {
|
|
444
|
-
status:
|
|
444
|
+
status: Oe.Error,
|
|
445
445
|
response: u,
|
|
446
446
|
error: l
|
|
447
447
|
}, u);
|
|
448
448
|
}
|
|
449
449
|
}, fetcherState: i };
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function Pr() {
|
|
452
452
|
return {
|
|
453
453
|
getPropValue: (e, n) => (n == null ? void 0 : n[e]) ?? void 0,
|
|
454
454
|
objectsAreEqual: (e, n) => {
|
|
@@ -464,96 +464,200 @@ function Lr() {
|
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function Vr() {
|
|
468
468
|
return {
|
|
469
469
|
convertKeyToTitle: (e, n = "_") => e ? e.split(n).map((t) => t.toLowerCase() === "id" ? t.toUpperCase() : t.charAt(0).toUpperCase() + t.substring(1)).join(" ") : ""
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
|
-
const
|
|
472
|
+
const vn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Lt = (e) => {
|
|
473
473
|
if (typeof e != "string")
|
|
474
474
|
throw new TypeError("Invalid argument expected string");
|
|
475
|
-
const n = e.match(
|
|
475
|
+
const n = e.match(vn);
|
|
476
476
|
if (!n)
|
|
477
477
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
478
478
|
return n.shift(), n;
|
|
479
|
-
},
|
|
479
|
+
}, Pt = (e) => e === "*" || e === "x" || e === "X", Vt = (e) => {
|
|
480
480
|
const n = parseInt(e, 10);
|
|
481
481
|
return isNaN(n) ? e : n;
|
|
482
|
-
},
|
|
483
|
-
if (
|
|
482
|
+
}, Ur = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Dr = (e, n) => {
|
|
483
|
+
if (Pt(e) || Pt(n))
|
|
484
484
|
return 0;
|
|
485
|
-
const [t, r] =
|
|
485
|
+
const [t, r] = Ur(Vt(e), Vt(n));
|
|
486
486
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
487
|
-
},
|
|
487
|
+
}, Ut = (e, n) => {
|
|
488
488
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
489
|
-
const r =
|
|
489
|
+
const r = Dr(e[t] || "0", n[t] || "0");
|
|
490
490
|
if (r !== 0)
|
|
491
491
|
return r;
|
|
492
492
|
}
|
|
493
493
|
return 0;
|
|
494
494
|
}, Rr = (e, n) => {
|
|
495
|
-
const t =
|
|
496
|
-
return i !== 0 ? i : o && a ?
|
|
497
|
-
},
|
|
498
|
-
|
|
495
|
+
const t = Lt(e), r = Lt(n), o = t.pop(), a = r.pop(), i = Ut(t, r);
|
|
496
|
+
return i !== 0 ? i : o && a ? Ut(o.split("."), a.split(".")) : o || a ? o ? -1 : 1 : 0;
|
|
497
|
+
}, Dt = (e, n, t) => {
|
|
498
|
+
Gr(t);
|
|
499
499
|
const r = Rr(e, n);
|
|
500
|
-
return
|
|
501
|
-
},
|
|
500
|
+
return bn[t].includes(r);
|
|
501
|
+
}, bn = {
|
|
502
502
|
">": [1],
|
|
503
503
|
">=": [0, 1],
|
|
504
504
|
"=": [0],
|
|
505
505
|
"<=": [-1, 0],
|
|
506
506
|
"<": [-1],
|
|
507
507
|
"!=": [-1, 1]
|
|
508
|
-
},
|
|
508
|
+
}, Rt = Object.keys(bn), Gr = (e) => {
|
|
509
509
|
if (typeof e != "string")
|
|
510
510
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
511
|
-
if (
|
|
512
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
513
|
-
},
|
|
514
|
-
function
|
|
511
|
+
if (Rt.indexOf(e) === -1)
|
|
512
|
+
throw new Error(`Invalid operator, expected one of ${Rt.join("|")}`);
|
|
513
|
+
}, Hr = (e) => typeof e == "string" && /^[v\d]/.test(e) && vn.test(e);
|
|
514
|
+
function zr(e) {
|
|
515
515
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
516
516
|
if (!n)
|
|
517
517
|
return !0;
|
|
518
518
|
const { edition: r, version: o } = n;
|
|
519
|
-
if (!
|
|
519
|
+
if (!Hr(o))
|
|
520
520
|
return console.error("Invalid version"), !1;
|
|
521
521
|
const a = t[r];
|
|
522
522
|
if (!a)
|
|
523
523
|
return !1;
|
|
524
524
|
const [i, s] = a;
|
|
525
|
-
return !(i &&
|
|
525
|
+
return !(i && Dt(o, i, "<") || s && Dt(o, s, ">"));
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function Yr(e) {
|
|
528
528
|
const n = M(0), t = M(0), r = M(!1);
|
|
529
529
|
return xe(e, (o) => {
|
|
530
530
|
o && !r.value && (n.value = o.offsetWidth, t.value = o.scrollWidth, r.value = !0);
|
|
531
531
|
}), {
|
|
532
|
-
isTruncated:
|
|
532
|
+
isTruncated: S(() => n.value < t.value)
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
535
|
const ce = {
|
|
536
|
-
useAxios:
|
|
536
|
+
useAxios: It,
|
|
537
537
|
useDebouncedFilter: Br,
|
|
538
|
-
useDeleteUrlBuilder:
|
|
539
|
-
useErrors:
|
|
540
|
-
useFetcher:
|
|
541
|
-
useFetchUrlBuilder:
|
|
542
|
-
useHelpers:
|
|
543
|
-
useStringHelpers:
|
|
538
|
+
useDeleteUrlBuilder: Kr,
|
|
539
|
+
useErrors: qr,
|
|
540
|
+
useFetcher: Lr,
|
|
541
|
+
useFetchUrlBuilder: hn,
|
|
542
|
+
useHelpers: Pr,
|
|
543
|
+
useStringHelpers: Vr,
|
|
544
544
|
useI18n: St,
|
|
545
|
-
useGatewayFeatureSupported:
|
|
546
|
-
useTruncationDetector:
|
|
545
|
+
useGatewayFeatureSupported: zr,
|
|
546
|
+
useTruncationDetector: Yr
|
|
547
547
|
}, Jr = {
|
|
548
548
|
fail: "Failed to copy id to clipboard",
|
|
549
549
|
success: {
|
|
550
550
|
prefix: "Successfully",
|
|
551
551
|
content: " copied to clipboard"
|
|
552
552
|
}
|
|
553
|
-
},
|
|
553
|
+
}, Wr = "Copy to clipboard", Zr = {
|
|
554
554
|
message: Jr,
|
|
555
|
-
iconTitle:
|
|
556
|
-
},
|
|
555
|
+
iconTitle: Wr
|
|
556
|
+
}, Qr = "kong-ui-copy-uuid-notify", Gt = "24px", Xr = (e, n) => {
|
|
557
|
+
const t = e.__vccOpts || e;
|
|
558
|
+
for (const [r, o] of n)
|
|
559
|
+
t[r] = o;
|
|
560
|
+
return t;
|
|
561
|
+
}, eo = (e) => (fn("data-v-8bcb7a17"), e = e(), mn(), e), to = ["aria-hidden"], no = {
|
|
562
|
+
key: 0,
|
|
563
|
+
"data-testid": "kui-icon-svg-title"
|
|
564
|
+
}, ro = /* @__PURE__ */ eo(() => /* @__PURE__ */ P("path", {
|
|
565
|
+
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
566
|
+
fill: "currentColor"
|
|
567
|
+
}, null, -1)), oo = /* @__PURE__ */ oe({
|
|
568
|
+
__name: "CopyIcon",
|
|
569
|
+
props: {
|
|
570
|
+
/** The accessibility text provided to screen readers */
|
|
571
|
+
title: {
|
|
572
|
+
type: String,
|
|
573
|
+
required: !1,
|
|
574
|
+
default: ""
|
|
575
|
+
},
|
|
576
|
+
/** The icon color. Defaults to `currentColor` which inherits text color from the parent element */
|
|
577
|
+
color: {
|
|
578
|
+
type: String,
|
|
579
|
+
required: !1,
|
|
580
|
+
default: "currentColor"
|
|
581
|
+
},
|
|
582
|
+
/** The CSS display property for the icon. Defaults to `block` */
|
|
583
|
+
display: {
|
|
584
|
+
type: String,
|
|
585
|
+
required: !1,
|
|
586
|
+
default: "block"
|
|
587
|
+
},
|
|
588
|
+
/** Whether the icon is just eye-candy or is meaningful to the page (should screen-readers ignore the icon?) */
|
|
589
|
+
decorative: {
|
|
590
|
+
type: Boolean,
|
|
591
|
+
required: !1,
|
|
592
|
+
default: !1
|
|
593
|
+
},
|
|
594
|
+
/** The icon size */
|
|
595
|
+
size: {
|
|
596
|
+
type: [Number, String],
|
|
597
|
+
required: !1,
|
|
598
|
+
default: Gt,
|
|
599
|
+
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
600
|
+
validator: (e) => {
|
|
601
|
+
if (typeof e == "number" && e > 0)
|
|
602
|
+
return !0;
|
|
603
|
+
if (typeof e == "string") {
|
|
604
|
+
const n = String(e).replace(/px/gi, ""), t = Number(n);
|
|
605
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
606
|
+
return !0;
|
|
607
|
+
}
|
|
608
|
+
return !1;
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
/** The HTML tag to utilize for the icon's wrapper element. Defaults to `span` */
|
|
612
|
+
as: {
|
|
613
|
+
type: String,
|
|
614
|
+
required: !1,
|
|
615
|
+
default: "span"
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
setup(e) {
|
|
619
|
+
const n = e, t = S(() => {
|
|
620
|
+
if (typeof n.size == "number" && n.size > 0)
|
|
621
|
+
return `${n.size}px`;
|
|
622
|
+
if (typeof n.size == "string") {
|
|
623
|
+
const o = String(n.size).replace(/px/gi, ""), a = Number(o);
|
|
624
|
+
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
625
|
+
return `${a}px`;
|
|
626
|
+
}
|
|
627
|
+
return Gt;
|
|
628
|
+
}), r = S(() => ({
|
|
629
|
+
boxSizing: "border-box",
|
|
630
|
+
color: n.color,
|
|
631
|
+
display: n.display,
|
|
632
|
+
height: t.value,
|
|
633
|
+
lineHeight: "0",
|
|
634
|
+
width: t.value
|
|
635
|
+
}));
|
|
636
|
+
return (o, a) => (f(), U(Ue(e.as), {
|
|
637
|
+
"aria-hidden": e.decorative ? "true" : void 0,
|
|
638
|
+
class: "kui-icon copy-icon",
|
|
639
|
+
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
640
|
+
style: pn(r.value)
|
|
641
|
+
}, {
|
|
642
|
+
default: v(() => [
|
|
643
|
+
(f(), x("svg", {
|
|
644
|
+
"aria-hidden": e.decorative ? "true" : void 0,
|
|
645
|
+
"data-testid": "kui-icon-svg-copy-icon",
|
|
646
|
+
fill: "none",
|
|
647
|
+
height: "100%",
|
|
648
|
+
role: "img",
|
|
649
|
+
viewBox: "0 0 24 24",
|
|
650
|
+
width: "100%",
|
|
651
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
652
|
+
}, [
|
|
653
|
+
e.title ? (f(), x("title", no, O(e.title), 1)) : G("", !0),
|
|
654
|
+
ro
|
|
655
|
+
], 8, to))
|
|
656
|
+
]),
|
|
657
|
+
_: 1
|
|
658
|
+
}, 8, ["aria-hidden", "style"]));
|
|
659
|
+
}
|
|
660
|
+
}), ao = /* @__PURE__ */ Xr(oo, [["__scopeId", "data-v-8bcb7a17"]]), io = "20px", so = { class: "kong-ui-copy-uuid" }, lo = ["onClick"], Ht = 15, uo = /* @__PURE__ */ oe({
|
|
557
661
|
__name: "CopyUuid",
|
|
558
662
|
props: {
|
|
559
663
|
uuid: {
|
|
@@ -597,19 +701,19 @@ const ce = {
|
|
|
597
701
|
},
|
|
598
702
|
emits: ["success", "error"],
|
|
599
703
|
setup(e, { emit: n }) {
|
|
600
|
-
const t = e, { t: r } =
|
|
601
|
-
}), a =
|
|
704
|
+
const t = e, { t: r } = At("en-us", Zr), o = t.notify || vr(Qr, () => {
|
|
705
|
+
}), a = S(() => t.idTooltip ? {
|
|
602
706
|
label: t.idTooltip,
|
|
603
707
|
positionFixed: !0,
|
|
604
708
|
placement: "bottomStart"
|
|
605
709
|
} : {
|
|
606
710
|
title: t.uuid
|
|
607
|
-
}), i =
|
|
711
|
+
}), i = S(() => !!(t.tooltip && t.successTooltip)), s = M(t.tooltip), l = S(() => t.tooltip ? {
|
|
608
712
|
label: s.value,
|
|
609
713
|
positionFixed: !0,
|
|
610
714
|
maxWidth: "500px",
|
|
611
715
|
placement: "bottomStart"
|
|
612
|
-
} : {}), u =
|
|
716
|
+
} : {}), u = S(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), d = (m) => {
|
|
613
717
|
s.value = m, setTimeout(() => {
|
|
614
718
|
s.value = t.tooltip;
|
|
615
719
|
}, 1800);
|
|
@@ -621,46 +725,45 @@ const ce = {
|
|
|
621
725
|
}), i.value ? d(r("message.fail")) : n("error", t.uuid);
|
|
622
726
|
return;
|
|
623
727
|
}
|
|
624
|
-
const g = t.uuid.length >
|
|
728
|
+
const g = t.uuid.length > Ht, k = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${t.uuid.substring(0, Ht) + (g ? "..." : "")}"`;
|
|
625
729
|
typeof o == "function" && o({
|
|
626
730
|
type: "success",
|
|
627
731
|
message: `${k}${r("message.success.content")}`
|
|
628
732
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
629
733
|
};
|
|
630
734
|
return (m, g) => {
|
|
631
|
-
const k =
|
|
632
|
-
return f(),
|
|
633
|
-
e.format !== "hidden" ? (f(),
|
|
735
|
+
const k = q("KClipboardProvider");
|
|
736
|
+
return f(), x("div", so, [
|
|
737
|
+
e.format !== "hidden" ? (f(), U(Ue(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
634
738
|
default: v(() => [
|
|
635
|
-
|
|
739
|
+
P("div", {
|
|
636
740
|
class: Fe([
|
|
637
741
|
"uuid-container",
|
|
638
742
|
e.truncated ? "truncated-uuid" : null,
|
|
639
743
|
e.useMono ? "mono" : null
|
|
640
744
|
])
|
|
641
|
-
},
|
|
745
|
+
}, O(u.value), 3)
|
|
642
746
|
]),
|
|
643
747
|
_: 1
|
|
644
748
|
}, 16)) : G("", !0),
|
|
645
|
-
(f(),
|
|
749
|
+
(f(), U(Ue(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
646
750
|
default: v(() => [
|
|
647
|
-
|
|
648
|
-
default: v(({ copyToClipboard:
|
|
649
|
-
|
|
751
|
+
N(k, null, {
|
|
752
|
+
default: v(({ copyToClipboard: _ }) => [
|
|
753
|
+
P("span", {
|
|
650
754
|
"data-testid": "copy-to-clipboard",
|
|
651
755
|
role: "button",
|
|
652
756
|
tabindex: "0",
|
|
653
|
-
onClick: rt((
|
|
757
|
+
onClick: rt((p) => c(_), ["stop"])
|
|
654
758
|
}, [
|
|
655
|
-
|
|
759
|
+
N(y(ao), {
|
|
656
760
|
class: "uuid-icon",
|
|
657
761
|
color: e.iconColor,
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
], 8, Qr)
|
|
762
|
+
decorative: !!e.tooltip,
|
|
763
|
+
size: y(io),
|
|
764
|
+
title: y(r)("iconTitle")
|
|
765
|
+
}, null, 8, ["color", "decorative", "size", "title"])
|
|
766
|
+
], 8, lo)
|
|
664
767
|
]),
|
|
665
768
|
_: 1
|
|
666
769
|
})
|
|
@@ -670,15 +773,15 @@ const ce = {
|
|
|
670
773
|
]);
|
|
671
774
|
};
|
|
672
775
|
}
|
|
673
|
-
}),
|
|
776
|
+
}), co = (e, n) => {
|
|
674
777
|
const t = e.__vccOpts || e;
|
|
675
778
|
for (const [r, o] of n)
|
|
676
779
|
t[r] = o;
|
|
677
780
|
return t;
|
|
678
|
-
},
|
|
781
|
+
}, Cn = /* @__PURE__ */ co(uo, [["__scopeId", "data-v-3550f830"]]), po = {
|
|
679
782
|
key: 0,
|
|
680
783
|
class: "config-card-fieldset-title"
|
|
681
|
-
},
|
|
784
|
+
}, fo = /* @__PURE__ */ oe({
|
|
682
785
|
__name: "JsonCardItem",
|
|
683
786
|
props: {
|
|
684
787
|
item: {
|
|
@@ -695,25 +798,25 @@ const ce = {
|
|
|
695
798
|
}
|
|
696
799
|
},
|
|
697
800
|
setup(e) {
|
|
698
|
-
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), o =
|
|
801
|
+
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), o = S(() => n.item.key ?? "json-array-item"), a = S(() => n.item.value ?? n.item), i = S(() => {
|
|
699
802
|
const l = JSON.parse(JSON.stringify(a.value));
|
|
700
803
|
return n.isArrayItem && delete l.name, l;
|
|
701
|
-
}), s =
|
|
804
|
+
}), s = S(() => {
|
|
702
805
|
var l;
|
|
703
806
|
return n.isArrayItem ? (l = a.value) != null && l.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
704
807
|
});
|
|
705
|
-
return (l, u) => (f(),
|
|
808
|
+
return (l, u) => (f(), U(Ue(e.isArrayItem ? "fieldset" : "div"), {
|
|
706
809
|
class: Fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
707
810
|
}, {
|
|
708
811
|
default: v(() => [
|
|
709
|
-
e.isArrayItem ? (f(),
|
|
710
|
-
|
|
812
|
+
e.isArrayItem ? (f(), x("legend", po, [
|
|
813
|
+
P("b", null, O(s.value), 1)
|
|
711
814
|
])) : G("", !0),
|
|
712
|
-
(f(!0),
|
|
815
|
+
(f(!0), x(ve, null, ye(Object.keys(i.value), (d, c) => (f(), U(xt, {
|
|
713
816
|
key: `${o.value}-property-${c}`,
|
|
714
817
|
item: {
|
|
715
818
|
key: d,
|
|
716
|
-
label:
|
|
819
|
+
label: y(r)(d),
|
|
717
820
|
value: i.value[d]
|
|
718
821
|
}
|
|
719
822
|
}, null, 8, ["item"]))), 128))
|
|
@@ -726,7 +829,7 @@ const ce = {
|
|
|
726
829
|
for (const [r, o] of n)
|
|
727
830
|
t[r] = o;
|
|
728
831
|
return t;
|
|
729
|
-
},
|
|
832
|
+
}, kn = /* @__PURE__ */ ke(fo, [["__scopeId", "data-v-68ca83ec"]]), mo = /* @__PURE__ */ oe({
|
|
730
833
|
__name: "InternalLinkItem",
|
|
731
834
|
props: {
|
|
732
835
|
item: {
|
|
@@ -738,22 +841,22 @@ const ce = {
|
|
|
738
841
|
setup(e) {
|
|
739
842
|
const { i18n: { t: n } } = ce.useI18n();
|
|
740
843
|
return (t, r) => {
|
|
741
|
-
const o =
|
|
742
|
-
return f(),
|
|
743
|
-
|
|
744
|
-
appearance: "
|
|
844
|
+
const o = q("KButton");
|
|
845
|
+
return f(), x("div", null, [
|
|
846
|
+
N(o, {
|
|
847
|
+
appearance: "tertiary",
|
|
745
848
|
class: "navigation-button",
|
|
746
849
|
onClick: r[0] || (r[0] = (a) => t.$emit("navigation-click", e.item))
|
|
747
850
|
}, {
|
|
748
851
|
default: v(() => [
|
|
749
|
-
Q(
|
|
852
|
+
Q(O(e.item.value || y(n)("baseConfigCard.commonFields.link")), 1)
|
|
750
853
|
]),
|
|
751
854
|
_: 1
|
|
752
855
|
})
|
|
753
856
|
]);
|
|
754
857
|
};
|
|
755
858
|
}
|
|
756
|
-
}),
|
|
859
|
+
}), go = /* @__PURE__ */ ke(mo, [["__scopeId", "data-v-c96811e5"]]), yo = /* @__PURE__ */ oe({
|
|
757
860
|
__name: "StatusBadge",
|
|
758
861
|
props: {
|
|
759
862
|
status: {
|
|
@@ -764,22 +867,22 @@ const ce = {
|
|
|
764
867
|
setup(e) {
|
|
765
868
|
const { i18n: { t: n } } = ce.useI18n();
|
|
766
869
|
return (t, r) => {
|
|
767
|
-
const o =
|
|
768
|
-
return f(),
|
|
870
|
+
const o = q("KBadge");
|
|
871
|
+
return f(), U(o, {
|
|
769
872
|
appearance: e.status ? "success" : "neutral"
|
|
770
873
|
}, {
|
|
771
874
|
default: v(() => [
|
|
772
|
-
Q(
|
|
875
|
+
Q(O(e.status ? y(n)("baseConfigCard.statusBadge.enabledLabel") : y(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
773
876
|
]),
|
|
774
877
|
_: 1
|
|
775
878
|
}, 8, ["appearance"]);
|
|
776
879
|
};
|
|
777
880
|
}
|
|
778
|
-
}),
|
|
881
|
+
}), ho = "#0044f4", vo = "#e0e4ea", bo = "#3a3f51", Co = "1px", ko = "20px", _o = { class: "config-card-details-row" }, wo = ["data-testid"], Ao = ["data-testid"], Io = ["data-testid"], So = ["data-testid"], xo = { key: 1 }, To = ["data-testid"], $o = ["data-testid"], jo = ["data-testid"], Mo = ["data-testid"], Eo = {
|
|
779
882
|
name: "ConfigCardItem",
|
|
780
|
-
components: { CopyUuid:
|
|
781
|
-
},
|
|
782
|
-
...
|
|
883
|
+
components: { CopyUuid: Cn, JsonCardItem: kn, StatusBadge: yo, InternalLinkItem: go }
|
|
884
|
+
}, Oo = /* @__PURE__ */ oe({
|
|
885
|
+
...Eo,
|
|
783
886
|
props: {
|
|
784
887
|
item: {
|
|
785
888
|
type: Object,
|
|
@@ -799,13 +902,13 @@ const ce = {
|
|
|
799
902
|
emits: ["navigation-click"],
|
|
800
903
|
setup(e, { emit: n }) {
|
|
801
904
|
const t = e;
|
|
802
|
-
|
|
803
|
-
"1df60db4": u.value ? "none" : `solid ${
|
|
905
|
+
fr((g) => ({
|
|
906
|
+
"1df60db4": u.value ? "none" : `solid ${y(Co)} ${y(vo)}`,
|
|
804
907
|
"21d1d34e": l.value && i.value ? "block" : "flex",
|
|
805
908
|
"4d3dc7e7": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
806
909
|
"4d400dc2": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
807
910
|
}));
|
|
808
|
-
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } = ce.useI18n(), i =
|
|
911
|
+
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } = ce.useI18n(), i = S(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = S(() => !!(t.item.tooltip || r["label-tooltip"])), l = S(() => t.item.type === ne.Json || t.item.type === ne.JsonArray), u = S(() => t.item.type === ne.JsonArray), d = S(() => {
|
|
809
912
|
switch (t.item.type) {
|
|
810
913
|
case ne.ID:
|
|
811
914
|
return {
|
|
@@ -933,173 +1036,173 @@ const ce = {
|
|
|
933
1036
|
}
|
|
934
1037
|
}), c = M(), { isTruncated: m } = ce.useTruncationDetector(c);
|
|
935
1038
|
return (g, k) => {
|
|
936
|
-
const _ =
|
|
937
|
-
return f(),
|
|
938
|
-
|
|
1039
|
+
const _ = q("KLabel"), p = q("KBadge"), A = q("KMethodBadge"), h = q("KTooltip");
|
|
1040
|
+
return f(), x("div", _o, [
|
|
1041
|
+
P("div", {
|
|
939
1042
|
class: "config-card-details-label",
|
|
940
1043
|
"data-testid": `${e.item.key}-label`
|
|
941
1044
|
}, [
|
|
942
1045
|
Z(g.$slots, "label", { item: e.item }, () => [
|
|
943
|
-
|
|
1046
|
+
N(_, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
944
1047
|
default: v(() => [
|
|
945
|
-
Q(
|
|
1048
|
+
Q(O(e.item.label) + " ", 1)
|
|
946
1049
|
]),
|
|
947
1050
|
_: 2
|
|
948
1051
|
}, [
|
|
949
1052
|
s.value ? {
|
|
950
1053
|
name: "tooltip",
|
|
951
1054
|
fn: v(() => [
|
|
952
|
-
|
|
1055
|
+
P("div", {
|
|
953
1056
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
954
1057
|
}, [
|
|
955
1058
|
Z(g.$slots, "label-tooltip", {}, () => [
|
|
956
|
-
Q(
|
|
1059
|
+
Q(O(e.item.tooltip), 1)
|
|
957
1060
|
], !0)
|
|
958
|
-
], 8,
|
|
1061
|
+
], 8, Ao)
|
|
959
1062
|
]),
|
|
960
1063
|
key: "0"
|
|
961
1064
|
} : void 0
|
|
962
1065
|
]), 1024)
|
|
963
1066
|
], !0)
|
|
964
|
-
], 8,
|
|
965
|
-
|
|
1067
|
+
], 8, wo),
|
|
1068
|
+
P("div", {
|
|
966
1069
|
class: "config-card-details-value",
|
|
967
1070
|
"data-testid": `${e.item.key}-property-value`
|
|
968
1071
|
}, [
|
|
969
1072
|
Z(g.$slots, e.item.key, {
|
|
970
1073
|
rowValue: e.item.value
|
|
971
1074
|
}, () => [
|
|
972
|
-
i.value ? (f(),
|
|
973
|
-
(f(),
|
|
1075
|
+
i.value ? (f(), x("div", xo, [
|
|
1076
|
+
(f(), U(Ue(d.value.tag), mr(gr(d.value.attrs)), {
|
|
974
1077
|
default: v(() => [
|
|
975
|
-
d.value.additionalComponent === "KBadge" ? (f(),
|
|
1078
|
+
d.value.additionalComponent === "KBadge" ? (f(), x("div", {
|
|
976
1079
|
key: 0,
|
|
977
1080
|
"data-testid": `${e.item.key}-badge-tags`
|
|
978
1081
|
}, [
|
|
979
|
-
(f(!0),
|
|
980
|
-
key: `${e.item.key}-badge-tag-${
|
|
1082
|
+
(f(!0), x(ve, null, ye(e.item.value, (b, F) => (f(), U(p, {
|
|
1083
|
+
key: `${e.item.key}-badge-tag-${F}`,
|
|
981
1084
|
class: "config-badge",
|
|
982
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1085
|
+
"data-testid": `${e.item.key}-badge-tag-${F}`,
|
|
983
1086
|
"truncation-tooltip": b
|
|
984
1087
|
}, {
|
|
985
1088
|
default: v(() => [
|
|
986
|
-
Q(
|
|
1089
|
+
Q(O(b), 1)
|
|
987
1090
|
]),
|
|
988
1091
|
_: 2
|
|
989
1092
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
990
|
-
], 8,
|
|
991
|
-
d.value.additionalComponent === "CopyUuid" ? (f(),
|
|
1093
|
+
], 8, To)) : G("", !0),
|
|
1094
|
+
d.value.additionalComponent === "CopyUuid" ? (f(), x("div", {
|
|
992
1095
|
key: 1,
|
|
993
1096
|
class: "copy-uuid-array",
|
|
994
1097
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
995
1098
|
}, [
|
|
996
|
-
(f(!0),
|
|
997
|
-
key: `${e.item.key}-copy-uuid-${
|
|
998
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1099
|
+
(f(!0), x(ve, null, ye(e.item.value, (b, F) => (f(), U(y(Cn), ht(d.value.childAttrs, {
|
|
1100
|
+
key: `${e.item.key}-copy-uuid-${F}`,
|
|
1101
|
+
"data-testid": `${e.item.key}-copy-uuid-${F}`,
|
|
999
1102
|
uuid: b
|
|
1000
1103
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1001
|
-
], 8,
|
|
1104
|
+
], 8, $o)) : d.value.additionalComponent === "KMethodBadge" ? (f(), x("div", {
|
|
1002
1105
|
key: 2,
|
|
1003
1106
|
class: "method-badge-array",
|
|
1004
1107
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1005
1108
|
}, [
|
|
1006
|
-
(f(!0),
|
|
1007
|
-
key: `${e.item.key}-badge-method-${
|
|
1109
|
+
(f(!0), x(ve, null, ye(e.item.value, (b, F) => (f(), U(A, {
|
|
1110
|
+
key: `${e.item.key}-badge-method-${F}`,
|
|
1008
1111
|
class: "config-badge",
|
|
1009
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1112
|
+
"data-testid": `${e.item.key}-badge-method-${F}`,
|
|
1010
1113
|
"is-rounded": "",
|
|
1011
1114
|
label: b,
|
|
1012
|
-
method:
|
|
1115
|
+
method: y(Cr).includes(b.toLowerCase()) ? b.toLowerCase() : "custom"
|
|
1013
1116
|
}, {
|
|
1014
1117
|
default: v(() => [
|
|
1015
|
-
Q(
|
|
1118
|
+
Q(O(b), 1)
|
|
1016
1119
|
]),
|
|
1017
1120
|
_: 2
|
|
1018
1121
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1019
|
-
], 8,
|
|
1020
|
-
d.value.additionalComponent === "JsonCardItem" ? (f(),
|
|
1122
|
+
], 8, jo)) : G("", !0),
|
|
1123
|
+
d.value.additionalComponent === "JsonCardItem" ? (f(), x("div", {
|
|
1021
1124
|
key: 3,
|
|
1022
1125
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1023
1126
|
}, [
|
|
1024
|
-
(f(!0),
|
|
1025
|
-
key: `json-array-item-${
|
|
1026
|
-
index:
|
|
1127
|
+
(f(!0), x(ve, null, ye(e.item.value, (b, F) => (f(), U(kn, {
|
|
1128
|
+
key: `json-array-item-${F}`,
|
|
1129
|
+
index: F,
|
|
1027
1130
|
"is-array-item": "",
|
|
1028
1131
|
item: b
|
|
1029
1132
|
}, null, 8, ["index", "item"]))), 128))
|
|
1030
|
-
], 8,
|
|
1133
|
+
], 8, Mo)) : (f(), U(h, {
|
|
1031
1134
|
key: 4,
|
|
1032
|
-
label:
|
|
1135
|
+
label: y(m) ? e.item.value : ""
|
|
1033
1136
|
}, {
|
|
1034
1137
|
default: v(() => [
|
|
1035
|
-
|
|
1138
|
+
P("span", {
|
|
1036
1139
|
ref_key: "textContent",
|
|
1037
1140
|
ref: c,
|
|
1038
1141
|
class: Fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1039
|
-
},
|
|
1142
|
+
}, O(d.value.text), 3)
|
|
1040
1143
|
]),
|
|
1041
1144
|
_: 1
|
|
1042
1145
|
}, 8, ["label"]))
|
|
1043
1146
|
]),
|
|
1044
1147
|
_: 1
|
|
1045
1148
|
}, 16))
|
|
1046
|
-
])) : (f(),
|
|
1149
|
+
])) : (f(), x("div", {
|
|
1047
1150
|
key: 0,
|
|
1048
1151
|
"data-testid": `${e.item.key}-no-value`
|
|
1049
|
-
}, " – ", 8,
|
|
1152
|
+
}, " – ", 8, So))
|
|
1050
1153
|
], !0)
|
|
1051
|
-
], 8,
|
|
1154
|
+
], 8, Io)
|
|
1052
1155
|
]);
|
|
1053
1156
|
};
|
|
1054
1157
|
}
|
|
1055
|
-
}), xt = /* @__PURE__ */ ke(
|
|
1158
|
+
}), xt = /* @__PURE__ */ ke(Oo, [["__scopeId", "data-v-307ab96d"]]);
|
|
1056
1159
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1057
|
-
function
|
|
1160
|
+
function _n(e) {
|
|
1058
1161
|
return typeof e > "u" || e === null;
|
|
1059
1162
|
}
|
|
1060
|
-
function
|
|
1163
|
+
function No(e) {
|
|
1061
1164
|
return typeof e == "object" && e !== null;
|
|
1062
1165
|
}
|
|
1063
|
-
function
|
|
1064
|
-
return Array.isArray(e) ? e :
|
|
1166
|
+
function Fo(e) {
|
|
1167
|
+
return Array.isArray(e) ? e : _n(e) ? [] : [e];
|
|
1065
1168
|
}
|
|
1066
|
-
function
|
|
1169
|
+
function Bo(e, n) {
|
|
1067
1170
|
var t, r, o, a;
|
|
1068
1171
|
if (n)
|
|
1069
1172
|
for (a = Object.keys(n), t = 0, r = a.length; t < r; t += 1)
|
|
1070
1173
|
o = a[t], e[o] = n[o];
|
|
1071
1174
|
return e;
|
|
1072
1175
|
}
|
|
1073
|
-
function
|
|
1176
|
+
function Ko(e, n) {
|
|
1074
1177
|
var t = "", r;
|
|
1075
1178
|
for (r = 0; r < n; r += 1)
|
|
1076
1179
|
t += e;
|
|
1077
1180
|
return t;
|
|
1078
1181
|
}
|
|
1079
|
-
function
|
|
1182
|
+
function qo(e) {
|
|
1080
1183
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1081
1184
|
}
|
|
1082
|
-
var
|
|
1083
|
-
isNothing:
|
|
1084
|
-
isObject:
|
|
1085
|
-
toArray:
|
|
1086
|
-
repeat:
|
|
1087
|
-
isNegativeZero:
|
|
1088
|
-
extend:
|
|
1185
|
+
var Lo = _n, Po = No, Vo = Fo, Uo = Ko, Do = qo, Ro = Bo, le = {
|
|
1186
|
+
isNothing: Lo,
|
|
1187
|
+
isObject: Po,
|
|
1188
|
+
toArray: Vo,
|
|
1189
|
+
repeat: Uo,
|
|
1190
|
+
isNegativeZero: Do,
|
|
1191
|
+
extend: Ro
|
|
1089
1192
|
};
|
|
1090
|
-
function
|
|
1193
|
+
function wn(e, n) {
|
|
1091
1194
|
var t = "", r = e.reason || "(unknown reason)";
|
|
1092
1195
|
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (t += `
|
|
1093
1196
|
|
|
1094
1197
|
` + e.mark.snippet), r + " " + t) : r;
|
|
1095
1198
|
}
|
|
1096
1199
|
function Ye(e, n) {
|
|
1097
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message =
|
|
1200
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = wn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1098
1201
|
}
|
|
1099
1202
|
Ye.prototype = Object.create(Error.prototype);
|
|
1100
1203
|
Ye.prototype.constructor = Ye;
|
|
1101
1204
|
Ye.prototype.toString = function(e) {
|
|
1102
|
-
return this.name + ": " +
|
|
1205
|
+
return this.name + ": " + wn(this, e);
|
|
1103
1206
|
};
|
|
1104
1207
|
var me = Ye;
|
|
1105
1208
|
function mt(e, n, t, r, o) {
|
|
@@ -1113,7 +1216,7 @@ function mt(e, n, t, r, o) {
|
|
|
1113
1216
|
function gt(e, n) {
|
|
1114
1217
|
return le.repeat(" ", n - e.length) + e;
|
|
1115
1218
|
}
|
|
1116
|
-
function
|
|
1219
|
+
function Go(e, n) {
|
|
1117
1220
|
if (n = Object.create(n || null), !e.buffer)
|
|
1118
1221
|
return null;
|
|
1119
1222
|
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
@@ -1143,7 +1246,7 @@ function Fo(e, n) {
|
|
|
1143
1246
|
`;
|
|
1144
1247
|
return s.replace(/\n$/, "");
|
|
1145
1248
|
}
|
|
1146
|
-
var
|
|
1249
|
+
var Ho = Go, zo = [
|
|
1147
1250
|
"kind",
|
|
1148
1251
|
"multi",
|
|
1149
1252
|
"resolve",
|
|
@@ -1154,12 +1257,12 @@ var Ko = Fo, No = [
|
|
|
1154
1257
|
"representName",
|
|
1155
1258
|
"defaultStyle",
|
|
1156
1259
|
"styleAliases"
|
|
1157
|
-
],
|
|
1260
|
+
], Yo = [
|
|
1158
1261
|
"scalar",
|
|
1159
1262
|
"sequence",
|
|
1160
1263
|
"mapping"
|
|
1161
1264
|
];
|
|
1162
|
-
function
|
|
1265
|
+
function Jo(e) {
|
|
1163
1266
|
var n = {};
|
|
1164
1267
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1165
1268
|
e[t].forEach(function(r) {
|
|
@@ -1167,19 +1270,19 @@ function Po(e) {
|
|
|
1167
1270
|
});
|
|
1168
1271
|
}), n;
|
|
1169
1272
|
}
|
|
1170
|
-
function
|
|
1273
|
+
function Wo(e, n) {
|
|
1171
1274
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1172
|
-
if (
|
|
1275
|
+
if (zo.indexOf(t) === -1)
|
|
1173
1276
|
throw new me('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1174
1277
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1175
1278
|
return !0;
|
|
1176
1279
|
}, this.construct = n.construct || function(t) {
|
|
1177
1280
|
return t;
|
|
1178
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases =
|
|
1281
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Jo(n.styleAliases || null), Yo.indexOf(this.kind) === -1)
|
|
1179
1282
|
throw new me('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1180
1283
|
}
|
|
1181
|
-
var pe =
|
|
1182
|
-
function
|
|
1284
|
+
var pe = Wo;
|
|
1285
|
+
function zt(e, n) {
|
|
1183
1286
|
var t = [];
|
|
1184
1287
|
return e[n].forEach(function(r) {
|
|
1185
1288
|
var o = t.length;
|
|
@@ -1188,7 +1291,7 @@ function Ht(e, n) {
|
|
|
1188
1291
|
}), t[o] = r;
|
|
1189
1292
|
}), t;
|
|
1190
1293
|
}
|
|
1191
|
-
function
|
|
1294
|
+
function Zo() {
|
|
1192
1295
|
var e = {
|
|
1193
1296
|
scalar: {},
|
|
1194
1297
|
sequence: {},
|
|
@@ -1233,47 +1336,47 @@ vt.prototype.extend = function(e) {
|
|
|
1233
1336
|
throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1234
1337
|
});
|
|
1235
1338
|
var r = Object.create(vt.prototype);
|
|
1236
|
-
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit =
|
|
1339
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = zt(r, "implicit"), r.compiledExplicit = zt(r, "explicit"), r.compiledTypeMap = Zo(r.compiledImplicit, r.compiledExplicit), r;
|
|
1237
1340
|
};
|
|
1238
|
-
var
|
|
1341
|
+
var An = vt, In = new pe("tag:yaml.org,2002:str", {
|
|
1239
1342
|
kind: "scalar",
|
|
1240
1343
|
construct: function(e) {
|
|
1241
1344
|
return e !== null ? e : "";
|
|
1242
1345
|
}
|
|
1243
|
-
}),
|
|
1346
|
+
}), Sn = new pe("tag:yaml.org,2002:seq", {
|
|
1244
1347
|
kind: "sequence",
|
|
1245
1348
|
construct: function(e) {
|
|
1246
1349
|
return e !== null ? e : [];
|
|
1247
1350
|
}
|
|
1248
|
-
}),
|
|
1351
|
+
}), xn = new pe("tag:yaml.org,2002:map", {
|
|
1249
1352
|
kind: "mapping",
|
|
1250
1353
|
construct: function(e) {
|
|
1251
1354
|
return e !== null ? e : {};
|
|
1252
1355
|
}
|
|
1253
|
-
}),
|
|
1356
|
+
}), Tn = new An({
|
|
1254
1357
|
explicit: [
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1358
|
+
In,
|
|
1359
|
+
Sn,
|
|
1360
|
+
xn
|
|
1258
1361
|
]
|
|
1259
1362
|
});
|
|
1260
|
-
function
|
|
1363
|
+
function Qo(e) {
|
|
1261
1364
|
if (e === null)
|
|
1262
1365
|
return !0;
|
|
1263
1366
|
var n = e.length;
|
|
1264
1367
|
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1265
1368
|
}
|
|
1266
|
-
function
|
|
1369
|
+
function Xo() {
|
|
1267
1370
|
return null;
|
|
1268
1371
|
}
|
|
1269
|
-
function
|
|
1372
|
+
function ea(e) {
|
|
1270
1373
|
return e === null;
|
|
1271
1374
|
}
|
|
1272
|
-
var
|
|
1375
|
+
var $n = new pe("tag:yaml.org,2002:null", {
|
|
1273
1376
|
kind: "scalar",
|
|
1274
|
-
resolve:
|
|
1275
|
-
construct:
|
|
1276
|
-
predicate:
|
|
1377
|
+
resolve: Qo,
|
|
1378
|
+
construct: Xo,
|
|
1379
|
+
predicate: ea,
|
|
1277
1380
|
represent: {
|
|
1278
1381
|
canonical: function() {
|
|
1279
1382
|
return "~";
|
|
@@ -1293,23 +1396,23 @@ var In = new pe("tag:yaml.org,2002:null", {
|
|
|
1293
1396
|
},
|
|
1294
1397
|
defaultStyle: "lowercase"
|
|
1295
1398
|
});
|
|
1296
|
-
function
|
|
1399
|
+
function ta(e) {
|
|
1297
1400
|
if (e === null)
|
|
1298
1401
|
return !1;
|
|
1299
1402
|
var n = e.length;
|
|
1300
1403
|
return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1301
1404
|
}
|
|
1302
|
-
function
|
|
1405
|
+
function na(e) {
|
|
1303
1406
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1304
1407
|
}
|
|
1305
|
-
function
|
|
1408
|
+
function ra(e) {
|
|
1306
1409
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1307
1410
|
}
|
|
1308
|
-
var
|
|
1411
|
+
var jn = new pe("tag:yaml.org,2002:bool", {
|
|
1309
1412
|
kind: "scalar",
|
|
1310
|
-
resolve:
|
|
1311
|
-
construct:
|
|
1312
|
-
predicate:
|
|
1413
|
+
resolve: ta,
|
|
1414
|
+
construct: na,
|
|
1415
|
+
predicate: ra,
|
|
1313
1416
|
represent: {
|
|
1314
1417
|
lowercase: function(e) {
|
|
1315
1418
|
return e ? "true" : "false";
|
|
@@ -1323,16 +1426,16 @@ var An = new pe("tag:yaml.org,2002:bool", {
|
|
|
1323
1426
|
},
|
|
1324
1427
|
defaultStyle: "lowercase"
|
|
1325
1428
|
});
|
|
1326
|
-
function
|
|
1429
|
+
function oa(e) {
|
|
1327
1430
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1328
1431
|
}
|
|
1329
|
-
function
|
|
1432
|
+
function aa(e) {
|
|
1330
1433
|
return 48 <= e && e <= 55;
|
|
1331
1434
|
}
|
|
1332
|
-
function
|
|
1435
|
+
function ia(e) {
|
|
1333
1436
|
return 48 <= e && e <= 57;
|
|
1334
1437
|
}
|
|
1335
|
-
function
|
|
1438
|
+
function sa(e) {
|
|
1336
1439
|
if (e === null)
|
|
1337
1440
|
return !1;
|
|
1338
1441
|
var n = e.length, t = 0, r = !1, o;
|
|
@@ -1353,7 +1456,7 @@ function Zo(e) {
|
|
|
1353
1456
|
if (o === "x") {
|
|
1354
1457
|
for (t++; t < n; t++)
|
|
1355
1458
|
if (o = e[t], o !== "_") {
|
|
1356
|
-
if (!
|
|
1459
|
+
if (!oa(e.charCodeAt(t)))
|
|
1357
1460
|
return !1;
|
|
1358
1461
|
r = !0;
|
|
1359
1462
|
}
|
|
@@ -1362,7 +1465,7 @@ function Zo(e) {
|
|
|
1362
1465
|
if (o === "o") {
|
|
1363
1466
|
for (t++; t < n; t++)
|
|
1364
1467
|
if (o = e[t], o !== "_") {
|
|
1365
|
-
if (!
|
|
1468
|
+
if (!aa(e.charCodeAt(t)))
|
|
1366
1469
|
return !1;
|
|
1367
1470
|
r = !0;
|
|
1368
1471
|
}
|
|
@@ -1373,13 +1476,13 @@ function Zo(e) {
|
|
|
1373
1476
|
return !1;
|
|
1374
1477
|
for (; t < n; t++)
|
|
1375
1478
|
if (o = e[t], o !== "_") {
|
|
1376
|
-
if (!
|
|
1479
|
+
if (!ia(e.charCodeAt(t)))
|
|
1377
1480
|
return !1;
|
|
1378
1481
|
r = !0;
|
|
1379
1482
|
}
|
|
1380
1483
|
return !(!r || o === "_");
|
|
1381
1484
|
}
|
|
1382
|
-
function
|
|
1485
|
+
function la(e) {
|
|
1383
1486
|
var n = e, t = 1, r;
|
|
1384
1487
|
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), r = n[0], (r === "-" || r === "+") && (r === "-" && (t = -1), n = n.slice(1), r = n[0]), n === "0")
|
|
1385
1488
|
return 0;
|
|
@@ -1393,14 +1496,14 @@ function Qo(e) {
|
|
|
1393
1496
|
}
|
|
1394
1497
|
return t * parseInt(n, 10);
|
|
1395
1498
|
}
|
|
1396
|
-
function
|
|
1499
|
+
function ua(e) {
|
|
1397
1500
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !le.isNegativeZero(e);
|
|
1398
1501
|
}
|
|
1399
|
-
var
|
|
1502
|
+
var Mn = new pe("tag:yaml.org,2002:int", {
|
|
1400
1503
|
kind: "scalar",
|
|
1401
|
-
resolve:
|
|
1402
|
-
construct:
|
|
1403
|
-
predicate:
|
|
1504
|
+
resolve: sa,
|
|
1505
|
+
construct: la,
|
|
1506
|
+
predicate: ua,
|
|
1404
1507
|
represent: {
|
|
1405
1508
|
binary: function(e) {
|
|
1406
1509
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1423,21 +1526,21 @@ var Sn = new pe("tag:yaml.org,2002:int", {
|
|
|
1423
1526
|
decimal: [10, "dec"],
|
|
1424
1527
|
hexadecimal: [16, "hex"]
|
|
1425
1528
|
}
|
|
1426
|
-
}),
|
|
1529
|
+
}), ca = new RegExp(
|
|
1427
1530
|
// 2.5e4, 2.5 and integers
|
|
1428
1531
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1429
1532
|
);
|
|
1430
|
-
function
|
|
1431
|
-
return !(e === null || !
|
|
1533
|
+
function da(e) {
|
|
1534
|
+
return !(e === null || !ca.test(e) || // Quick hack to not allow integers end with `_`
|
|
1432
1535
|
// Probably should update regexp & check speed
|
|
1433
1536
|
e[e.length - 1] === "_");
|
|
1434
1537
|
}
|
|
1435
|
-
function
|
|
1538
|
+
function pa(e) {
|
|
1436
1539
|
var n, t;
|
|
1437
1540
|
return n = e.replace(/_/g, "").toLowerCase(), t = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : t * parseFloat(n, 10);
|
|
1438
1541
|
}
|
|
1439
|
-
var
|
|
1440
|
-
function
|
|
1542
|
+
var fa = /^[-+]?[0-9]+e/;
|
|
1543
|
+
function ma(e, n) {
|
|
1441
1544
|
var t;
|
|
1442
1545
|
if (isNaN(e))
|
|
1443
1546
|
switch (n) {
|
|
@@ -1468,36 +1571,36 @@ function oa(e, n) {
|
|
|
1468
1571
|
}
|
|
1469
1572
|
else if (le.isNegativeZero(e))
|
|
1470
1573
|
return "-0.0";
|
|
1471
|
-
return t = e.toString(10),
|
|
1574
|
+
return t = e.toString(10), fa.test(t) ? t.replace("e", ".e") : t;
|
|
1472
1575
|
}
|
|
1473
|
-
function
|
|
1576
|
+
function ga(e) {
|
|
1474
1577
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || le.isNegativeZero(e));
|
|
1475
1578
|
}
|
|
1476
|
-
var
|
|
1579
|
+
var En = new pe("tag:yaml.org,2002:float", {
|
|
1477
1580
|
kind: "scalar",
|
|
1478
|
-
resolve:
|
|
1479
|
-
construct:
|
|
1480
|
-
predicate:
|
|
1481
|
-
represent:
|
|
1581
|
+
resolve: da,
|
|
1582
|
+
construct: pa,
|
|
1583
|
+
predicate: ga,
|
|
1584
|
+
represent: ma,
|
|
1482
1585
|
defaultStyle: "lowercase"
|
|
1483
|
-
}),
|
|
1586
|
+
}), On = Tn.extend({
|
|
1484
1587
|
implicit: [
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1588
|
+
$n,
|
|
1589
|
+
jn,
|
|
1590
|
+
Mn,
|
|
1591
|
+
En
|
|
1489
1592
|
]
|
|
1490
|
-
}),
|
|
1593
|
+
}), Nn = On, Fn = new RegExp(
|
|
1491
1594
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1492
|
-
),
|
|
1595
|
+
), Bn = new RegExp(
|
|
1493
1596
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1494
1597
|
);
|
|
1495
|
-
function
|
|
1496
|
-
return e === null ? !1 :
|
|
1598
|
+
function ya(e) {
|
|
1599
|
+
return e === null ? !1 : Fn.exec(e) !== null || Bn.exec(e) !== null;
|
|
1497
1600
|
}
|
|
1498
|
-
function
|
|
1601
|
+
function ha(e) {
|
|
1499
1602
|
var n, t, r, o, a, i, s, l = 0, u = null, d, c, m;
|
|
1500
|
-
if (n =
|
|
1603
|
+
if (n = Fn.exec(e), n === null && (n = Bn.exec(e)), n === null)
|
|
1501
1604
|
throw new Error("Date resolve error");
|
|
1502
1605
|
if (t = +n[1], r = +n[2] - 1, o = +n[3], !n[4])
|
|
1503
1606
|
return new Date(Date.UTC(t, r, o));
|
|
@@ -1508,25 +1611,25 @@ function sa(e) {
|
|
|
1508
1611
|
}
|
|
1509
1612
|
return n[9] && (d = +n[10], c = +(n[11] || 0), u = (d * 60 + c) * 6e4, n[9] === "-" && (u = -u)), m = new Date(Date.UTC(t, r, o, a, i, s, l)), u && m.setTime(m.getTime() - u), m;
|
|
1510
1613
|
}
|
|
1511
|
-
function
|
|
1614
|
+
function va(e) {
|
|
1512
1615
|
return e.toISOString();
|
|
1513
1616
|
}
|
|
1514
|
-
var
|
|
1617
|
+
var Kn = new pe("tag:yaml.org,2002:timestamp", {
|
|
1515
1618
|
kind: "scalar",
|
|
1516
|
-
resolve:
|
|
1517
|
-
construct:
|
|
1619
|
+
resolve: ya,
|
|
1620
|
+
construct: ha,
|
|
1518
1621
|
instanceOf: Date,
|
|
1519
|
-
represent:
|
|
1622
|
+
represent: va
|
|
1520
1623
|
});
|
|
1521
|
-
function
|
|
1624
|
+
function ba(e) {
|
|
1522
1625
|
return e === "<<" || e === null;
|
|
1523
1626
|
}
|
|
1524
|
-
var
|
|
1627
|
+
var qn = new pe("tag:yaml.org,2002:merge", {
|
|
1525
1628
|
kind: "scalar",
|
|
1526
|
-
resolve:
|
|
1629
|
+
resolve: ba
|
|
1527
1630
|
}), Tt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1528
1631
|
\r`;
|
|
1529
|
-
function
|
|
1632
|
+
function Ca(e) {
|
|
1530
1633
|
if (e === null)
|
|
1531
1634
|
return !1;
|
|
1532
1635
|
var n, t, r = 0, o = e.length, a = Tt;
|
|
@@ -1538,37 +1641,37 @@ function ca(e) {
|
|
|
1538
1641
|
}
|
|
1539
1642
|
return r % 8 === 0;
|
|
1540
1643
|
}
|
|
1541
|
-
function
|
|
1644
|
+
function ka(e) {
|
|
1542
1645
|
var n, t, r = e.replace(/[\r\n=]/g, ""), o = r.length, a = Tt, i = 0, s = [];
|
|
1543
1646
|
for (n = 0; n < o; n++)
|
|
1544
1647
|
n % 4 === 0 && n && (s.push(i >> 16 & 255), s.push(i >> 8 & 255), s.push(i & 255)), i = i << 6 | a.indexOf(r.charAt(n));
|
|
1545
1648
|
return t = o % 4 * 6, t === 0 ? (s.push(i >> 16 & 255), s.push(i >> 8 & 255), s.push(i & 255)) : t === 18 ? (s.push(i >> 10 & 255), s.push(i >> 2 & 255)) : t === 12 && s.push(i >> 4 & 255), new Uint8Array(s);
|
|
1546
1649
|
}
|
|
1547
|
-
function
|
|
1650
|
+
function _a(e) {
|
|
1548
1651
|
var n = "", t = 0, r, o, a = e.length, i = Tt;
|
|
1549
1652
|
for (r = 0; r < a; r++)
|
|
1550
1653
|
r % 3 === 0 && r && (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]), t = (t << 8) + e[r];
|
|
1551
1654
|
return o = a % 3, o === 0 ? (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]) : o === 2 ? (n += i[t >> 10 & 63], n += i[t >> 4 & 63], n += i[t << 2 & 63], n += i[64]) : o === 1 && (n += i[t >> 2 & 63], n += i[t << 4 & 63], n += i[64], n += i[64]), n;
|
|
1552
1655
|
}
|
|
1553
|
-
function
|
|
1656
|
+
function wa(e) {
|
|
1554
1657
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1555
1658
|
}
|
|
1556
|
-
var
|
|
1659
|
+
var Ln = new pe("tag:yaml.org,2002:binary", {
|
|
1557
1660
|
kind: "scalar",
|
|
1558
|
-
resolve:
|
|
1559
|
-
construct:
|
|
1560
|
-
predicate:
|
|
1561
|
-
represent:
|
|
1562
|
-
}),
|
|
1563
|
-
function
|
|
1661
|
+
resolve: Ca,
|
|
1662
|
+
construct: ka,
|
|
1663
|
+
predicate: wa,
|
|
1664
|
+
represent: _a
|
|
1665
|
+
}), Aa = Object.prototype.hasOwnProperty, Ia = Object.prototype.toString;
|
|
1666
|
+
function Sa(e) {
|
|
1564
1667
|
if (e === null)
|
|
1565
1668
|
return !0;
|
|
1566
1669
|
var n = [], t, r, o, a, i, s = e;
|
|
1567
1670
|
for (t = 0, r = s.length; t < r; t += 1) {
|
|
1568
|
-
if (o = s[t], i = !1,
|
|
1671
|
+
if (o = s[t], i = !1, Ia.call(o) !== "[object Object]")
|
|
1569
1672
|
return !1;
|
|
1570
1673
|
for (a in o)
|
|
1571
|
-
if (
|
|
1674
|
+
if (Aa.call(o, a))
|
|
1572
1675
|
if (!i)
|
|
1573
1676
|
i = !0;
|
|
1574
1677
|
else
|
|
@@ -1582,26 +1685,26 @@ function ya(e) {
|
|
|
1582
1685
|
}
|
|
1583
1686
|
return !0;
|
|
1584
1687
|
}
|
|
1585
|
-
function
|
|
1688
|
+
function xa(e) {
|
|
1586
1689
|
return e !== null ? e : [];
|
|
1587
1690
|
}
|
|
1588
|
-
var
|
|
1691
|
+
var Pn = new pe("tag:yaml.org,2002:omap", {
|
|
1589
1692
|
kind: "sequence",
|
|
1590
|
-
resolve:
|
|
1591
|
-
construct:
|
|
1592
|
-
}),
|
|
1593
|
-
function
|
|
1693
|
+
resolve: Sa,
|
|
1694
|
+
construct: xa
|
|
1695
|
+
}), Ta = Object.prototype.toString;
|
|
1696
|
+
function $a(e) {
|
|
1594
1697
|
if (e === null)
|
|
1595
1698
|
return !0;
|
|
1596
1699
|
var n, t, r, o, a, i = e;
|
|
1597
1700
|
for (a = new Array(i.length), n = 0, t = i.length; n < t; n += 1) {
|
|
1598
|
-
if (r = i[n],
|
|
1701
|
+
if (r = i[n], Ta.call(r) !== "[object Object]" || (o = Object.keys(r), o.length !== 1))
|
|
1599
1702
|
return !1;
|
|
1600
1703
|
a[n] = [o[0], r[o[0]]];
|
|
1601
1704
|
}
|
|
1602
1705
|
return !0;
|
|
1603
1706
|
}
|
|
1604
|
-
function
|
|
1707
|
+
function ja(e) {
|
|
1605
1708
|
if (e === null)
|
|
1606
1709
|
return [];
|
|
1607
1710
|
var n, t, r, o, a, i = e;
|
|
@@ -1609,81 +1712,81 @@ function Ca(e) {
|
|
|
1609
1712
|
r = i[n], o = Object.keys(r), a[n] = [o[0], r[o[0]]];
|
|
1610
1713
|
return a;
|
|
1611
1714
|
}
|
|
1612
|
-
var
|
|
1715
|
+
var Vn = new pe("tag:yaml.org,2002:pairs", {
|
|
1613
1716
|
kind: "sequence",
|
|
1614
|
-
resolve:
|
|
1615
|
-
construct:
|
|
1616
|
-
}),
|
|
1617
|
-
function
|
|
1717
|
+
resolve: $a,
|
|
1718
|
+
construct: ja
|
|
1719
|
+
}), Ma = Object.prototype.hasOwnProperty;
|
|
1720
|
+
function Ea(e) {
|
|
1618
1721
|
if (e === null)
|
|
1619
1722
|
return !0;
|
|
1620
1723
|
var n, t = e;
|
|
1621
1724
|
for (n in t)
|
|
1622
|
-
if (
|
|
1725
|
+
if (Ma.call(t, n) && t[n] !== null)
|
|
1623
1726
|
return !1;
|
|
1624
1727
|
return !0;
|
|
1625
1728
|
}
|
|
1626
|
-
function
|
|
1729
|
+
function Oa(e) {
|
|
1627
1730
|
return e !== null ? e : {};
|
|
1628
1731
|
}
|
|
1629
|
-
var
|
|
1732
|
+
var Un = new pe("tag:yaml.org,2002:set", {
|
|
1630
1733
|
kind: "mapping",
|
|
1631
|
-
resolve:
|
|
1632
|
-
construct:
|
|
1633
|
-
}), $t =
|
|
1734
|
+
resolve: Ea,
|
|
1735
|
+
construct: Oa
|
|
1736
|
+
}), $t = Nn.extend({
|
|
1634
1737
|
implicit: [
|
|
1635
|
-
|
|
1636
|
-
|
|
1738
|
+
Kn,
|
|
1739
|
+
qn
|
|
1637
1740
|
],
|
|
1638
1741
|
explicit: [
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1742
|
+
Ln,
|
|
1743
|
+
Pn,
|
|
1744
|
+
Vn,
|
|
1745
|
+
Un
|
|
1643
1746
|
]
|
|
1644
|
-
}), Me = Object.prototype.hasOwnProperty, ot = 1,
|
|
1645
|
-
function
|
|
1747
|
+
}), Me = Object.prototype.hasOwnProperty, ot = 1, Dn = 2, Rn = 3, at = 4, yt = 1, Na = 2, Yt = 3, Fa = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ba = /[\x85\u2028\u2029]/, Ka = /[,\[\]\{\}]/, Gn = /^(?:!|!!|![a-z\-]+!)$/i, Hn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1748
|
+
function Jt(e) {
|
|
1646
1749
|
return Object.prototype.toString.call(e);
|
|
1647
1750
|
}
|
|
1648
1751
|
function we(e) {
|
|
1649
1752
|
return e === 10 || e === 13;
|
|
1650
1753
|
}
|
|
1651
|
-
function
|
|
1754
|
+
function Ne(e) {
|
|
1652
1755
|
return e === 9 || e === 32;
|
|
1653
1756
|
}
|
|
1654
1757
|
function he(e) {
|
|
1655
1758
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1656
1759
|
}
|
|
1657
|
-
function
|
|
1760
|
+
function Pe(e) {
|
|
1658
1761
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1659
1762
|
}
|
|
1660
|
-
function
|
|
1763
|
+
function qa(e) {
|
|
1661
1764
|
var n;
|
|
1662
1765
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1663
1766
|
}
|
|
1664
|
-
function
|
|
1767
|
+
function La(e) {
|
|
1665
1768
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1666
1769
|
}
|
|
1667
|
-
function
|
|
1770
|
+
function Pa(e) {
|
|
1668
1771
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1669
1772
|
}
|
|
1670
|
-
function
|
|
1773
|
+
function Wt(e) {
|
|
1671
1774
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1672
1775
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1673
1776
|
}
|
|
1674
|
-
function
|
|
1777
|
+
function Va(e) {
|
|
1675
1778
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1676
1779
|
(e - 65536 >> 10) + 55296,
|
|
1677
1780
|
(e - 65536 & 1023) + 56320
|
|
1678
1781
|
);
|
|
1679
1782
|
}
|
|
1680
|
-
var
|
|
1681
|
-
for (var
|
|
1682
|
-
|
|
1683
|
-
function
|
|
1783
|
+
var zn = new Array(256), Yn = new Array(256);
|
|
1784
|
+
for (var qe = 0; qe < 256; qe++)
|
|
1785
|
+
zn[qe] = Wt(qe) ? 1 : 0, Yn[qe] = Wt(qe);
|
|
1786
|
+
function Ua(e, n) {
|
|
1684
1787
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || $t, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1685
1788
|
}
|
|
1686
|
-
function
|
|
1789
|
+
function Jn(e, n) {
|
|
1687
1790
|
var t = {
|
|
1688
1791
|
name: e.filename,
|
|
1689
1792
|
buffer: e.input.slice(0, -1),
|
|
@@ -1692,26 +1795,26 @@ function Dn(e, n) {
|
|
|
1692
1795
|
line: e.line,
|
|
1693
1796
|
column: e.position - e.lineStart
|
|
1694
1797
|
};
|
|
1695
|
-
return t.snippet =
|
|
1798
|
+
return t.snippet = Ho(t), new me(n, t);
|
|
1696
1799
|
}
|
|
1697
|
-
function
|
|
1698
|
-
throw
|
|
1800
|
+
function T(e, n) {
|
|
1801
|
+
throw Jn(e, n);
|
|
1699
1802
|
}
|
|
1700
1803
|
function it(e, n) {
|
|
1701
|
-
e.onWarning && e.onWarning.call(null,
|
|
1804
|
+
e.onWarning && e.onWarning.call(null, Jn(e, n));
|
|
1702
1805
|
}
|
|
1703
|
-
var
|
|
1806
|
+
var Zt = {
|
|
1704
1807
|
YAML: function(e, n, t) {
|
|
1705
1808
|
var r, o, a;
|
|
1706
|
-
e.version !== null &&
|
|
1809
|
+
e.version !== null && T(e, "duplication of %YAML directive"), t.length !== 1 && T(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && T(e, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), a = parseInt(r[2], 10), o !== 1 && T(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && it(e, "unsupported YAML version of the document");
|
|
1707
1810
|
},
|
|
1708
1811
|
TAG: function(e, n, t) {
|
|
1709
1812
|
var r, o;
|
|
1710
|
-
t.length !== 2 &&
|
|
1813
|
+
t.length !== 2 && T(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Gn.test(r) || T(e, "ill-formed tag handle (first argument) of the TAG directive"), Me.call(e.tagMap, r) && T(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Hn.test(o) || T(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1711
1814
|
try {
|
|
1712
1815
|
o = decodeURIComponent(o);
|
|
1713
1816
|
} catch {
|
|
1714
|
-
|
|
1817
|
+
T(e, "tag prefix is malformed: " + o);
|
|
1715
1818
|
}
|
|
1716
1819
|
e.tagMap[r] = o;
|
|
1717
1820
|
}
|
|
@@ -1721,30 +1824,30 @@ function je(e, n, t, r) {
|
|
|
1721
1824
|
if (n < t) {
|
|
1722
1825
|
if (s = e.input.slice(n, t), r)
|
|
1723
1826
|
for (o = 0, a = s.length; o < a; o += 1)
|
|
1724
|
-
i = s.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 ||
|
|
1827
|
+
i = s.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 || T(e, "expected valid JSON character");
|
|
1725
1828
|
else
|
|
1726
|
-
|
|
1829
|
+
Fa.test(s) && T(e, "the stream contains non-printable characters");
|
|
1727
1830
|
e.result += s;
|
|
1728
1831
|
}
|
|
1729
1832
|
}
|
|
1730
|
-
function
|
|
1833
|
+
function Qt(e, n, t, r) {
|
|
1731
1834
|
var o, a, i, s;
|
|
1732
|
-
for (le.isObject(t) ||
|
|
1835
|
+
for (le.isObject(t) || T(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), i = 0, s = o.length; i < s; i += 1)
|
|
1733
1836
|
a = o[i], Me.call(n, a) || (n[a] = t[a], r[a] = !0);
|
|
1734
1837
|
}
|
|
1735
|
-
function
|
|
1838
|
+
function Ve(e, n, t, r, o, a, i, s, l) {
|
|
1736
1839
|
var u, d;
|
|
1737
1840
|
if (Array.isArray(o))
|
|
1738
1841
|
for (o = Array.prototype.slice.call(o), u = 0, d = o.length; u < d; u += 1)
|
|
1739
|
-
Array.isArray(o[u]) &&
|
|
1740
|
-
if (typeof o == "object" &&
|
|
1842
|
+
Array.isArray(o[u]) && T(e, "nested arrays are not supported inside keys"), typeof o == "object" && Jt(o[u]) === "[object Object]" && (o[u] = "[object Object]");
|
|
1843
|
+
if (typeof o == "object" && Jt(o) === "[object Object]" && (o = "[object Object]"), o = String(o), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
1741
1844
|
if (Array.isArray(a))
|
|
1742
1845
|
for (u = 0, d = a.length; u < d; u += 1)
|
|
1743
|
-
|
|
1846
|
+
Qt(e, n, a[u], t);
|
|
1744
1847
|
else
|
|
1745
|
-
|
|
1848
|
+
Qt(e, n, a, t);
|
|
1746
1849
|
else
|
|
1747
|
-
!e.json && !Me.call(t, o) && Me.call(n, o) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position,
|
|
1850
|
+
!e.json && !Me.call(t, o) && Me.call(n, o) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, T(e, "duplicated mapping key")), o === "__proto__" ? Object.defineProperty(n, o, {
|
|
1748
1851
|
configurable: !0,
|
|
1749
1852
|
enumerable: !0,
|
|
1750
1853
|
writable: !0,
|
|
@@ -1754,11 +1857,11 @@ function Ue(e, n, t, r, o, a, i, s, l) {
|
|
|
1754
1857
|
}
|
|
1755
1858
|
function jt(e) {
|
|
1756
1859
|
var n;
|
|
1757
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1860
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : T(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1758
1861
|
}
|
|
1759
|
-
function
|
|
1862
|
+
function ie(e, n, t) {
|
|
1760
1863
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
1761
|
-
for (;
|
|
1864
|
+
for (; Ne(o); )
|
|
1762
1865
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
1763
1866
|
if (n && o === 35)
|
|
1764
1867
|
do
|
|
@@ -1780,22 +1883,22 @@ function Mt(e, n) {
|
|
|
1780
1883
|
n === 1 ? e.result += " " : n > 1 && (e.result += le.repeat(`
|
|
1781
1884
|
`, n - 1));
|
|
1782
1885
|
}
|
|
1783
|
-
function
|
|
1886
|
+
function Da(e, n, t) {
|
|
1784
1887
|
var r, o, a, i, s, l, u, d, c = e.kind, m = e.result, g;
|
|
1785
|
-
if (g = e.input.charCodeAt(e.position), he(g) ||
|
|
1888
|
+
if (g = e.input.charCodeAt(e.position), he(g) || Pe(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (o = e.input.charCodeAt(e.position + 1), he(o) || t && Pe(o)))
|
|
1786
1889
|
return !1;
|
|
1787
1890
|
for (e.kind = "scalar", e.result = "", a = i = e.position, s = !1; g !== 0; ) {
|
|
1788
1891
|
if (g === 58) {
|
|
1789
|
-
if (o = e.input.charCodeAt(e.position + 1), he(o) || t &&
|
|
1892
|
+
if (o = e.input.charCodeAt(e.position + 1), he(o) || t && Pe(o))
|
|
1790
1893
|
break;
|
|
1791
1894
|
} else if (g === 35) {
|
|
1792
1895
|
if (r = e.input.charCodeAt(e.position - 1), he(r))
|
|
1793
1896
|
break;
|
|
1794
1897
|
} else {
|
|
1795
|
-
if (e.position === e.lineStart && dt(e) || t &&
|
|
1898
|
+
if (e.position === e.lineStart && dt(e) || t && Pe(g))
|
|
1796
1899
|
break;
|
|
1797
1900
|
if (we(g))
|
|
1798
|
-
if (l = e.line, u = e.lineStart, d = e.lineIndent,
|
|
1901
|
+
if (l = e.line, u = e.lineStart, d = e.lineIndent, ie(e, !1, -1), e.lineIndent >= n) {
|
|
1799
1902
|
s = !0, g = e.input.charCodeAt(e.position);
|
|
1800
1903
|
continue;
|
|
1801
1904
|
} else {
|
|
@@ -1803,11 +1906,11 @@ function Ea(e, n, t) {
|
|
|
1803
1906
|
break;
|
|
1804
1907
|
}
|
|
1805
1908
|
}
|
|
1806
|
-
s && (je(e, a, i, !1), Mt(e, e.line - l), a = i = e.position, s = !1),
|
|
1909
|
+
s && (je(e, a, i, !1), Mt(e, e.line - l), a = i = e.position, s = !1), Ne(g) || (i = e.position + 1), g = e.input.charCodeAt(++e.position);
|
|
1807
1910
|
}
|
|
1808
1911
|
return je(e, a, i, !1), e.result ? !0 : (e.kind = c, e.result = m, !1);
|
|
1809
1912
|
}
|
|
1810
|
-
function
|
|
1913
|
+
function Ra(e, n) {
|
|
1811
1914
|
var t, r, o;
|
|
1812
1915
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
1813
1916
|
return !1;
|
|
@@ -1818,10 +1921,10 @@ function Ba(e, n) {
|
|
|
1818
1921
|
else
|
|
1819
1922
|
return !0;
|
|
1820
1923
|
else
|
|
1821
|
-
we(t) ? (je(e, r, o, !0), Mt(e,
|
|
1822
|
-
|
|
1924
|
+
we(t) ? (je(e, r, o, !0), Mt(e, ie(e, !1, n)), r = o = e.position) : e.position === e.lineStart && dt(e) ? T(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
1925
|
+
T(e, "unexpected end of the stream within a single quoted scalar");
|
|
1823
1926
|
}
|
|
1824
|
-
function
|
|
1927
|
+
function Ga(e, n) {
|
|
1825
1928
|
var t, r, o, a, i, s;
|
|
1826
1929
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
1827
1930
|
return !1;
|
|
@@ -1830,37 +1933,37 @@ function Fa(e, n) {
|
|
|
1830
1933
|
return je(e, t, e.position, !0), e.position++, !0;
|
|
1831
1934
|
if (s === 92) {
|
|
1832
1935
|
if (je(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
1833
|
-
|
|
1834
|
-
else if (s < 256 &&
|
|
1835
|
-
e.result +=
|
|
1836
|
-
else if ((i =
|
|
1936
|
+
ie(e, !1, n);
|
|
1937
|
+
else if (s < 256 && zn[s])
|
|
1938
|
+
e.result += Yn[s], e.position++;
|
|
1939
|
+
else if ((i = La(s)) > 0) {
|
|
1837
1940
|
for (o = i, a = 0; o > 0; o--)
|
|
1838
|
-
s = e.input.charCodeAt(++e.position), (i =
|
|
1839
|
-
e.result +=
|
|
1941
|
+
s = e.input.charCodeAt(++e.position), (i = qa(s)) >= 0 ? a = (a << 4) + i : T(e, "expected hexadecimal character");
|
|
1942
|
+
e.result += Va(a), e.position++;
|
|
1840
1943
|
} else
|
|
1841
|
-
|
|
1944
|
+
T(e, "unknown escape sequence");
|
|
1842
1945
|
t = r = e.position;
|
|
1843
1946
|
} else
|
|
1844
|
-
we(s) ? (je(e, t, r, !0), Mt(e,
|
|
1947
|
+
we(s) ? (je(e, t, r, !0), Mt(e, ie(e, !1, n)), t = r = e.position) : e.position === e.lineStart && dt(e) ? T(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1845
1948
|
}
|
|
1846
|
-
|
|
1949
|
+
T(e, "unexpected end of the stream within a double quoted scalar");
|
|
1847
1950
|
}
|
|
1848
|
-
function
|
|
1849
|
-
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, u, d, c, m, g, k = /* @__PURE__ */ Object.create(null), _, p,
|
|
1850
|
-
if (
|
|
1951
|
+
function Ha(e, n) {
|
|
1952
|
+
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, u, d, c, m, g, k = /* @__PURE__ */ Object.create(null), _, p, A, h;
|
|
1953
|
+
if (h = e.input.charCodeAt(e.position), h === 91)
|
|
1851
1954
|
d = 93, g = !1, s = [];
|
|
1852
|
-
else if (
|
|
1955
|
+
else if (h === 123)
|
|
1853
1956
|
d = 125, g = !0, s = {};
|
|
1854
1957
|
else
|
|
1855
1958
|
return !1;
|
|
1856
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
1857
|
-
if (
|
|
1959
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), h = e.input.charCodeAt(++e.position); h !== 0; ) {
|
|
1960
|
+
if (ie(e, !0, n), h = e.input.charCodeAt(e.position), h === d)
|
|
1858
1961
|
return e.position++, e.tag = i, e.anchor = l, e.kind = g ? "mapping" : "sequence", e.result = s, !0;
|
|
1859
|
-
t ?
|
|
1962
|
+
t ? h === 44 && T(e, "expected the node content, but found ','") : T(e, "missed comma between flow collection entries"), p = _ = A = null, c = m = !1, h === 63 && (u = e.input.charCodeAt(e.position + 1), he(u) && (c = m = !0, e.position++, ie(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, De(e, n, ot, !1, !0), p = e.tag, _ = e.result, ie(e, !0, n), h = e.input.charCodeAt(e.position), (m || e.line === r) && h === 58 && (c = !0, h = e.input.charCodeAt(++e.position), ie(e, !0, n), De(e, n, ot, !1, !0), A = e.result), g ? Ve(e, s, k, p, _, A, r, o, a) : c ? s.push(Ve(e, null, k, p, _, A, r, o, a)) : s.push(_), ie(e, !0, n), h = e.input.charCodeAt(e.position), h === 44 ? (t = !0, h = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1860
1963
|
}
|
|
1861
|
-
|
|
1964
|
+
T(e, "unexpected end of the stream within a flow collection");
|
|
1862
1965
|
}
|
|
1863
|
-
function
|
|
1966
|
+
function za(e, n) {
|
|
1864
1967
|
var t, r, o = yt, a = !1, i = !1, s = n, l = 0, u = !1, d, c;
|
|
1865
1968
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
1866
1969
|
r = !1;
|
|
@@ -1870,15 +1973,15 @@ function Na(e, n) {
|
|
|
1870
1973
|
return !1;
|
|
1871
1974
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1872
1975
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1873
|
-
yt === o ? o = c === 43 ?
|
|
1874
|
-
else if ((d =
|
|
1875
|
-
d === 0 ?
|
|
1976
|
+
yt === o ? o = c === 43 ? Yt : Na : T(e, "repeat of a chomping mode identifier");
|
|
1977
|
+
else if ((d = Pa(c)) >= 0)
|
|
1978
|
+
d === 0 ? T(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? T(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
1876
1979
|
else
|
|
1877
1980
|
break;
|
|
1878
|
-
if (
|
|
1981
|
+
if (Ne(c)) {
|
|
1879
1982
|
do
|
|
1880
1983
|
c = e.input.charCodeAt(++e.position);
|
|
1881
|
-
while (
|
|
1984
|
+
while (Ne(c));
|
|
1882
1985
|
if (c === 35)
|
|
1883
1986
|
do
|
|
1884
1987
|
c = e.input.charCodeAt(++e.position);
|
|
@@ -1892,12 +1995,12 @@ function Na(e, n) {
|
|
|
1892
1995
|
continue;
|
|
1893
1996
|
}
|
|
1894
1997
|
if (e.lineIndent < s) {
|
|
1895
|
-
o ===
|
|
1998
|
+
o === Yt ? e.result += le.repeat(`
|
|
1896
1999
|
`, a ? 1 + l : l) : o === yt && a && (e.result += `
|
|
1897
2000
|
`);
|
|
1898
2001
|
break;
|
|
1899
2002
|
}
|
|
1900
|
-
for (r ?
|
|
2003
|
+
for (r ? Ne(c) ? (u = !0, e.result += le.repeat(`
|
|
1901
2004
|
`, a ? 1 + l : l)) : u ? (u = !1, e.result += le.repeat(`
|
|
1902
2005
|
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result += le.repeat(`
|
|
1903
2006
|
`, l) : e.result += le.repeat(`
|
|
@@ -1907,100 +2010,100 @@ function Na(e, n) {
|
|
|
1907
2010
|
}
|
|
1908
2011
|
return !0;
|
|
1909
2012
|
}
|
|
1910
|
-
function
|
|
2013
|
+
function Xt(e, n) {
|
|
1911
2014
|
var t, r = e.tag, o = e.anchor, a = [], i, s = !1, l;
|
|
1912
2015
|
if (e.firstTabInLine !== -1)
|
|
1913
2016
|
return !1;
|
|
1914
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1915
|
-
if (s = !0, e.position++,
|
|
2017
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, T(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !he(i)))); ) {
|
|
2018
|
+
if (s = !0, e.position++, ie(e, !0, -1) && e.lineIndent <= n) {
|
|
1916
2019
|
a.push(null), l = e.input.charCodeAt(e.position);
|
|
1917
2020
|
continue;
|
|
1918
2021
|
}
|
|
1919
|
-
if (t = e.line,
|
|
1920
|
-
|
|
2022
|
+
if (t = e.line, De(e, n, Rn, !1, !0), a.push(e.result), ie(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
2023
|
+
T(e, "bad indentation of a sequence entry");
|
|
1921
2024
|
else if (e.lineIndent < n)
|
|
1922
2025
|
break;
|
|
1923
2026
|
}
|
|
1924
2027
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1925
2028
|
}
|
|
1926
|
-
function
|
|
1927
|
-
var r, o, a, i, s, l, u = e.tag, d = e.anchor, c = {}, m = /* @__PURE__ */ Object.create(null), g = null, k = null, _ = null, p = !1,
|
|
2029
|
+
function Ya(e, n, t) {
|
|
2030
|
+
var r, o, a, i, s, l, u = e.tag, d = e.anchor, c = {}, m = /* @__PURE__ */ Object.create(null), g = null, k = null, _ = null, p = !1, A = !1, h;
|
|
1928
2031
|
if (e.firstTabInLine !== -1)
|
|
1929
2032
|
return !1;
|
|
1930
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
1931
|
-
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1932
|
-
|
|
2033
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), h = e.input.charCodeAt(e.position); h !== 0; ) {
|
|
2034
|
+
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, T(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (h === 63 || h === 58) && he(r))
|
|
2035
|
+
h === 63 ? (p && (Ve(e, c, m, g, k, null, i, s, l), g = k = _ = null), A = !0, p = !0, o = !0) : p ? (p = !1, o = !0) : T(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, h = r;
|
|
1933
2036
|
else {
|
|
1934
|
-
if (i = e.line, s = e.lineStart, l = e.position, !
|
|
2037
|
+
if (i = e.line, s = e.lineStart, l = e.position, !De(e, t, Dn, !1, !0))
|
|
1935
2038
|
break;
|
|
1936
2039
|
if (e.line === a) {
|
|
1937
|
-
for (
|
|
1938
|
-
|
|
1939
|
-
if (
|
|
1940
|
-
|
|
1941
|
-
else if (
|
|
1942
|
-
|
|
2040
|
+
for (h = e.input.charCodeAt(e.position); Ne(h); )
|
|
2041
|
+
h = e.input.charCodeAt(++e.position);
|
|
2042
|
+
if (h === 58)
|
|
2043
|
+
h = e.input.charCodeAt(++e.position), he(h) || T(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ve(e, c, m, g, k, null, i, s, l), g = k = _ = null), A = !0, p = !1, o = !1, g = e.tag, k = e.result;
|
|
2044
|
+
else if (A)
|
|
2045
|
+
T(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1943
2046
|
else
|
|
1944
2047
|
return e.tag = u, e.anchor = d, !0;
|
|
1945
|
-
} else if (
|
|
1946
|
-
|
|
2048
|
+
} else if (A)
|
|
2049
|
+
T(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1947
2050
|
else
|
|
1948
2051
|
return e.tag = u, e.anchor = d, !0;
|
|
1949
2052
|
}
|
|
1950
|
-
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position),
|
|
1951
|
-
|
|
2053
|
+
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), De(e, n, at, !0, o) && (p ? k = e.result : _ = e.result), p || (Ve(e, c, m, g, k, _, i, s, l), g = k = _ = null), ie(e, !0, -1), h = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > n) && h !== 0)
|
|
2054
|
+
T(e, "bad indentation of a mapping entry");
|
|
1952
2055
|
else if (e.lineIndent < n)
|
|
1953
2056
|
break;
|
|
1954
2057
|
}
|
|
1955
|
-
return p &&
|
|
2058
|
+
return p && Ve(e, c, m, g, k, null, i, s, l), A && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), A;
|
|
1956
2059
|
}
|
|
1957
|
-
function
|
|
2060
|
+
function Ja(e) {
|
|
1958
2061
|
var n, t = !1, r = !1, o, a, i;
|
|
1959
2062
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
1960
2063
|
return !1;
|
|
1961
|
-
if (e.tag !== null &&
|
|
2064
|
+
if (e.tag !== null && T(e, "duplication of a tag property"), i = e.input.charCodeAt(++e.position), i === 60 ? (t = !0, i = e.input.charCodeAt(++e.position)) : i === 33 ? (r = !0, o = "!!", i = e.input.charCodeAt(++e.position)) : o = "!", n = e.position, t) {
|
|
1962
2065
|
do
|
|
1963
2066
|
i = e.input.charCodeAt(++e.position);
|
|
1964
2067
|
while (i !== 0 && i !== 62);
|
|
1965
|
-
e.position < e.length ? (a = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) :
|
|
2068
|
+
e.position < e.length ? (a = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : T(e, "unexpected end of the stream within a verbatim tag");
|
|
1966
2069
|
} else {
|
|
1967
2070
|
for (; i !== 0 && !he(i); )
|
|
1968
|
-
i === 33 && (r ?
|
|
1969
|
-
a = e.input.slice(n, e.position),
|
|
2071
|
+
i === 33 && (r ? T(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), Gn.test(o) || T(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2072
|
+
a = e.input.slice(n, e.position), Ka.test(a) && T(e, "tag suffix cannot contain flow indicator characters");
|
|
1970
2073
|
}
|
|
1971
|
-
a && !
|
|
2074
|
+
a && !Hn.test(a) && T(e, "tag name cannot contain such characters: " + a);
|
|
1972
2075
|
try {
|
|
1973
2076
|
a = decodeURIComponent(a);
|
|
1974
2077
|
} catch {
|
|
1975
|
-
|
|
2078
|
+
T(e, "tag name is malformed: " + a);
|
|
1976
2079
|
}
|
|
1977
|
-
return t ? e.tag = a : Me.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a :
|
|
2080
|
+
return t ? e.tag = a : Me.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a : T(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
1978
2081
|
}
|
|
1979
|
-
function
|
|
2082
|
+
function Wa(e) {
|
|
1980
2083
|
var n, t;
|
|
1981
2084
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
1982
2085
|
return !1;
|
|
1983
|
-
for (e.anchor !== null &&
|
|
2086
|
+
for (e.anchor !== null && T(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !he(t) && !Pe(t); )
|
|
1984
2087
|
t = e.input.charCodeAt(++e.position);
|
|
1985
|
-
return e.position === n &&
|
|
2088
|
+
return e.position === n && T(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
1986
2089
|
}
|
|
1987
|
-
function
|
|
2090
|
+
function Za(e) {
|
|
1988
2091
|
var n, t, r;
|
|
1989
2092
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
1990
2093
|
return !1;
|
|
1991
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !he(r) && !
|
|
2094
|
+
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !he(r) && !Pe(r); )
|
|
1992
2095
|
r = e.input.charCodeAt(++e.position);
|
|
1993
|
-
return e.position === n &&
|
|
2096
|
+
return e.position === n && T(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Me.call(e.anchorMap, t) || T(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ie(e, !0, -1), !0;
|
|
1994
2097
|
}
|
|
1995
|
-
function
|
|
2098
|
+
function De(e, n, t, r, o) {
|
|
1996
2099
|
var a, i, s, l = 1, u = !1, d = !1, c, m, g, k, _, p;
|
|
1997
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = i = s = at === t ||
|
|
1998
|
-
for (;
|
|
1999
|
-
|
|
2000
|
-
if (s && (s = u || o), (l === 1 || at === t) && (ot === t ||
|
|
2100
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = i = s = at === t || Rn === t, r && ie(e, !0, -1) && (u = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2101
|
+
for (; Ja(e) || Wa(e); )
|
|
2102
|
+
ie(e, !0, -1) ? (u = !0, s = a, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2103
|
+
if (s && (s = u || o), (l === 1 || at === t) && (ot === t || Dn === t ? _ = n : _ = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Xt(e, p) || Ya(e, p, _)) || Ha(e, _) ? d = !0 : (i && za(e, _) || Ra(e, _) || Ga(e, _) ? d = !0 : Za(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && T(e, "alias node should not have any properties")) : Da(e, _, ot === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Xt(e, p))), e.tag === null)
|
|
2001
2104
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2002
2105
|
else if (e.tag === "?") {
|
|
2003
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2106
|
+
for (e.result !== null && e.kind !== "scalar" && T(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, m = e.implicitTypes.length; c < m; c += 1)
|
|
2004
2107
|
if (k = e.implicitTypes[c], k.resolve(e.result)) {
|
|
2005
2108
|
e.result = k.construct(e.result), e.tag = k.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2006
2109
|
break;
|
|
@@ -2014,17 +2117,17 @@ function Re(e, n, t, r, o) {
|
|
|
2014
2117
|
k = g[c];
|
|
2015
2118
|
break;
|
|
2016
2119
|
}
|
|
2017
|
-
k ||
|
|
2120
|
+
k || T(e, "unknown tag !<" + e.tag + ">"), e.result !== null && k.kind !== e.kind && T(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + k.kind + '", not "' + e.kind + '"'), k.resolve(e.result, e.tag) ? (e.result = k.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : T(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2018
2121
|
}
|
|
2019
2122
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2020
2123
|
}
|
|
2021
|
-
function
|
|
2124
|
+
function Qa(e) {
|
|
2022
2125
|
var n = e.position, t, r, o, a = !1, i;
|
|
2023
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (
|
|
2126
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (ie(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2024
2127
|
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !he(i); )
|
|
2025
2128
|
i = e.input.charCodeAt(++e.position);
|
|
2026
|
-
for (r = e.input.slice(t, e.position), o = [], r.length < 1 &&
|
|
2027
|
-
for (;
|
|
2129
|
+
for (r = e.input.slice(t, e.position), o = [], r.length < 1 && T(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2130
|
+
for (; Ne(i); )
|
|
2028
2131
|
i = e.input.charCodeAt(++e.position);
|
|
2029
2132
|
if (i === 35) {
|
|
2030
2133
|
do
|
|
@@ -2038,47 +2141,47 @@ function Ra(e) {
|
|
|
2038
2141
|
i = e.input.charCodeAt(++e.position);
|
|
2039
2142
|
o.push(e.input.slice(t, e.position));
|
|
2040
2143
|
}
|
|
2041
|
-
i !== 0 && jt(e), Me.call(
|
|
2144
|
+
i !== 0 && jt(e), Me.call(Zt, r) ? Zt[r](e, r, o) : it(e, 'unknown document directive "' + r + '"');
|
|
2042
2145
|
}
|
|
2043
|
-
if (
|
|
2044
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
2146
|
+
if (ie(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ie(e, !0, -1)) : a && T(e, "directives end mark is expected"), De(e, e.lineIndent - 1, at, !1, !0), ie(e, !0, -1), e.checkLineBreaks && Ba.test(e.input.slice(n, e.position)) && it(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && dt(e)) {
|
|
2147
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ie(e, !0, -1));
|
|
2045
2148
|
return;
|
|
2046
2149
|
}
|
|
2047
2150
|
if (e.position < e.length - 1)
|
|
2048
|
-
|
|
2151
|
+
T(e, "end of the stream or a document separator is expected");
|
|
2049
2152
|
else
|
|
2050
2153
|
return;
|
|
2051
2154
|
}
|
|
2052
|
-
function
|
|
2155
|
+
function Wn(e, n) {
|
|
2053
2156
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2054
2157
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2055
|
-
var t = new
|
|
2056
|
-
for (r !== -1 && (t.position = r,
|
|
2158
|
+
var t = new Ua(e, n), r = e.indexOf("\0");
|
|
2159
|
+
for (r !== -1 && (t.position = r, T(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2057
2160
|
t.lineIndent += 1, t.position += 1;
|
|
2058
2161
|
for (; t.position < t.length - 1; )
|
|
2059
|
-
|
|
2162
|
+
Qa(t);
|
|
2060
2163
|
return t.documents;
|
|
2061
2164
|
}
|
|
2062
|
-
function
|
|
2165
|
+
function Xa(e, n, t) {
|
|
2063
2166
|
n !== null && typeof n == "object" && typeof t > "u" && (t = n, n = null);
|
|
2064
|
-
var r =
|
|
2167
|
+
var r = Wn(e, t);
|
|
2065
2168
|
if (typeof n != "function")
|
|
2066
2169
|
return r;
|
|
2067
2170
|
for (var o = 0, a = r.length; o < a; o += 1)
|
|
2068
2171
|
n(r[o]);
|
|
2069
2172
|
}
|
|
2070
|
-
function
|
|
2071
|
-
var t =
|
|
2173
|
+
function ei(e, n) {
|
|
2174
|
+
var t = Wn(e, n);
|
|
2072
2175
|
if (t.length !== 0) {
|
|
2073
2176
|
if (t.length === 1)
|
|
2074
2177
|
return t[0];
|
|
2075
2178
|
throw new me("expected a single document in the stream, but found more");
|
|
2076
2179
|
}
|
|
2077
2180
|
}
|
|
2078
|
-
var
|
|
2079
|
-
loadAll:
|
|
2080
|
-
load:
|
|
2081
|
-
},
|
|
2181
|
+
var ti = Xa, ni = ei, Zn = {
|
|
2182
|
+
loadAll: ti,
|
|
2183
|
+
load: ni
|
|
2184
|
+
}, Qn = Object.prototype.toString, Xn = Object.prototype.hasOwnProperty, Et = 65279, ri = 9, Je = 10, oi = 13, ai = 32, ii = 33, si = 34, bt = 35, li = 37, ui = 38, ci = 39, di = 42, er = 44, pi = 45, st = 58, fi = 61, mi = 62, gi = 63, yi = 64, tr = 91, nr = 93, hi = 96, rr = 123, vi = 124, or = 125, fe = {};
|
|
2082
2185
|
fe[0] = "\\0";
|
|
2083
2186
|
fe[7] = "\\a";
|
|
2084
2187
|
fe[8] = "\\b";
|
|
@@ -2094,7 +2197,7 @@ fe[133] = "\\N";
|
|
|
2094
2197
|
fe[160] = "\\_";
|
|
2095
2198
|
fe[8232] = "\\L";
|
|
2096
2199
|
fe[8233] = "\\P";
|
|
2097
|
-
var
|
|
2200
|
+
var bi = [
|
|
2098
2201
|
"y",
|
|
2099
2202
|
"Y",
|
|
2100
2203
|
"yes",
|
|
@@ -2111,16 +2214,16 @@ var ui = [
|
|
|
2111
2214
|
"off",
|
|
2112
2215
|
"Off",
|
|
2113
2216
|
"OFF"
|
|
2114
|
-
],
|
|
2115
|
-
function
|
|
2217
|
+
], Ci = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2218
|
+
function ki(e, n) {
|
|
2116
2219
|
var t, r, o, a, i, s, l;
|
|
2117
2220
|
if (n === null)
|
|
2118
2221
|
return {};
|
|
2119
2222
|
for (t = {}, r = Object.keys(n), o = 0, a = r.length; o < a; o += 1)
|
|
2120
|
-
i = r[o], s = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), l = e.compiledTypeMap.fallback[i], l &&
|
|
2223
|
+
i = r[o], s = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), l = e.compiledTypeMap.fallback[i], l && Xn.call(l.styleAliases, s) && (s = l.styleAliases[s]), t[i] = s;
|
|
2121
2224
|
return t;
|
|
2122
2225
|
}
|
|
2123
|
-
function
|
|
2226
|
+
function _i(e) {
|
|
2124
2227
|
var n, t, r;
|
|
2125
2228
|
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
2126
2229
|
t = "x", r = 2;
|
|
@@ -2132,11 +2235,11 @@ function pi(e) {
|
|
|
2132
2235
|
throw new me("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2133
2236
|
return "\\" + t + le.repeat("0", r - n.length) + n;
|
|
2134
2237
|
}
|
|
2135
|
-
var
|
|
2136
|
-
function
|
|
2137
|
-
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = le.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
2238
|
+
var wi = 1, We = 2;
|
|
2239
|
+
function Ai(e) {
|
|
2240
|
+
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = le.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = ki(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? We : wi, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2138
2241
|
}
|
|
2139
|
-
function
|
|
2242
|
+
function en(e, n) {
|
|
2140
2243
|
for (var t = le.repeat(" ", n), r = 0, o = -1, a = "", i, s = e.length; r < s; )
|
|
2141
2244
|
o = e.indexOf(`
|
|
2142
2245
|
`, r), o === -1 ? (i = e.slice(r), r = s) : (i = e.slice(r, o + 1), r = o + 1), i.length && i !== `
|
|
@@ -2147,7 +2250,7 @@ function Ct(e, n) {
|
|
|
2147
2250
|
return `
|
|
2148
2251
|
` + le.repeat(" ", e.indent * n);
|
|
2149
2252
|
}
|
|
2150
|
-
function
|
|
2253
|
+
function Ii(e, n) {
|
|
2151
2254
|
var t, r, o;
|
|
2152
2255
|
for (t = 0, r = e.implicitTypes.length; t < r; t += 1)
|
|
2153
2256
|
if (o = e.implicitTypes[t], o.resolve(n))
|
|
@@ -2155,71 +2258,71 @@ function gi(e, n) {
|
|
|
2155
2258
|
return !1;
|
|
2156
2259
|
}
|
|
2157
2260
|
function lt(e) {
|
|
2158
|
-
return e ===
|
|
2261
|
+
return e === ai || e === ri;
|
|
2159
2262
|
}
|
|
2160
2263
|
function Ze(e) {
|
|
2161
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2264
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Et || 65536 <= e && e <= 1114111;
|
|
2162
2265
|
}
|
|
2163
|
-
function
|
|
2164
|
-
return Ze(e) && e !==
|
|
2266
|
+
function tn(e) {
|
|
2267
|
+
return Ze(e) && e !== Et && e !== oi && e !== Je;
|
|
2165
2268
|
}
|
|
2166
|
-
function
|
|
2167
|
-
var r =
|
|
2269
|
+
function nn(e, n, t) {
|
|
2270
|
+
var r = tn(e), o = r && !lt(e);
|
|
2168
2271
|
return (
|
|
2169
2272
|
// ns-plain-safe
|
|
2170
2273
|
(t ? (
|
|
2171
2274
|
// c = flow-in
|
|
2172
2275
|
r
|
|
2173
|
-
) : r && e !==
|
|
2276
|
+
) : r && e !== er && e !== tr && e !== nr && e !== rr && e !== or) && e !== bt && !(n === st && !o) || tn(n) && !lt(n) && e === bt || n === st && o
|
|
2174
2277
|
);
|
|
2175
2278
|
}
|
|
2176
|
-
function
|
|
2177
|
-
return Ze(e) && e !==
|
|
2279
|
+
function Si(e) {
|
|
2280
|
+
return Ze(e) && e !== Et && !lt(e) && e !== pi && e !== gi && e !== st && e !== er && e !== tr && e !== nr && e !== rr && e !== or && e !== bt && e !== ui && e !== di && e !== ii && e !== vi && e !== fi && e !== mi && e !== ci && e !== si && e !== li && e !== yi && e !== hi;
|
|
2178
2281
|
}
|
|
2179
|
-
function
|
|
2282
|
+
function xi(e) {
|
|
2180
2283
|
return !lt(e) && e !== st;
|
|
2181
2284
|
}
|
|
2182
|
-
function
|
|
2285
|
+
function ze(e, n) {
|
|
2183
2286
|
var t = e.charCodeAt(n), r;
|
|
2184
2287
|
return t >= 55296 && t <= 56319 && n + 1 < e.length && (r = e.charCodeAt(n + 1), r >= 56320 && r <= 57343) ? (t - 55296) * 1024 + r - 56320 + 65536 : t;
|
|
2185
2288
|
}
|
|
2186
|
-
function
|
|
2289
|
+
function ar(e) {
|
|
2187
2290
|
var n = /^\n* /;
|
|
2188
2291
|
return n.test(e);
|
|
2189
2292
|
}
|
|
2190
|
-
var
|
|
2191
|
-
function
|
|
2192
|
-
var l, u = 0, d = null, c = !1, m = !1, g = r !== -1, k = -1, _ =
|
|
2293
|
+
var ir = 1, kt = 2, sr = 3, lr = 4, Le = 5;
|
|
2294
|
+
function Ti(e, n, t, r, o, a, i, s) {
|
|
2295
|
+
var l, u = 0, d = null, c = !1, m = !1, g = r !== -1, k = -1, _ = Si(ze(e, 0)) && xi(ze(e, e.length - 1));
|
|
2193
2296
|
if (n || i)
|
|
2194
2297
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2195
|
-
if (u =
|
|
2196
|
-
return
|
|
2197
|
-
_ = _ &&
|
|
2298
|
+
if (u = ze(e, l), !Ze(u))
|
|
2299
|
+
return Le;
|
|
2300
|
+
_ = _ && nn(u, d, s), d = u;
|
|
2198
2301
|
}
|
|
2199
2302
|
else {
|
|
2200
2303
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2201
|
-
if (u =
|
|
2304
|
+
if (u = ze(e, l), u === Je)
|
|
2202
2305
|
c = !0, g && (m = m || // Foldable line = too long, and not more-indented.
|
|
2203
2306
|
l - k - 1 > r && e[k + 1] !== " ", k = l);
|
|
2204
2307
|
else if (!Ze(u))
|
|
2205
|
-
return
|
|
2206
|
-
_ = _ &&
|
|
2308
|
+
return Le;
|
|
2309
|
+
_ = _ && nn(u, d, s), d = u;
|
|
2207
2310
|
}
|
|
2208
2311
|
m = m || g && l - k - 1 > r && e[k + 1] !== " ";
|
|
2209
2312
|
}
|
|
2210
|
-
return !c && !m ? _ && !i && !o(e) ?
|
|
2313
|
+
return !c && !m ? _ && !i && !o(e) ? ir : a === We ? Le : kt : t > 9 && ar(e) ? Le : i ? a === We ? Le : kt : m ? lr : sr;
|
|
2211
2314
|
}
|
|
2212
|
-
function
|
|
2315
|
+
function $i(e, n, t, r, o) {
|
|
2213
2316
|
e.dump = function() {
|
|
2214
2317
|
if (n.length === 0)
|
|
2215
2318
|
return e.quotingType === We ? '""' : "''";
|
|
2216
|
-
if (!e.noCompatMode && (
|
|
2319
|
+
if (!e.noCompatMode && (bi.indexOf(n) !== -1 || Ci.test(n)))
|
|
2217
2320
|
return e.quotingType === We ? '"' + n + '"' : "'" + n + "'";
|
|
2218
2321
|
var a = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2219
2322
|
function l(u) {
|
|
2220
|
-
return
|
|
2323
|
+
return Ii(e, u);
|
|
2221
2324
|
}
|
|
2222
|
-
switch (
|
|
2325
|
+
switch (Ti(
|
|
2223
2326
|
n,
|
|
2224
2327
|
s,
|
|
2225
2328
|
e.indent,
|
|
@@ -2229,47 +2332,47 @@ function bi(e, n, t, r, o) {
|
|
|
2229
2332
|
e.forceQuotes && !r,
|
|
2230
2333
|
o
|
|
2231
2334
|
)) {
|
|
2232
|
-
case
|
|
2335
|
+
case ir:
|
|
2233
2336
|
return n;
|
|
2234
2337
|
case kt:
|
|
2235
2338
|
return "'" + n.replace(/'/g, "''") + "'";
|
|
2236
|
-
case
|
|
2237
|
-
return "|" +
|
|
2238
|
-
case
|
|
2239
|
-
return ">" +
|
|
2240
|
-
case
|
|
2241
|
-
return '"' +
|
|
2339
|
+
case sr:
|
|
2340
|
+
return "|" + rn(n, e.indent) + on(en(n, a));
|
|
2341
|
+
case lr:
|
|
2342
|
+
return ">" + rn(n, e.indent) + on(en(ji(n, i), a));
|
|
2343
|
+
case Le:
|
|
2344
|
+
return '"' + Mi(n) + '"';
|
|
2242
2345
|
default:
|
|
2243
2346
|
throw new me("impossible error: invalid scalar style");
|
|
2244
2347
|
}
|
|
2245
2348
|
}();
|
|
2246
2349
|
}
|
|
2247
|
-
function
|
|
2248
|
-
var t =
|
|
2350
|
+
function rn(e, n) {
|
|
2351
|
+
var t = ar(e) ? String(n) : "", r = e[e.length - 1] === `
|
|
2249
2352
|
`, o = r && (e[e.length - 2] === `
|
|
2250
2353
|
` || e === `
|
|
2251
2354
|
`), a = o ? "+" : r ? "" : "-";
|
|
2252
2355
|
return t + a + `
|
|
2253
2356
|
`;
|
|
2254
2357
|
}
|
|
2255
|
-
function
|
|
2358
|
+
function on(e) {
|
|
2256
2359
|
return e[e.length - 1] === `
|
|
2257
2360
|
` ? e.slice(0, -1) : e;
|
|
2258
2361
|
}
|
|
2259
|
-
function
|
|
2362
|
+
function ji(e, n) {
|
|
2260
2363
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2261
2364
|
var u = e.indexOf(`
|
|
2262
2365
|
`);
|
|
2263
|
-
return u = u !== -1 ? u : e.length, t.lastIndex = u,
|
|
2366
|
+
return u = u !== -1 ? u : e.length, t.lastIndex = u, an(e.slice(0, u), n);
|
|
2264
2367
|
}(), o = e[0] === `
|
|
2265
2368
|
` || e[0] === " ", a, i; i = t.exec(e); ) {
|
|
2266
2369
|
var s = i[1], l = i[2];
|
|
2267
2370
|
a = l[0] === " ", r += s + (!o && !a && l !== "" ? `
|
|
2268
|
-
` : "") +
|
|
2371
|
+
` : "") + an(l, n), o = a;
|
|
2269
2372
|
}
|
|
2270
2373
|
return r;
|
|
2271
2374
|
}
|
|
2272
|
-
function
|
|
2375
|
+
function an(e, n) {
|
|
2273
2376
|
if (e === "" || e[0] === " ")
|
|
2274
2377
|
return e;
|
|
2275
2378
|
for (var t = / [^ ]/g, r, o = 0, a, i = 0, s = 0, l = ""; r = t.exec(e); )
|
|
@@ -2279,30 +2382,30 @@ function on(e, n) {
|
|
|
2279
2382
|
`, e.length - o > n && i > o ? l += e.slice(o, i) + `
|
|
2280
2383
|
` + e.slice(i + 1) : l += e.slice(o), l.slice(1);
|
|
2281
2384
|
}
|
|
2282
|
-
function
|
|
2385
|
+
function Mi(e) {
|
|
2283
2386
|
for (var n = "", t = 0, r, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
2284
|
-
t =
|
|
2387
|
+
t = ze(e, o), r = fe[t], !r && Ze(t) ? (n += e[o], t >= 65536 && (n += e[o + 1])) : n += r || _i(t);
|
|
2285
2388
|
return n;
|
|
2286
2389
|
}
|
|
2287
|
-
function
|
|
2390
|
+
function Ei(e, n, t) {
|
|
2288
2391
|
var r = "", o = e.tag, a, i, s;
|
|
2289
2392
|
for (a = 0, i = t.length; a < i; a += 1)
|
|
2290
2393
|
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (Se(e, n, s, !1, !1) || typeof s > "u" && Se(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2291
2394
|
e.tag = o, e.dump = "[" + r + "]";
|
|
2292
2395
|
}
|
|
2293
|
-
function
|
|
2396
|
+
function sn(e, n, t, r) {
|
|
2294
2397
|
var o = "", a = e.tag, i, s, l;
|
|
2295
2398
|
for (i = 0, s = t.length; i < s; i += 1)
|
|
2296
|
-
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (Se(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && Se(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += Ct(e, n)), e.dump &&
|
|
2399
|
+
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (Se(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && Se(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += Ct(e, n)), e.dump && Je === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2297
2400
|
e.tag = a, e.dump = o || "[]";
|
|
2298
2401
|
}
|
|
2299
|
-
function
|
|
2402
|
+
function Oi(e, n, t) {
|
|
2300
2403
|
var r = "", o = e.tag, a = Object.keys(t), i, s, l, u, d;
|
|
2301
2404
|
for (i = 0, s = a.length; i < s; i += 1)
|
|
2302
2405
|
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], u = t[l], e.replacer && (u = e.replacer.call(t, l, u)), Se(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Se(e, n, u, !1, !1) && (d += e.dump, r += d));
|
|
2303
2406
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2304
2407
|
}
|
|
2305
|
-
function
|
|
2408
|
+
function Ni(e, n, t, r) {
|
|
2306
2409
|
var o = "", a = e.tag, i = Object.keys(t), s, l, u, d, c, m;
|
|
2307
2410
|
if (e.sortKeys === !0)
|
|
2308
2411
|
i.sort();
|
|
@@ -2311,17 +2414,17 @@ function Ii(e, n, t, r) {
|
|
|
2311
2414
|
else if (e.sortKeys)
|
|
2312
2415
|
throw new me("sortKeys must be a boolean or a function");
|
|
2313
2416
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2314
|
-
m = "", (!r || o !== "") && (m += Ct(e, n)), u = i[s], d = t[u], e.replacer && (d = e.replacer.call(t, u, d)), Se(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump &&
|
|
2417
|
+
m = "", (!r || o !== "") && (m += Ct(e, n)), u = i[s], d = t[u], e.replacer && (d = e.replacer.call(t, u, d)), Se(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Je === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, c && (m += Ct(e, n)), Se(e, n + 1, d, !0, c) && (e.dump && Je === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, o += m));
|
|
2315
2418
|
e.tag = a, e.dump = o || "{}";
|
|
2316
2419
|
}
|
|
2317
|
-
function
|
|
2420
|
+
function ln(e, n, t) {
|
|
2318
2421
|
var r, o, a, i, s, l;
|
|
2319
2422
|
for (o = t ? e.explicitTypes : e.implicitTypes, a = 0, i = o.length; a < i; a += 1)
|
|
2320
2423
|
if (s = o[a], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof n == "object" && n instanceof s.instanceOf) && (!s.predicate || s.predicate(n))) {
|
|
2321
2424
|
if (t ? s.multi && s.representName ? e.tag = s.representName(n) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2322
|
-
if (l = e.styleMap[s.tag] || s.defaultStyle,
|
|
2425
|
+
if (l = e.styleMap[s.tag] || s.defaultStyle, Qn.call(s.represent) === "[object Function]")
|
|
2323
2426
|
r = s.represent(n, l);
|
|
2324
|
-
else if (
|
|
2427
|
+
else if (Xn.call(s.represent, l))
|
|
2325
2428
|
r = s.represent[l](n, l);
|
|
2326
2429
|
else
|
|
2327
2430
|
throw new me("!<" + s.tag + '> tag resolver accepts not "' + l + '" style');
|
|
@@ -2332,19 +2435,19 @@ function sn(e, n, t) {
|
|
|
2332
2435
|
return !1;
|
|
2333
2436
|
}
|
|
2334
2437
|
function Se(e, n, t, r, o, a, i) {
|
|
2335
|
-
e.tag = null, e.dump = t,
|
|
2336
|
-
var s =
|
|
2438
|
+
e.tag = null, e.dump = t, ln(e, t, !1) || ln(e, t, !0);
|
|
2439
|
+
var s = Qn.call(e.dump), l = r, u;
|
|
2337
2440
|
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
2338
2441
|
var d = s === "[object Object]" || s === "[object Array]", c, m;
|
|
2339
2442
|
if (d && (c = e.duplicates.indexOf(t), m = c !== -1), (e.tag !== null && e.tag !== "?" || m || e.indent !== 2 && n > 0) && (o = !1), m && e.usedDuplicates[c])
|
|
2340
2443
|
e.dump = "*ref_" + c;
|
|
2341
2444
|
else {
|
|
2342
2445
|
if (d && m && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), s === "[object Object]")
|
|
2343
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2446
|
+
r && Object.keys(e.dump).length !== 0 ? (Ni(e, n, e.dump, o), m && (e.dump = "&ref_" + c + e.dump)) : (Oi(e, n, e.dump), m && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2344
2447
|
else if (s === "[object Array]")
|
|
2345
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ?
|
|
2448
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? sn(e, n - 1, e.dump, o) : sn(e, n, e.dump, o), m && (e.dump = "&ref_" + c + e.dump)) : (Ei(e, n, e.dump), m && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2346
2449
|
else if (s === "[object String]")
|
|
2347
|
-
e.tag !== "?" &&
|
|
2450
|
+
e.tag !== "?" && $i(e, e.dump, n, a, l);
|
|
2348
2451
|
else {
|
|
2349
2452
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2350
2453
|
return !1;
|
|
@@ -2356,7 +2459,7 @@ function Se(e, n, t, r, o, a, i) {
|
|
|
2356
2459
|
}
|
|
2357
2460
|
return !0;
|
|
2358
2461
|
}
|
|
2359
|
-
function
|
|
2462
|
+
function Fi(e, n) {
|
|
2360
2463
|
var t = [], r = [], o, a;
|
|
2361
2464
|
for (_t(e, t, r), o = 0, a = r.length; o < a; o += 1)
|
|
2362
2465
|
n.duplicates.push(t[r[o]]);
|
|
@@ -2374,65 +2477,65 @@ function _t(e, n, t) {
|
|
|
2374
2477
|
for (r = Object.keys(e), o = 0, a = r.length; o < a; o += 1)
|
|
2375
2478
|
_t(e[r[o]], n, t);
|
|
2376
2479
|
}
|
|
2377
|
-
function
|
|
2480
|
+
function Bi(e, n) {
|
|
2378
2481
|
n = n || {};
|
|
2379
|
-
var t = new
|
|
2380
|
-
t.noRefs ||
|
|
2482
|
+
var t = new Ai(n);
|
|
2483
|
+
t.noRefs || Fi(e, t);
|
|
2381
2484
|
var r = e;
|
|
2382
2485
|
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Se(t, 0, r, !0, !0) ? t.dump + `
|
|
2383
2486
|
` : "";
|
|
2384
2487
|
}
|
|
2385
|
-
var
|
|
2386
|
-
dump:
|
|
2488
|
+
var Ki = Bi, qi = {
|
|
2489
|
+
dump: Ki
|
|
2387
2490
|
};
|
|
2388
|
-
function
|
|
2491
|
+
function Ot(e, n) {
|
|
2389
2492
|
return function() {
|
|
2390
2493
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2391
2494
|
};
|
|
2392
2495
|
}
|
|
2393
|
-
var
|
|
2394
|
-
binary:
|
|
2395
|
-
float:
|
|
2396
|
-
map:
|
|
2397
|
-
null:
|
|
2398
|
-
pairs:
|
|
2399
|
-
set:
|
|
2400
|
-
timestamp:
|
|
2401
|
-
bool:
|
|
2402
|
-
int:
|
|
2403
|
-
merge:
|
|
2404
|
-
omap:
|
|
2405
|
-
seq:
|
|
2406
|
-
str:
|
|
2407
|
-
},
|
|
2408
|
-
Type:
|
|
2409
|
-
Schema:
|
|
2410
|
-
FAILSAFE_SCHEMA:
|
|
2411
|
-
JSON_SCHEMA:
|
|
2412
|
-
CORE_SCHEMA:
|
|
2413
|
-
DEFAULT_SCHEMA:
|
|
2414
|
-
load:
|
|
2415
|
-
loadAll:
|
|
2416
|
-
dump:
|
|
2417
|
-
YAMLException:
|
|
2418
|
-
types:
|
|
2419
|
-
safeLoad:
|
|
2420
|
-
safeLoadAll:
|
|
2421
|
-
safeDump:
|
|
2496
|
+
var Li = pe, Pi = An, Vi = Tn, Ui = On, Di = Nn, Ri = $t, Gi = Zn.load, Hi = Zn.loadAll, zi = qi.dump, Yi = me, Ji = {
|
|
2497
|
+
binary: Ln,
|
|
2498
|
+
float: En,
|
|
2499
|
+
map: xn,
|
|
2500
|
+
null: $n,
|
|
2501
|
+
pairs: Vn,
|
|
2502
|
+
set: Un,
|
|
2503
|
+
timestamp: Kn,
|
|
2504
|
+
bool: jn,
|
|
2505
|
+
int: Mn,
|
|
2506
|
+
merge: qn,
|
|
2507
|
+
omap: Pn,
|
|
2508
|
+
seq: Sn,
|
|
2509
|
+
str: In
|
|
2510
|
+
}, Wi = Ot("safeLoad", "load"), Zi = Ot("safeLoadAll", "loadAll"), Qi = Ot("safeDump", "dump"), Xi = {
|
|
2511
|
+
Type: Li,
|
|
2512
|
+
Schema: Pi,
|
|
2513
|
+
FAILSAFE_SCHEMA: Vi,
|
|
2514
|
+
JSON_SCHEMA: Ui,
|
|
2515
|
+
CORE_SCHEMA: Di,
|
|
2516
|
+
DEFAULT_SCHEMA: Ri,
|
|
2517
|
+
load: Gi,
|
|
2518
|
+
loadAll: Hi,
|
|
2519
|
+
dump: zi,
|
|
2520
|
+
YAMLException: Yi,
|
|
2521
|
+
types: Ji,
|
|
2522
|
+
safeLoad: Wi,
|
|
2523
|
+
safeLoadAll: Zi,
|
|
2524
|
+
safeDump: Qi
|
|
2422
2525
|
};
|
|
2423
|
-
const
|
|
2526
|
+
const es = {
|
|
2424
2527
|
key: 0,
|
|
2425
2528
|
class: "config-card-display-form"
|
|
2426
|
-
},
|
|
2529
|
+
}, ts = ["data-testid"], ns = {
|
|
2427
2530
|
key: 0,
|
|
2428
2531
|
class: "config-card-prop-section-title"
|
|
2429
|
-
},
|
|
2532
|
+
}, rs = {
|
|
2430
2533
|
key: 1,
|
|
2431
2534
|
class: "config-card-display-json"
|
|
2432
|
-
},
|
|
2535
|
+
}, os = {
|
|
2433
2536
|
key: 2,
|
|
2434
2537
|
class: "config-card-display-yaml"
|
|
2435
|
-
},
|
|
2538
|
+
}, as = /* @__PURE__ */ oe({
|
|
2436
2539
|
__name: "ConfigCardDisplay",
|
|
2437
2540
|
props: {
|
|
2438
2541
|
propertyCollections: {
|
|
@@ -2460,18 +2563,18 @@ const Di = {
|
|
|
2460
2563
|
setup(e) {
|
|
2461
2564
|
const n = e, t = ut(), { i18n: { t: r } } = ce.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a = M(""), i = M("");
|
|
2462
2565
|
return xe(() => n.format, (s) => {
|
|
2463
|
-
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value =
|
|
2566
|
+
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value = Xi.dump(n.record));
|
|
2464
2567
|
}, { immediate: !0 }), (s, l) => {
|
|
2465
|
-
const u =
|
|
2466
|
-
return f(),
|
|
2467
|
-
e.format === "structured" ? (f(),
|
|
2468
|
-
(f(!0),
|
|
2568
|
+
const u = q("KCodeBlock");
|
|
2569
|
+
return f(), x(ve, null, [
|
|
2570
|
+
e.format === "structured" ? (f(), x("div", es, [
|
|
2571
|
+
(f(!0), x(ve, null, ye(e.propListTypes, (d) => (f(), x("div", {
|
|
2469
2572
|
key: `config-card-details-${d}-props`,
|
|
2470
2573
|
class: Fe(`config-card-details-${d}-props`),
|
|
2471
2574
|
"data-testid": `config-card-details-${d}-props`
|
|
2472
2575
|
}, [
|
|
2473
|
-
d !== "basic" ? (f(),
|
|
2474
|
-
(f(!0),
|
|
2576
|
+
d !== "basic" ? (f(), x("div", ns, O(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2577
|
+
(f(!0), x(ve, null, ye(e.propertyCollections[d], (c) => (f(), U(xt, {
|
|
2475
2578
|
key: c.key,
|
|
2476
2579
|
item: c
|
|
2477
2580
|
}, Te({
|
|
@@ -2494,18 +2597,18 @@ const Di = {
|
|
|
2494
2597
|
key: "0"
|
|
2495
2598
|
} : void 0
|
|
2496
2599
|
]), 1032, ["item"]))), 128))
|
|
2497
|
-
], 10,
|
|
2600
|
+
], 10, ts))), 128))
|
|
2498
2601
|
])) : G("", !0),
|
|
2499
|
-
e.format === "json" ? (f(),
|
|
2500
|
-
|
|
2602
|
+
e.format === "json" ? (f(), x("div", rs, [
|
|
2603
|
+
N(u, {
|
|
2501
2604
|
id: "config-card-codeblock",
|
|
2502
2605
|
code: a.value,
|
|
2503
2606
|
language: "json",
|
|
2504
2607
|
theme: "dark"
|
|
2505
2608
|
}, null, 8, ["code"])
|
|
2506
2609
|
])) : G("", !0),
|
|
2507
|
-
e.format === "yaml" ? (f(),
|
|
2508
|
-
|
|
2610
|
+
e.format === "yaml" ? (f(), x("div", os, [
|
|
2611
|
+
N(u, {
|
|
2509
2612
|
id: "config-card-codeblock",
|
|
2510
2613
|
code: i.value,
|
|
2511
2614
|
language: "yaml",
|
|
@@ -2515,18 +2618,18 @@ const Di = {
|
|
|
2515
2618
|
], 64);
|
|
2516
2619
|
};
|
|
2517
2620
|
}
|
|
2518
|
-
}),
|
|
2621
|
+
}), is = /* @__PURE__ */ ke(as, [["__scopeId", "data-v-6c45e9e4"]]), un = "24px", ss = (e, n) => {
|
|
2519
2622
|
const t = e.__vccOpts || e;
|
|
2520
2623
|
for (const [r, o] of n)
|
|
2521
2624
|
t[r] = o;
|
|
2522
2625
|
return t;
|
|
2523
|
-
},
|
|
2626
|
+
}, ls = (e) => (fn("data-v-dd88a2bb"), e = e(), mn(), e), us = ["aria-hidden"], cs = {
|
|
2524
2627
|
key: 0,
|
|
2525
2628
|
"data-testid": "kui-icon-svg-title"
|
|
2526
|
-
},
|
|
2629
|
+
}, ds = /* @__PURE__ */ ls(() => /* @__PURE__ */ P("path", {
|
|
2527
2630
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2528
2631
|
fill: "currentColor"
|
|
2529
|
-
}, null, -1)),
|
|
2632
|
+
}, null, -1)), ps = /* @__PURE__ */ oe({
|
|
2530
2633
|
__name: "BookIcon",
|
|
2531
2634
|
props: {
|
|
2532
2635
|
/** The accessibility text provided to screen readers */
|
|
@@ -2557,7 +2660,7 @@ const Di = {
|
|
|
2557
2660
|
size: {
|
|
2558
2661
|
type: [Number, String],
|
|
2559
2662
|
required: !1,
|
|
2560
|
-
default:
|
|
2663
|
+
default: un,
|
|
2561
2664
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2562
2665
|
validator: (e) => {
|
|
2563
2666
|
if (typeof e == "number" && e > 0)
|
|
@@ -2578,7 +2681,7 @@ const Di = {
|
|
|
2578
2681
|
}
|
|
2579
2682
|
},
|
|
2580
2683
|
setup(e) {
|
|
2581
|
-
const n = e, t =
|
|
2684
|
+
const n = e, t = S(() => {
|
|
2582
2685
|
if (typeof n.size == "number" && n.size > 0)
|
|
2583
2686
|
return `${n.size}px`;
|
|
2584
2687
|
if (typeof n.size == "string") {
|
|
@@ -2586,8 +2689,8 @@ const Di = {
|
|
|
2586
2689
|
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2587
2690
|
return `${a}px`;
|
|
2588
2691
|
}
|
|
2589
|
-
return
|
|
2590
|
-
}), r =
|
|
2692
|
+
return un;
|
|
2693
|
+
}), r = S(() => ({
|
|
2591
2694
|
boxSizing: "border-box",
|
|
2592
2695
|
color: n.color,
|
|
2593
2696
|
display: n.display,
|
|
@@ -2595,14 +2698,14 @@ const Di = {
|
|
|
2595
2698
|
lineHeight: "0",
|
|
2596
2699
|
width: t.value
|
|
2597
2700
|
}));
|
|
2598
|
-
return (o, a) => (f(),
|
|
2701
|
+
return (o, a) => (f(), U(Ue(e.as), {
|
|
2599
2702
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2600
2703
|
class: "kui-icon book-icon",
|
|
2601
2704
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2602
|
-
style:
|
|
2705
|
+
style: pn(r.value)
|
|
2603
2706
|
}, {
|
|
2604
2707
|
default: v(() => [
|
|
2605
|
-
(f(),
|
|
2708
|
+
(f(), x("svg", {
|
|
2606
2709
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2607
2710
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2608
2711
|
fill: "none",
|
|
@@ -2612,23 +2715,23 @@ const Di = {
|
|
|
2612
2715
|
width: "100%",
|
|
2613
2716
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2614
2717
|
}, [
|
|
2615
|
-
e.title ? (f(),
|
|
2616
|
-
|
|
2617
|
-
], 8,
|
|
2718
|
+
e.title ? (f(), x("title", cs, O(e.title), 1)) : G("", !0),
|
|
2719
|
+
ds
|
|
2720
|
+
], 8, us))
|
|
2618
2721
|
]),
|
|
2619
2722
|
_: 1
|
|
2620
2723
|
}, 8, ["aria-hidden", "style"]));
|
|
2621
2724
|
}
|
|
2622
|
-
}),
|
|
2725
|
+
}), fs = /* @__PURE__ */ ss(ps, [["__scopeId", "data-v-dd88a2bb"]]), ms = { "data-testid": "config-card-title" }, gs = { class: "config-card-actions" }, ys = ["href"], hs = {
|
|
2623
2726
|
key: 2,
|
|
2624
2727
|
class: "config-card-details-section"
|
|
2625
|
-
},
|
|
2728
|
+
}, vs = {
|
|
2626
2729
|
key: 3,
|
|
2627
2730
|
class: "config-card-details-section"
|
|
2628
|
-
},
|
|
2731
|
+
}, bs = ["data-testid"], Cs = {
|
|
2629
2732
|
key: 0,
|
|
2630
2733
|
class: "config-card-prop-section-title"
|
|
2631
|
-
},
|
|
2734
|
+
}, ks = /* @__PURE__ */ oe({
|
|
2632
2735
|
__name: "EntityBaseConfigCard",
|
|
2633
2736
|
props: {
|
|
2634
2737
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2719,8 +2822,8 @@ const Di = {
|
|
|
2719
2822
|
label: "YAML",
|
|
2720
2823
|
value: "yaml"
|
|
2721
2824
|
}
|
|
2722
|
-
], d = M("structured"), c = (
|
|
2723
|
-
d.value =
|
|
2825
|
+
], d = M("structured"), c = (w) => {
|
|
2826
|
+
d.value = w == null ? void 0 : w.value;
|
|
2724
2827
|
}, m = {
|
|
2725
2828
|
id: {
|
|
2726
2829
|
type: ne.ID,
|
|
@@ -2755,21 +2858,21 @@ const Di = {
|
|
|
2755
2858
|
// the last property displayed
|
|
2756
2859
|
section: be.Basic
|
|
2757
2860
|
}
|
|
2758
|
-
}, g = M(!1), k = M(!1), _ = M(""), p = M(),
|
|
2759
|
-
var
|
|
2861
|
+
}, g = M(!1), k = M(!1), _ = M(""), p = M(), A = S(() => {
|
|
2862
|
+
var w, D, V;
|
|
2760
2863
|
if (!p.value)
|
|
2761
2864
|
return [];
|
|
2762
|
-
const
|
|
2865
|
+
const I = [], E = Object.keys(p.value).length;
|
|
2763
2866
|
for (const j in p.value) {
|
|
2764
|
-
const
|
|
2765
|
-
let X =
|
|
2766
|
-
(
|
|
2867
|
+
const B = (D = (w = r.configSchema) == null ? void 0 : w[j]) == null ? void 0 : D.order, J = (V = m[j]) == null ? void 0 : V.order;
|
|
2868
|
+
let X = E;
|
|
2869
|
+
(J || J === 0) && (X = J === -1 ? E + 1 : J), B && (X = B === -1 ? E + 1 : B), I.push([j, X]);
|
|
2767
2870
|
}
|
|
2768
|
-
return
|
|
2769
|
-
return j[1] -
|
|
2770
|
-
}),
|
|
2771
|
-
var
|
|
2772
|
-
const X = j[0], ee = (
|
|
2871
|
+
return I.sort(function(j, B) {
|
|
2872
|
+
return j[1] - B[1];
|
|
2873
|
+
}), I.map((j) => {
|
|
2874
|
+
var B, J;
|
|
2875
|
+
const X = j[0], ee = (B = p.value) == null ? void 0 : B[X], te = ((J = r.configSchema) == null ? void 0 : J[X]) || {}, se = m[X];
|
|
2773
2876
|
return {
|
|
2774
2877
|
key: X,
|
|
2775
2878
|
value: ee,
|
|
@@ -2780,120 +2883,120 @@ const Di = {
|
|
|
2780
2883
|
section: te.section ?? ((se == null ? void 0 : se.section) || be.Advanced)
|
|
2781
2884
|
};
|
|
2782
2885
|
}).filter((j) => !j.hidden && j.key !== r.pluginConfigKey);
|
|
2783
|
-
}),
|
|
2784
|
-
var
|
|
2886
|
+
}), h = S(() => {
|
|
2887
|
+
var w, D;
|
|
2785
2888
|
if (!p.value || !r.pluginConfigKey)
|
|
2786
2889
|
return [];
|
|
2787
|
-
const
|
|
2788
|
-
for (const j in
|
|
2789
|
-
const
|
|
2790
|
-
let X =
|
|
2791
|
-
|
|
2890
|
+
const V = p.value[r.pluginConfigKey] || {}, I = Object.keys(V).length, E = [];
|
|
2891
|
+
for (const j in V) {
|
|
2892
|
+
const B = (D = (w = r.pluginConfigSchema) == null ? void 0 : w[j]) == null ? void 0 : D.order, J = V[j];
|
|
2893
|
+
let X = J != null && J !== "" ? I - 1 : I;
|
|
2894
|
+
B && (X = B === -1 ? I + 1 : B), E.push([j, X]);
|
|
2792
2895
|
}
|
|
2793
|
-
return
|
|
2794
|
-
return j[1] -
|
|
2795
|
-
}),
|
|
2796
|
-
var
|
|
2797
|
-
const
|
|
2896
|
+
return E.sort(function(j, B) {
|
|
2897
|
+
return j[1] - B[1];
|
|
2898
|
+
}), E.map((j) => {
|
|
2899
|
+
var B;
|
|
2900
|
+
const J = j[0], X = V[J], ee = ((B = r.pluginConfigSchema) == null ? void 0 : B[J]) || {};
|
|
2798
2901
|
return {
|
|
2799
|
-
key:
|
|
2902
|
+
key: J,
|
|
2800
2903
|
value: X,
|
|
2801
2904
|
hidden: ee.hidden || !1,
|
|
2802
2905
|
type: ee.type ?? ne.Text,
|
|
2803
|
-
label: ee.label ?? s(
|
|
2906
|
+
label: ee.label ?? s(J),
|
|
2804
2907
|
tooltip: ee.tooltip ?? void 0,
|
|
2805
2908
|
section: be.Plugin
|
|
2806
2909
|
};
|
|
2807
2910
|
}).filter((j) => !j.hidden);
|
|
2808
|
-
}), b =
|
|
2809
|
-
var
|
|
2911
|
+
}), b = S(() => {
|
|
2912
|
+
var w, D, V, I;
|
|
2810
2913
|
return {
|
|
2811
|
-
basic: (
|
|
2812
|
-
advanced: (
|
|
2813
|
-
plugin: (
|
|
2914
|
+
basic: (w = A.value) == null ? void 0 : w.filter((E) => E.section === be.Basic),
|
|
2915
|
+
advanced: (D = A.value) == null ? void 0 : D.filter((E) => E.section === be.Advanced),
|
|
2916
|
+
plugin: (I = h.value) == null ? void 0 : I.concat((V = A.value) == null ? void 0 : V.filter((E) => E.section === be.Plugin))
|
|
2814
2917
|
};
|
|
2815
|
-
}),
|
|
2816
|
-
const
|
|
2817
|
-
return b.value.basic.length &&
|
|
2818
|
-
}), H = (
|
|
2819
|
-
var
|
|
2820
|
-
let
|
|
2821
|
-
return r.config.app === "konnect" ?
|
|
2822
|
-
}),
|
|
2823
|
-
p.value &&
|
|
2918
|
+
}), F = S(() => {
|
|
2919
|
+
const w = [];
|
|
2920
|
+
return b.value.basic.length && w.push("basic"), b.value.advanced.length && w.push("advanced"), b.value.plugin.length && w.push("plugin"), w;
|
|
2921
|
+
}), H = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), re = S(() => {
|
|
2922
|
+
var w, D;
|
|
2923
|
+
let V = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2924
|
+
return r.config.app === "konnect" ? V = V.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (V = V.replace(/\/{workspace}/gi, (D = r.config) != null && D.workspace ? `/${r.config.workspace}` : "")), V = V.replace(/{id}/gi, r.config.entityId), V;
|
|
2925
|
+
}), z = (w) => {
|
|
2926
|
+
p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
2824
2927
|
};
|
|
2825
|
-
return xe(g, (
|
|
2826
|
-
n("loading",
|
|
2928
|
+
return xe(g, (w) => {
|
|
2929
|
+
n("loading", w);
|
|
2827
2930
|
}, { immediate: !0 }), Qe(async () => {
|
|
2828
2931
|
k.value = !1, g.value = !0;
|
|
2829
2932
|
try {
|
|
2830
|
-
const { data:
|
|
2933
|
+
const { data: w } = await l.get(re.value);
|
|
2831
2934
|
if (r.dataKey)
|
|
2832
|
-
if (typeof
|
|
2833
|
-
p.value = { ...
|
|
2935
|
+
if (typeof w[r.dataKey] < "u")
|
|
2936
|
+
p.value = { ...w[r.dataKey] };
|
|
2834
2937
|
else
|
|
2835
2938
|
throw new Error(a("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
2836
2939
|
else
|
|
2837
|
-
p.value = { ...
|
|
2838
|
-
Object.keys(r.configSchema).filter((
|
|
2839
|
-
p.value && typeof p.value[
|
|
2840
|
-
}), n("fetch:success",
|
|
2841
|
-
} catch (
|
|
2842
|
-
const
|
|
2843
|
-
_.value =
|
|
2940
|
+
p.value = { ...w };
|
|
2941
|
+
Object.keys(r.configSchema).filter((D) => r.configSchema[D].forceShow).forEach((D) => {
|
|
2942
|
+
p.value && typeof p.value[D] > "u" && (p.value[D] = null);
|
|
2943
|
+
}), n("fetch:success", w);
|
|
2944
|
+
} catch (w) {
|
|
2945
|
+
const D = i(w);
|
|
2946
|
+
_.value = D.startsWith("code") ? a("baseConfigCard.errors.load") : D, k.value = !0, n("fetch:error", w);
|
|
2844
2947
|
} finally {
|
|
2845
2948
|
g.value = !1;
|
|
2846
2949
|
}
|
|
2847
|
-
}), (
|
|
2848
|
-
const
|
|
2849
|
-
return f(),
|
|
2950
|
+
}), (w, D) => {
|
|
2951
|
+
const V = q("KLabel"), I = q("KSelect"), E = q("KButton"), j = q("KClipboardProvider"), B = q("KSkeleton"), J = q("KEmptyState"), X = q("KCard");
|
|
2952
|
+
return f(), U(X, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
2850
2953
|
actions: v(() => [
|
|
2851
|
-
|
|
2852
|
-
Z(
|
|
2853
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
2954
|
+
P("div", gs, [
|
|
2955
|
+
Z(w.$slots, "actions", {}, void 0, !0),
|
|
2956
|
+
e.config.jsonYamlEnabled ? (f(), U(V, {
|
|
2854
2957
|
key: 0,
|
|
2855
2958
|
class: "config-format-select-label",
|
|
2856
2959
|
"data-testid": "config-format-select-label"
|
|
2857
2960
|
}, {
|
|
2858
2961
|
default: v(() => [
|
|
2859
|
-
Q(
|
|
2962
|
+
Q(O(e.label), 1)
|
|
2860
2963
|
]),
|
|
2861
2964
|
_: 1
|
|
2862
2965
|
})) : G("", !0),
|
|
2863
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
2966
|
+
e.config.jsonYamlEnabled ? (f(), U(I, {
|
|
2864
2967
|
key: 1,
|
|
2865
2968
|
appearance: "select",
|
|
2866
2969
|
"data-testid": "select-config-format",
|
|
2867
2970
|
items: u,
|
|
2868
2971
|
onChange: c
|
|
2869
2972
|
})) : G("", !0),
|
|
2870
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (f(),
|
|
2973
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (f(), U(E, {
|
|
2871
2974
|
key: 2,
|
|
2872
|
-
appearance: "
|
|
2975
|
+
appearance: "tertiary",
|
|
2873
2976
|
class: "book-icon",
|
|
2874
2977
|
"data-testid": "book-icon"
|
|
2875
2978
|
}, {
|
|
2876
2979
|
default: v(() => [
|
|
2877
|
-
|
|
2980
|
+
P("a", {
|
|
2878
2981
|
href: e.configCardDoc,
|
|
2879
2982
|
rel: "noopener",
|
|
2880
2983
|
target: "_blank"
|
|
2881
2984
|
}, [
|
|
2882
|
-
|
|
2883
|
-
], 8,
|
|
2985
|
+
N(y(fs), { size: y(ko) }, null, 8, ["size"])
|
|
2986
|
+
], 8, ys)
|
|
2884
2987
|
]),
|
|
2885
2988
|
_: 1
|
|
2886
2989
|
})) : G("", !0),
|
|
2887
|
-
e.config.jsonYamlEnabled ? G("", !0) : (f(),
|
|
2990
|
+
e.config.jsonYamlEnabled ? G("", !0) : (f(), U(j, { key: 3 }, {
|
|
2888
2991
|
default: v(({ copyToClipboard: ee }) => [
|
|
2889
|
-
!g.value && !k.value ? (f(),
|
|
2992
|
+
!g.value && !k.value ? (f(), U(E, {
|
|
2890
2993
|
key: 0,
|
|
2891
|
-
appearance: "
|
|
2994
|
+
appearance: "tertiary",
|
|
2892
2995
|
"data-testid": "json-copy-button",
|
|
2893
|
-
onClick: (te) =>
|
|
2996
|
+
onClick: (te) => z(ee)
|
|
2894
2997
|
}, {
|
|
2895
2998
|
default: v(() => [
|
|
2896
|
-
Q(
|
|
2999
|
+
Q(O(y(a)("baseConfigCard.actions.copy")), 1)
|
|
2897
3000
|
]),
|
|
2898
3001
|
_: 2
|
|
2899
3002
|
}, 1032, ["onClick"])) : G("", !0)
|
|
@@ -2903,54 +3006,54 @@ const Di = {
|
|
|
2903
3006
|
])
|
|
2904
3007
|
]),
|
|
2905
3008
|
body: v(() => [
|
|
2906
|
-
g.value ? (f(),
|
|
3009
|
+
g.value ? (f(), U(B, {
|
|
2907
3010
|
key: 0,
|
|
2908
3011
|
"data-testid": "config-card-loader",
|
|
2909
3012
|
"table-columns": 2,
|
|
2910
3013
|
type: "table"
|
|
2911
|
-
})) : k.value ? (f(),
|
|
3014
|
+
})) : k.value ? (f(), U(J, {
|
|
2912
3015
|
key: 1,
|
|
2913
3016
|
"data-testid": "config-card-fetch-error",
|
|
2914
3017
|
"is-error": ""
|
|
2915
3018
|
}, {
|
|
2916
3019
|
message: v(() => [
|
|
2917
|
-
|
|
3020
|
+
P("h3", null, O(_.value), 1)
|
|
2918
3021
|
]),
|
|
2919
3022
|
_: 1
|
|
2920
3023
|
})) : G("", !0),
|
|
2921
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
2922
|
-
|
|
3024
|
+
e.config.jsonYamlEnabled ? (f(), x("div", hs, [
|
|
3025
|
+
N(is, {
|
|
2923
3026
|
format: d.value,
|
|
2924
|
-
"prop-list-types":
|
|
3027
|
+
"prop-list-types": F.value,
|
|
2925
3028
|
"property-collections": b.value,
|
|
2926
3029
|
record: p.value
|
|
2927
3030
|
}, Te({ _: 2 }, [
|
|
2928
|
-
ye(Object.keys(
|
|
3031
|
+
ye(Object.keys(w.$slots), (ee) => ({
|
|
2929
3032
|
name: ee,
|
|
2930
3033
|
fn: v(({ row: te, rowValue: se }) => [
|
|
2931
|
-
Z(
|
|
3034
|
+
Z(w.$slots, ee, {
|
|
2932
3035
|
row: te,
|
|
2933
3036
|
rowValue: se
|
|
2934
3037
|
}, void 0, !0)
|
|
2935
3038
|
])
|
|
2936
3039
|
}))
|
|
2937
3040
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
2938
|
-
])) : (f(),
|
|
2939
|
-
(f(!0),
|
|
3041
|
+
])) : (f(), x("div", vs, [
|
|
3042
|
+
(f(!0), x(ve, null, ye(F.value, (ee) => (f(), x("div", {
|
|
2940
3043
|
key: `config-card-details-${ee}-props`,
|
|
2941
3044
|
class: Fe(`config-card-details-${ee}-props`),
|
|
2942
3045
|
"data-testid": `config-card-details-${ee}-props`
|
|
2943
3046
|
}, [
|
|
2944
|
-
ee !== "basic" ? (f(),
|
|
2945
|
-
(f(!0),
|
|
3047
|
+
ee !== "basic" ? (f(), x("div", Cs, O(ee === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
3048
|
+
(f(!0), x(ve, null, ye(b.value[ee], (te) => (f(), U(xt, {
|
|
2946
3049
|
key: te.key,
|
|
2947
3050
|
item: te
|
|
2948
3051
|
}, Te({
|
|
2949
3052
|
label: v(() => [
|
|
2950
|
-
Z(
|
|
3053
|
+
Z(w.$slots, `${te.key}-label`, { row: te }, void 0, !0)
|
|
2951
3054
|
]),
|
|
2952
3055
|
[te.key]: v(({ rowValue: se }) => [
|
|
2953
|
-
Z(
|
|
3056
|
+
Z(w.$slots, te.key, {
|
|
2954
3057
|
row: te,
|
|
2955
3058
|
rowValue: se
|
|
2956
3059
|
}, void 0, !0)
|
|
@@ -2960,12 +3063,12 @@ const Di = {
|
|
|
2960
3063
|
H(te) ? {
|
|
2961
3064
|
name: "label-tooltip",
|
|
2962
3065
|
fn: v(() => [
|
|
2963
|
-
Z(
|
|
3066
|
+
Z(w.$slots, `${te.key}-label-tooltip`, { row: te }, void 0, !0)
|
|
2964
3067
|
]),
|
|
2965
3068
|
key: "0"
|
|
2966
3069
|
} : void 0
|
|
2967
3070
|
]), 1032, ["item"]))), 128))
|
|
2968
|
-
], 10,
|
|
3071
|
+
], 10, bs))), 128))
|
|
2969
3072
|
]))
|
|
2970
3073
|
]),
|
|
2971
3074
|
_: 2
|
|
@@ -2973,9 +3076,9 @@ const Di = {
|
|
|
2973
3076
|
e.hideTitle ? void 0 : {
|
|
2974
3077
|
name: "title",
|
|
2975
3078
|
fn: v(() => [
|
|
2976
|
-
|
|
2977
|
-
Z(
|
|
2978
|
-
Q(
|
|
3079
|
+
P("div", ms, [
|
|
3080
|
+
Z(w.$slots, "title", {}, () => [
|
|
3081
|
+
Q(O(y(a)("baseConfigCard.title")), 1)
|
|
2979
3082
|
], !0)
|
|
2980
3083
|
])
|
|
2981
3084
|
]),
|
|
@@ -2984,10 +3087,10 @@ const Di = {
|
|
|
2984
3087
|
]), 1024);
|
|
2985
3088
|
};
|
|
2986
3089
|
}
|
|
2987
|
-
}),
|
|
3090
|
+
}), _s = /* @__PURE__ */ ke(ks, [["__scopeId", "data-v-24515123"]]), ws = ["onReset", "onSubmit"], As = {
|
|
2988
3091
|
class: "form-actions",
|
|
2989
3092
|
"data-testid": "form-actions"
|
|
2990
|
-
},
|
|
3093
|
+
}, Is = /* @__PURE__ */ oe({
|
|
2991
3094
|
__name: "EntityBaseForm",
|
|
2992
3095
|
props: {
|
|
2993
3096
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3039,12 +3142,12 @@ const Di = {
|
|
|
3039
3142
|
var t;
|
|
3040
3143
|
const r = e, o = wt(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: i } = ce.useErrors(), { axiosInstance: s } = ce.useAxios({
|
|
3041
3144
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3042
|
-
}), l = M(!1), u = M(!1), d = M(""), c =
|
|
3043
|
-
var p,
|
|
3145
|
+
}), l = M(!1), u = M(!1), d = M(""), c = S(() => r.canSubmit === !1 || r.isReadonly), m = S(() => {
|
|
3146
|
+
var p, A;
|
|
3044
3147
|
if (!r.editId)
|
|
3045
3148
|
return "";
|
|
3046
|
-
let
|
|
3047
|
-
return r.config.app === "konnect" ?
|
|
3149
|
+
let h = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3150
|
+
return r.config.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), h = h.replace(/{id}/gi, r.editId), h;
|
|
3048
3151
|
}), g = () => {
|
|
3049
3152
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : k();
|
|
3050
3153
|
}, k = () => {
|
|
@@ -3061,78 +3164,78 @@ const Di = {
|
|
|
3061
3164
|
const { data: p } = await s.get(m.value);
|
|
3062
3165
|
n("fetch:success", p);
|
|
3063
3166
|
} catch (p) {
|
|
3064
|
-
const
|
|
3065
|
-
d.value =
|
|
3167
|
+
const A = i(p);
|
|
3168
|
+
d.value = A.startsWith("code") ? a("baseForm.errors.edit") : A, u.value = !0, n("fetch:error", p);
|
|
3066
3169
|
} finally {
|
|
3067
3170
|
l.value = !1;
|
|
3068
3171
|
}
|
|
3069
|
-
}), (p,
|
|
3070
|
-
const
|
|
3071
|
-
return f(),
|
|
3172
|
+
}), (p, A) => {
|
|
3173
|
+
const h = q("KSkeleton"), b = q("KEmptyState"), F = q("KAlert"), H = q("KButton"), re = q("KCard");
|
|
3174
|
+
return f(), U(re, { class: "kong-ui-entity-base-form" }, {
|
|
3072
3175
|
body: v(() => [
|
|
3073
|
-
l.value ? (f(),
|
|
3176
|
+
l.value ? (f(), U(h, {
|
|
3074
3177
|
key: 0,
|
|
3075
3178
|
type: "form"
|
|
3076
|
-
})) : u.value ? (f(),
|
|
3179
|
+
})) : u.value ? (f(), U(b, {
|
|
3077
3180
|
key: 1,
|
|
3078
|
-
"cta-text":
|
|
3181
|
+
"cta-text": y(a)("baseForm.actions.back"),
|
|
3079
3182
|
"data-testid": "form-fetch-error",
|
|
3080
3183
|
"handle-click": g,
|
|
3081
3184
|
"is-error": !0
|
|
3082
3185
|
}, {
|
|
3083
3186
|
message: v(() => [
|
|
3084
|
-
|
|
3187
|
+
P("h3", null, O(d.value), 1)
|
|
3085
3188
|
]),
|
|
3086
3189
|
_: 1
|
|
3087
|
-
}, 8, ["cta-text"])) : (f(),
|
|
3190
|
+
}, 8, ["cta-text"])) : (f(), x("form", {
|
|
3088
3191
|
key: 2,
|
|
3089
3192
|
"data-testid": "form-content",
|
|
3090
3193
|
onReset: rt(k, ["prevent"]),
|
|
3091
3194
|
onSubmit: rt(_, ["prevent"])
|
|
3092
3195
|
}, [
|
|
3093
3196
|
Z(p.$slots, "default", {}, void 0, !0),
|
|
3094
|
-
e.errorMessage ? (f(),
|
|
3197
|
+
e.errorMessage ? (f(), U(F, {
|
|
3095
3198
|
key: 0,
|
|
3096
3199
|
"alert-message": e.errorMessage,
|
|
3097
3200
|
appearance: "danger",
|
|
3098
3201
|
"data-testid": "form-error"
|
|
3099
3202
|
}, null, 8, ["alert-message"])) : G("", !0),
|
|
3100
|
-
|
|
3203
|
+
P("div", As, [
|
|
3101
3204
|
Z(p.$slots, "form-actions", {}, () => [
|
|
3102
|
-
|
|
3103
|
-
appearance: "
|
|
3205
|
+
N(H, {
|
|
3206
|
+
appearance: "secondary",
|
|
3104
3207
|
"data-testid": "form-cancel",
|
|
3105
3208
|
disabled: e.isReadonly,
|
|
3106
3209
|
type: "reset"
|
|
3107
3210
|
}, {
|
|
3108
3211
|
default: v(() => [
|
|
3109
|
-
Q(
|
|
3212
|
+
Q(O(y(a)("baseForm.actions.cancel")), 1)
|
|
3110
3213
|
]),
|
|
3111
3214
|
_: 1
|
|
3112
3215
|
}, 8, ["disabled"]),
|
|
3113
|
-
|
|
3216
|
+
N(H, {
|
|
3114
3217
|
appearance: "primary",
|
|
3115
3218
|
"data-testid": "form-submit",
|
|
3116
3219
|
disabled: c.value,
|
|
3117
3220
|
type: "submit"
|
|
3118
3221
|
}, {
|
|
3119
3222
|
default: v(() => [
|
|
3120
|
-
Q(
|
|
3223
|
+
Q(O(y(a)("baseForm.actions.save")), 1)
|
|
3121
3224
|
]),
|
|
3122
3225
|
_: 1
|
|
3123
3226
|
}, 8, ["disabled"])
|
|
3124
3227
|
], !0)
|
|
3125
3228
|
])
|
|
3126
|
-
], 40,
|
|
3229
|
+
], 40, ws))
|
|
3127
3230
|
]),
|
|
3128
3231
|
_: 3
|
|
3129
3232
|
});
|
|
3130
3233
|
};
|
|
3131
3234
|
}
|
|
3132
|
-
}),
|
|
3235
|
+
}), Ss = /* @__PURE__ */ ke(Is, [["__scopeId", "data-v-81612aef"]]), xs = {
|
|
3133
3236
|
key: 0,
|
|
3134
3237
|
"data-testid": "first-col"
|
|
3135
|
-
},
|
|
3238
|
+
}, Ts = /* @__PURE__ */ oe({
|
|
3136
3239
|
__name: "EntityBaseTableCell",
|
|
3137
3240
|
props: {
|
|
3138
3241
|
keyName: {
|
|
@@ -3145,24 +3248,24 @@ const Di = {
|
|
|
3145
3248
|
}
|
|
3146
3249
|
},
|
|
3147
3250
|
setup(e) {
|
|
3148
|
-
const n = e, t =
|
|
3251
|
+
const n = e, t = S(() => {
|
|
3149
3252
|
var _;
|
|
3150
3253
|
return ((_ = n.rowEl) == null ? void 0 : _.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3151
|
-
}), r =
|
|
3254
|
+
}), r = S(() => {
|
|
3152
3255
|
var _;
|
|
3153
3256
|
return ((_ = t.value) == null ? void 0 : _.querySelector('[data-testid="first-col"]')) || null;
|
|
3154
|
-
}), o =
|
|
3257
|
+
}), o = S(() => {
|
|
3155
3258
|
var _, p;
|
|
3156
|
-
const
|
|
3157
|
-
return
|
|
3259
|
+
const A = (_ = n.rowEl) == null ? void 0 : _.querySelectorAll("td");
|
|
3260
|
+
return A ? ((p = A[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3158
3261
|
});
|
|
3159
3262
|
let a;
|
|
3160
3263
|
const i = () => {
|
|
3161
3264
|
a && (a.disconnect(), a = void 0);
|
|
3162
3265
|
}, s = () => {
|
|
3163
|
-
var _, p,
|
|
3164
|
-
u.value = ((_ = r.value) == null ? void 0 : _.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, c.value = ((
|
|
3165
|
-
}, l = M({}), u = M(0), d = M(0), c = M(""), m =
|
|
3266
|
+
var _, p, A;
|
|
3267
|
+
u.value = ((_ = r.value) == null ? void 0 : _.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, c.value = ((A = l.value) == null ? void 0 : A.innerText) || "";
|
|
3268
|
+
}, l = M({}), u = M(0), d = M(0), c = M(""), m = S(() => [r.value, t.value]), g = xe(
|
|
3166
3269
|
m,
|
|
3167
3270
|
(_) => {
|
|
3168
3271
|
if (o.value && (i(), "ResizeObserver" in window && window)) {
|
|
@@ -3176,20 +3279,20 @@ const Di = {
|
|
|
3176
3279
|
}
|
|
3177
3280
|
},
|
|
3178
3281
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3179
|
-
), k =
|
|
3180
|
-
return
|
|
3282
|
+
), k = S(() => o.value ? u.value > d.value : !1);
|
|
3283
|
+
return yr(() => {
|
|
3181
3284
|
s();
|
|
3182
|
-
}),
|
|
3285
|
+
}), hr(() => {
|
|
3183
3286
|
g();
|
|
3184
3287
|
}), (_, p) => {
|
|
3185
|
-
const
|
|
3186
|
-
return f(),
|
|
3288
|
+
const A = q("KTooltip");
|
|
3289
|
+
return f(), x("span", {
|
|
3187
3290
|
ref_key: "contentRef",
|
|
3188
3291
|
ref: l,
|
|
3189
3292
|
class: "content-wrapper"
|
|
3190
3293
|
}, [
|
|
3191
|
-
o.value ? (f(),
|
|
3192
|
-
|
|
3294
|
+
o.value ? (f(), x("span", xs, [
|
|
3295
|
+
N(A, {
|
|
3193
3296
|
label: k.value ? c.value : "",
|
|
3194
3297
|
"max-width": "300",
|
|
3195
3298
|
placement: "bottomStart"
|
|
@@ -3203,10 +3306,10 @@ const Di = {
|
|
|
3203
3306
|
], 512);
|
|
3204
3307
|
};
|
|
3205
3308
|
}
|
|
3206
|
-
}),
|
|
3309
|
+
}), $s = /* @__PURE__ */ ke(Ts, [["__scopeId", "data-v-e42a20c9"]]), js = { class: "toolbar-container" }, Ms = {
|
|
3207
3310
|
key: 0,
|
|
3208
3311
|
class: "toolbar-button-container"
|
|
3209
|
-
},
|
|
3312
|
+
}, Es = ["data-testid"], Os = /* @__PURE__ */ oe({
|
|
3210
3313
|
__name: "EntityBaseTable",
|
|
3211
3314
|
props: {
|
|
3212
3315
|
// table header configuration
|
|
@@ -3315,13 +3418,13 @@ const Di = {
|
|
|
3315
3418
|
},
|
|
3316
3419
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3317
3420
|
setup(e, { emit: n }) {
|
|
3318
|
-
const t = e, { i18n: { t: r } } = ce.useI18n(), o =
|
|
3421
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = S(() => t.cacheIdentifier || t.preferencesStorageKey), a = (b) => b.hasData || !!t.query, i = S(() => {
|
|
3319
3422
|
const b = [];
|
|
3320
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3321
|
-
const H = t.tableHeaders[
|
|
3423
|
+
return Object.keys(t.tableHeaders).forEach((F) => {
|
|
3424
|
+
const H = t.tableHeaders[F];
|
|
3322
3425
|
b.push({
|
|
3323
|
-
label: H.label ??
|
|
3324
|
-
key:
|
|
3426
|
+
label: H.label ?? F,
|
|
3427
|
+
key: F,
|
|
3325
3428
|
sortable: H.sortable ?? !1
|
|
3326
3429
|
});
|
|
3327
3430
|
}), t.enableEntityActions && b.push({
|
|
@@ -3333,43 +3436,43 @@ const Di = {
|
|
|
3333
3436
|
"data-testid": b.name,
|
|
3334
3437
|
...t.rowAttributes(b)
|
|
3335
3438
|
}), l = M({}), u = (b) => {
|
|
3336
|
-
var
|
|
3337
|
-
return (
|
|
3439
|
+
var F;
|
|
3440
|
+
return (F = l.value) == null ? void 0 : F.$el.querySelector(`[data-rowid="${b.id}"]`);
|
|
3338
3441
|
}, d = (b) => {
|
|
3339
|
-
const
|
|
3442
|
+
const F = {
|
|
3340
3443
|
"data-testid": b.headerKey,
|
|
3341
3444
|
...t.cellAttributes(b)
|
|
3342
3445
|
};
|
|
3343
|
-
return b.colIndex === 0 && (
|
|
3446
|
+
return b.colIndex === 0 && (F.style = {
|
|
3344
3447
|
maxWidth: "250px",
|
|
3345
3448
|
overflowX: "hidden",
|
|
3346
3449
|
textOverflow: "ellipsis"
|
|
3347
|
-
}),
|
|
3450
|
+
}), F;
|
|
3348
3451
|
}, c = () => {
|
|
3349
3452
|
n("empty-state-cta-clicked"), m();
|
|
3350
3453
|
}, m = () => {
|
|
3351
3454
|
n("clear-search-input");
|
|
3352
|
-
}, g =
|
|
3353
|
-
n("click:row",
|
|
3455
|
+
}, g = S(() => t.disableRowClick ? void 0 : (b, F) => {
|
|
3456
|
+
n("click:row", F);
|
|
3354
3457
|
}), k = (b) => {
|
|
3355
3458
|
n("sort", b);
|
|
3356
|
-
}, { setTablePreferences: _, getTablePreferences: p } =
|
|
3459
|
+
}, { setTablePreferences: _, getTablePreferences: p } = Sr(), A = S(() => {
|
|
3357
3460
|
const b = p(t.preferencesStorageKey);
|
|
3358
3461
|
return {
|
|
3359
3462
|
...t.initialFetcherParams,
|
|
3360
3463
|
...b
|
|
3361
3464
|
};
|
|
3362
|
-
}),
|
|
3465
|
+
}), h = (b) => {
|
|
3363
3466
|
t.preferencesStorageKey && _(t.preferencesStorageKey, b);
|
|
3364
3467
|
};
|
|
3365
|
-
return (b,
|
|
3366
|
-
const H =
|
|
3367
|
-
return f(),
|
|
3468
|
+
return (b, F) => {
|
|
3469
|
+
const H = q("KIcon"), re = q("KButton"), z = q("KDropdown"), w = q("KTable"), D = q("KCard");
|
|
3470
|
+
return f(), U(D, {
|
|
3368
3471
|
class: "kong-ui-entity-base-table",
|
|
3369
3472
|
title: e.title
|
|
3370
3473
|
}, {
|
|
3371
3474
|
body: v(() => [
|
|
3372
|
-
|
|
3475
|
+
N(w, {
|
|
3373
3476
|
ref_key: "tableRefs",
|
|
3374
3477
|
ref: l,
|
|
3375
3478
|
"cache-identifier": o.value,
|
|
@@ -3377,12 +3480,12 @@ const Di = {
|
|
|
3377
3480
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3378
3481
|
"disable-sorting": e.disableSorting,
|
|
3379
3482
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
3380
|
-
"empty-state-action-message": e.query ?
|
|
3483
|
+
"empty-state-action-message": e.query ? y(r)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3381
3484
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
3382
3485
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
3383
3486
|
"empty-state-icon-size": "96",
|
|
3384
|
-
"empty-state-message": e.query ?
|
|
3385
|
-
"empty-state-title": e.query ?
|
|
3487
|
+
"empty-state-message": e.query ? y(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3488
|
+
"empty-state-title": e.query ? y(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3386
3489
|
"enable-client-sort": e.enableClientSort,
|
|
3387
3490
|
"error-state-title": e.errorMessage,
|
|
3388
3491
|
fetcher: e.fetcher,
|
|
@@ -3390,51 +3493,51 @@ const Di = {
|
|
|
3390
3493
|
"has-error": !!e.errorMessage,
|
|
3391
3494
|
headers: i.value,
|
|
3392
3495
|
"hide-pagination-when-optional": "",
|
|
3393
|
-
"initial-fetcher-params":
|
|
3496
|
+
"initial-fetcher-params": A.value,
|
|
3394
3497
|
"is-loading": e.isLoading,
|
|
3395
3498
|
"pagination-type": e.paginationType,
|
|
3396
3499
|
"row-attrs": s,
|
|
3397
3500
|
"search-input": e.query,
|
|
3398
3501
|
onKtableEmptyStateCtaClicked: c,
|
|
3399
3502
|
"onRow:click": g.value,
|
|
3400
|
-
onSort:
|
|
3401
|
-
"onUpdate:tablePreferences":
|
|
3503
|
+
onSort: F[0] || (F[0] = (V) => k(V)),
|
|
3504
|
+
"onUpdate:tablePreferences": h
|
|
3402
3505
|
}, Te({
|
|
3403
|
-
toolbar: v(({ state:
|
|
3404
|
-
et(
|
|
3506
|
+
toolbar: v(({ state: V }) => [
|
|
3507
|
+
et(P("div", js, [
|
|
3405
3508
|
Z(b.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3406
|
-
b.$slots["toolbar-button"] ? (f(),
|
|
3509
|
+
b.$slots["toolbar-button"] ? (f(), x("div", Ms, [
|
|
3407
3510
|
Z(b.$slots, "toolbar-button", {}, void 0, !0)
|
|
3408
3511
|
])) : G("", !0)
|
|
3409
3512
|
], 512), [
|
|
3410
|
-
[tt, a(
|
|
3513
|
+
[tt, a(V)]
|
|
3411
3514
|
])
|
|
3412
3515
|
]),
|
|
3413
|
-
actions: v(({ row:
|
|
3414
|
-
|
|
3516
|
+
actions: v(({ row: V, rowKey: I, rowValue: E }) => [
|
|
3517
|
+
P("div", {
|
|
3415
3518
|
class: "actions-container",
|
|
3416
|
-
"data-testid":
|
|
3519
|
+
"data-testid": V.name
|
|
3417
3520
|
}, [
|
|
3418
|
-
|
|
3521
|
+
N(z, {
|
|
3419
3522
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3420
3523
|
width: e.dropdownMenuWidth
|
|
3421
3524
|
}, {
|
|
3422
3525
|
items: v(() => [
|
|
3423
3526
|
Z(b.$slots, "actions", {
|
|
3424
|
-
row:
|
|
3425
|
-
rowKey:
|
|
3426
|
-
rowValue:
|
|
3527
|
+
row: V,
|
|
3528
|
+
rowKey: I,
|
|
3529
|
+
rowValue: E
|
|
3427
3530
|
}, void 0, !0)
|
|
3428
3531
|
]),
|
|
3429
3532
|
default: v(() => [
|
|
3430
|
-
|
|
3533
|
+
N(re, {
|
|
3431
3534
|
class: "actions-trigger",
|
|
3432
3535
|
"data-testid": "overflow-actions-button",
|
|
3433
3536
|
size: "small"
|
|
3434
3537
|
}, {
|
|
3435
3538
|
icon: v(() => [
|
|
3436
|
-
|
|
3437
|
-
color:
|
|
3539
|
+
N(H, {
|
|
3540
|
+
color: y(bo),
|
|
3438
3541
|
icon: "more",
|
|
3439
3542
|
size: "16"
|
|
3440
3543
|
}, null, 8, ["color"])
|
|
@@ -3444,24 +3547,24 @@ const Di = {
|
|
|
3444
3547
|
]),
|
|
3445
3548
|
_: 2
|
|
3446
3549
|
}, 1032, ["width"])
|
|
3447
|
-
], 8,
|
|
3550
|
+
], 8, Es)
|
|
3448
3551
|
]),
|
|
3449
3552
|
_: 2
|
|
3450
3553
|
}, [
|
|
3451
|
-
ye(e.tableHeaders, (
|
|
3452
|
-
name:
|
|
3453
|
-
fn: v(({ row:
|
|
3454
|
-
|
|
3455
|
-
"key-name": String(
|
|
3456
|
-
"row-el": u(
|
|
3554
|
+
ye(e.tableHeaders, (V, I) => ({
|
|
3555
|
+
name: I,
|
|
3556
|
+
fn: v(({ row: E, rowKey: j, rowValue: B }) => [
|
|
3557
|
+
N($s, {
|
|
3558
|
+
"key-name": String(I),
|
|
3559
|
+
"row-el": u(E)
|
|
3457
3560
|
}, {
|
|
3458
3561
|
default: v(() => [
|
|
3459
|
-
Z(b.$slots,
|
|
3460
|
-
row:
|
|
3562
|
+
Z(b.$slots, I, {
|
|
3563
|
+
row: E,
|
|
3461
3564
|
rowKey: j,
|
|
3462
|
-
rowValue:
|
|
3565
|
+
rowValue: B
|
|
3463
3566
|
}, () => [
|
|
3464
|
-
Q(
|
|
3567
|
+
Q(O(B), 1)
|
|
3465
3568
|
], !0)
|
|
3466
3569
|
]),
|
|
3467
3570
|
_: 2
|
|
@@ -3474,13 +3577,13 @@ const Di = {
|
|
|
3474
3577
|
}, 8, ["title"]);
|
|
3475
3578
|
};
|
|
3476
3579
|
}
|
|
3477
|
-
}),
|
|
3580
|
+
}), Ns = /* @__PURE__ */ ke(Os, [["__scopeId", "data-v-86d2d2a3"]]), Fs = {
|
|
3478
3581
|
key: 0,
|
|
3479
3582
|
class: "kong-ui-entity-delete-error"
|
|
3480
|
-
},
|
|
3583
|
+
}, Bs = {
|
|
3481
3584
|
key: 1,
|
|
3482
3585
|
class: "description"
|
|
3483
|
-
},
|
|
3586
|
+
}, Ks = /* @__PURE__ */ oe({
|
|
3484
3587
|
__name: "EntityDeleteModal",
|
|
3485
3588
|
props: {
|
|
3486
3589
|
visible: {
|
|
@@ -3519,14 +3622,14 @@ const Di = {
|
|
|
3519
3622
|
},
|
|
3520
3623
|
emits: ["cancel", "proceed"],
|
|
3521
3624
|
setup(e, { emit: n }) {
|
|
3522
|
-
const t = e, { i18nT: r } = ce.useI18n(), o =
|
|
3625
|
+
const t = e, { i18nT: r } = ce.useI18n(), o = S(() => t.needConfirm ? t.entityName : ""), a = () => {
|
|
3523
3626
|
n("cancel");
|
|
3524
3627
|
}, i = () => {
|
|
3525
3628
|
n("proceed");
|
|
3526
3629
|
};
|
|
3527
3630
|
return (s, l) => {
|
|
3528
|
-
const u =
|
|
3529
|
-
return f(),
|
|
3631
|
+
const u = q("KAlert"), d = q("KPrompt");
|
|
3632
|
+
return f(), U(d, {
|
|
3530
3633
|
"action-button-text": "Yes, delete",
|
|
3531
3634
|
"action-pending": e.actionPending,
|
|
3532
3635
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3538,35 +3641,35 @@ const Di = {
|
|
|
3538
3641
|
onProceed: i
|
|
3539
3642
|
}, {
|
|
3540
3643
|
"body-content": v(() => [
|
|
3541
|
-
e.error ? (f(),
|
|
3542
|
-
|
|
3644
|
+
e.error ? (f(), x("div", Fs, [
|
|
3645
|
+
N(u, { appearance: "danger" }, {
|
|
3543
3646
|
alertMessage: v(() => [
|
|
3544
|
-
Q(
|
|
3647
|
+
Q(O(e.error), 1)
|
|
3545
3648
|
]),
|
|
3546
3649
|
_: 1
|
|
3547
3650
|
})
|
|
3548
3651
|
])) : G("", !0),
|
|
3549
|
-
|
|
3652
|
+
N(y(r), {
|
|
3550
3653
|
class: "message",
|
|
3551
3654
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3552
3655
|
tag: "p"
|
|
3553
3656
|
}, Te({
|
|
3554
3657
|
entityType: v(() => [
|
|
3555
|
-
Q(
|
|
3658
|
+
Q(O(t.entityType), 1)
|
|
3556
3659
|
]),
|
|
3557
3660
|
_: 2
|
|
3558
3661
|
}, [
|
|
3559
3662
|
t.entityName ? {
|
|
3560
3663
|
name: "entityName",
|
|
3561
3664
|
fn: v(() => [
|
|
3562
|
-
|
|
3665
|
+
P("strong", null, O(t.entityName), 1)
|
|
3563
3666
|
]),
|
|
3564
3667
|
key: "0"
|
|
3565
3668
|
} : void 0
|
|
3566
3669
|
]), 1032, ["keypath"]),
|
|
3567
|
-
t.description || s.$slots.description ? (f(),
|
|
3670
|
+
t.description || s.$slots.description ? (f(), x("div", Bs, [
|
|
3568
3671
|
Z(s.$slots, "description", {}, () => [
|
|
3569
|
-
|
|
3672
|
+
P("p", null, O(t.description), 1)
|
|
3570
3673
|
], !0)
|
|
3571
3674
|
])) : G("", !0)
|
|
3572
3675
|
]),
|
|
@@ -3574,13 +3677,13 @@ const Di = {
|
|
|
3574
3677
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3575
3678
|
};
|
|
3576
3679
|
}
|
|
3577
|
-
}),
|
|
3680
|
+
}), qs = /* @__PURE__ */ ke(Ks, [["__scopeId", "data-v-1c9a2a07"]]), Ls = {
|
|
3578
3681
|
fill: "none",
|
|
3579
3682
|
height: "20",
|
|
3580
3683
|
viewBox: "0 0 20 20",
|
|
3581
3684
|
width: "20",
|
|
3582
3685
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3583
|
-
},
|
|
3686
|
+
}, Ps = {
|
|
3584
3687
|
id: "mask0_180_20349",
|
|
3585
3688
|
height: "20",
|
|
3586
3689
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3588,35 +3691,35 @@ const Di = {
|
|
|
3588
3691
|
width: "20",
|
|
3589
3692
|
x: "0",
|
|
3590
3693
|
y: "0"
|
|
3591
|
-
},
|
|
3694
|
+
}, Vs = ["fill"], Us = { mask: "url(#mask0_180_20349)" }, Ds = ["fill"], cn = /* @__PURE__ */ oe({
|
|
3592
3695
|
__name: "IconFilter",
|
|
3593
3696
|
props: {
|
|
3594
3697
|
color: {
|
|
3595
3698
|
type: String,
|
|
3596
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3699
|
+
default: `var(--kong-ui-entity-filter-color, ${ho})`
|
|
3597
3700
|
}
|
|
3598
3701
|
},
|
|
3599
3702
|
setup(e) {
|
|
3600
|
-
return (n, t) => (f(),
|
|
3601
|
-
|
|
3602
|
-
|
|
3703
|
+
return (n, t) => (f(), x("svg", Ls, [
|
|
3704
|
+
P("mask", Ps, [
|
|
3705
|
+
P("rect", {
|
|
3603
3706
|
fill: e.color,
|
|
3604
3707
|
height: "20",
|
|
3605
3708
|
width: "20"
|
|
3606
|
-
}, null, 8,
|
|
3709
|
+
}, null, 8, Vs)
|
|
3607
3710
|
]),
|
|
3608
|
-
|
|
3609
|
-
|
|
3711
|
+
P("g", Us, [
|
|
3712
|
+
P("path", {
|
|
3610
3713
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3611
3714
|
fill: e.color
|
|
3612
|
-
}, null, 8,
|
|
3715
|
+
}, null, 8, Ds)
|
|
3613
3716
|
])
|
|
3614
3717
|
]));
|
|
3615
3718
|
}
|
|
3616
|
-
}),
|
|
3719
|
+
}), Rs = {
|
|
3617
3720
|
key: 1,
|
|
3618
3721
|
class: "kong-ui-entity-filter"
|
|
3619
|
-
},
|
|
3722
|
+
}, Gs = { class: "menu-item-title" }, Hs = { class: "menu-item-indicator" }, zs = { class: "menu-item-body" }, Ys = ["for"], Js = { class: "menu-item-buttons" }, Ws = { class: "filter-clear-button-container" }, Zs = /* @__PURE__ */ oe({
|
|
3620
3723
|
__name: "EntityFilter",
|
|
3621
3724
|
props: {
|
|
3622
3725
|
// filter config, either exact match or fuzzy match
|
|
@@ -3636,21 +3739,21 @@ const Di = {
|
|
|
3636
3739
|
},
|
|
3637
3740
|
emits: ["update:modelValue"],
|
|
3638
3741
|
setup(e, { emit: n }) {
|
|
3639
|
-
const t = e, { i18n: { t: r } } = ce.useI18n(), o = M(!1), a = M({}), i =
|
|
3742
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = M(!1), a = M({}), i = S(() => {
|
|
3640
3743
|
const p = [];
|
|
3641
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3642
|
-
|
|
3744
|
+
return new URLSearchParams(t.modelValue).forEach((A, h) => {
|
|
3745
|
+
A !== "" && p.push(h);
|
|
3643
3746
|
}), p;
|
|
3644
|
-
}), s =
|
|
3747
|
+
}), s = S(() => {
|
|
3645
3748
|
const p = t.config.fields;
|
|
3646
|
-
return Object.keys(p).filter((
|
|
3647
|
-
label: p[
|
|
3648
|
-
value:
|
|
3749
|
+
return Object.keys(p).filter((A) => p[A].searchable).map((A) => ({
|
|
3750
|
+
label: p[A].label || A,
|
|
3751
|
+
value: A
|
|
3649
3752
|
}));
|
|
3650
3753
|
});
|
|
3651
3754
|
xe(() => t.modelValue, (p) => {
|
|
3652
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3653
|
-
a.value[
|
|
3755
|
+
a.value = {}, new URLSearchParams(p).forEach((A, h) => {
|
|
3756
|
+
a.value[h] = A;
|
|
3654
3757
|
});
|
|
3655
3758
|
});
|
|
3656
3759
|
const l = () => {
|
|
@@ -3658,14 +3761,14 @@ const Di = {
|
|
|
3658
3761
|
}, u = (p) => {
|
|
3659
3762
|
n("update:modelValue", p);
|
|
3660
3763
|
}, d = (p) => `filter-${p}`, c = (p) => {
|
|
3661
|
-
var
|
|
3662
|
-
return (((
|
|
3764
|
+
var A, h;
|
|
3765
|
+
return (((h = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : h.values) ?? []).map((b) => ({
|
|
3663
3766
|
value: b,
|
|
3664
3767
|
label: b
|
|
3665
3768
|
}));
|
|
3666
3769
|
}, m = (p) => {
|
|
3667
|
-
var
|
|
3668
|
-
return ((
|
|
3770
|
+
var A, h;
|
|
3771
|
+
return ((h = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : h.type) ?? "text";
|
|
3669
3772
|
}, g = (p) => {
|
|
3670
3773
|
a.value = {
|
|
3671
3774
|
...a.value,
|
|
@@ -3674,12 +3777,12 @@ const Di = {
|
|
|
3674
3777
|
}, k = () => {
|
|
3675
3778
|
a.value = {}, _(!0);
|
|
3676
3779
|
}, _ = (p = !1) => {
|
|
3677
|
-
const
|
|
3678
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3780
|
+
const A = Object.keys(a.value).reduce((h, b) => (a.value[b] && (h[b] = `${a.value[b]}`), h), {});
|
|
3781
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(A).toString());
|
|
3679
3782
|
};
|
|
3680
|
-
return (p,
|
|
3681
|
-
const
|
|
3682
|
-
return e.config.isExactMatch ? (f(),
|
|
3783
|
+
return (p, A) => {
|
|
3784
|
+
const h = q("KInput"), b = q("KButton"), F = q("KSelect"), H = q("KMenuItem"), re = q("KMenu");
|
|
3785
|
+
return e.config.isExactMatch ? (f(), U(h, {
|
|
3683
3786
|
key: 0,
|
|
3684
3787
|
autocomplete: "off",
|
|
3685
3788
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3688,91 +3791,90 @@ const Di = {
|
|
|
3688
3791
|
placeholder: e.config.placeholder,
|
|
3689
3792
|
"onUpdate:modelValue": u
|
|
3690
3793
|
}, {
|
|
3691
|
-
|
|
3692
|
-
|
|
3794
|
+
before: v(() => [
|
|
3795
|
+
N(cn)
|
|
3693
3796
|
]),
|
|
3694
3797
|
_: 1
|
|
3695
|
-
}, 8, ["model-value", "placeholder"])) : (f(),
|
|
3696
|
-
|
|
3697
|
-
appearance: "
|
|
3798
|
+
}, 8, ["model-value", "placeholder"])) : (f(), x("div", Rs, [
|
|
3799
|
+
N(b, {
|
|
3800
|
+
appearance: "tertiary",
|
|
3698
3801
|
"data-testid": "filter-button",
|
|
3699
|
-
icon: "filter",
|
|
3700
3802
|
onClick: l
|
|
3701
3803
|
}, {
|
|
3702
3804
|
default: v(() => [
|
|
3703
|
-
|
|
3805
|
+
N(cn),
|
|
3806
|
+
Q(" " + O(y(r)("filter.filterButtonText")) + " " + O(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3704
3807
|
]),
|
|
3705
3808
|
_: 1
|
|
3706
3809
|
}),
|
|
3707
|
-
et(
|
|
3810
|
+
et(P("div", {
|
|
3708
3811
|
class: "kong-ui-entity-filter-backdrop",
|
|
3709
3812
|
onClick: l
|
|
3710
3813
|
}, null, 512), [
|
|
3711
3814
|
[tt, o.value]
|
|
3712
3815
|
]),
|
|
3713
|
-
et(
|
|
3816
|
+
et(N(re, { class: "kong-ui-entity-filter-menu" }, {
|
|
3714
3817
|
body: v(() => [
|
|
3715
|
-
(f(!0),
|
|
3716
|
-
key:
|
|
3717
|
-
"data-testid":
|
|
3818
|
+
(f(!0), x(ve, null, ye(s.value, (z, w) => (f(), U(H, {
|
|
3819
|
+
key: z.value,
|
|
3820
|
+
"data-testid": z.value,
|
|
3718
3821
|
expandable: "",
|
|
3719
|
-
"last-menu-item":
|
|
3822
|
+
"last-menu-item": w === s.value.length - 1
|
|
3720
3823
|
}, {
|
|
3721
3824
|
itemTitle: v(() => [
|
|
3722
|
-
|
|
3723
|
-
Q(
|
|
3724
|
-
et(
|
|
3725
|
-
[tt, i.value.includes(
|
|
3825
|
+
P("span", Gs, [
|
|
3826
|
+
Q(O(z.label) + " ", 1),
|
|
3827
|
+
et(P("span", Hs, null, 512), [
|
|
3828
|
+
[tt, i.value.includes(z.value)]
|
|
3726
3829
|
])
|
|
3727
3830
|
])
|
|
3728
3831
|
]),
|
|
3729
3832
|
itemBody: v(() => {
|
|
3730
|
-
var
|
|
3833
|
+
var D, V;
|
|
3731
3834
|
return [
|
|
3732
|
-
|
|
3733
|
-
|
|
3835
|
+
P("div", zs, [
|
|
3836
|
+
P("label", {
|
|
3734
3837
|
class: "menu-item-label",
|
|
3735
|
-
for: d(
|
|
3736
|
-
},
|
|
3737
|
-
((
|
|
3838
|
+
for: d(z.value)
|
|
3839
|
+
}, O(y(r)("filter.fieldLabel")), 9, Ys),
|
|
3840
|
+
((V = (D = e.config.schema) == null ? void 0 : D[z.value]) == null ? void 0 : V.type) === "select" ? (f(), U(F, {
|
|
3738
3841
|
key: 0,
|
|
3739
|
-
id: d(
|
|
3740
|
-
modelValue: a.value[
|
|
3741
|
-
"onUpdate:modelValue": (
|
|
3842
|
+
id: d(z.value),
|
|
3843
|
+
modelValue: a.value[z.value],
|
|
3844
|
+
"onUpdate:modelValue": (I) => a.value[z.value] = I,
|
|
3742
3845
|
appearance: "select",
|
|
3743
|
-
items: c(
|
|
3744
|
-
placeholder:
|
|
3745
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(),
|
|
3846
|
+
items: c(z.value),
|
|
3847
|
+
placeholder: y(r)("filter.selectPlaceholder")
|
|
3848
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(), U(h, {
|
|
3746
3849
|
key: 1,
|
|
3747
|
-
id: d(
|
|
3748
|
-
modelValue: a.value[
|
|
3749
|
-
"onUpdate:modelValue": (
|
|
3850
|
+
id: d(z.value),
|
|
3851
|
+
modelValue: a.value[z.value],
|
|
3852
|
+
"onUpdate:modelValue": (I) => a.value[z.value] = I,
|
|
3750
3853
|
autocomplete: "off",
|
|
3751
|
-
placeholder:
|
|
3752
|
-
|
|
3753
|
-
type: m(J.value)
|
|
3854
|
+
placeholder: y(r)("filter.inputPlaceholder"),
|
|
3855
|
+
type: m(z.value)
|
|
3754
3856
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3755
3857
|
]),
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
appearance: "
|
|
3858
|
+
P("div", Js, [
|
|
3859
|
+
N(b, {
|
|
3860
|
+
appearance: "tertiary",
|
|
3759
3861
|
"data-testid": "apply-filter",
|
|
3760
3862
|
size: "small",
|
|
3761
|
-
onClick:
|
|
3863
|
+
onClick: A[0] || (A[0] = (I) => _(!0))
|
|
3762
3864
|
}, {
|
|
3763
3865
|
default: v(() => [
|
|
3764
|
-
Q(
|
|
3866
|
+
Q(O(y(r)("filter.applyButtonText")), 1)
|
|
3765
3867
|
]),
|
|
3766
3868
|
_: 1
|
|
3767
3869
|
}),
|
|
3768
|
-
|
|
3769
|
-
appearance: "
|
|
3870
|
+
N(b, {
|
|
3871
|
+
appearance: "tertiary",
|
|
3770
3872
|
"data-testid": "clear-filter",
|
|
3771
3873
|
size: "small",
|
|
3772
|
-
onClick: (
|
|
3874
|
+
onClick: (I) => g(z.value)
|
|
3773
3875
|
}, {
|
|
3774
3876
|
default: v(() => [
|
|
3775
|
-
Q(
|
|
3877
|
+
Q(O(y(r)("filter.clearButtonText")), 1)
|
|
3776
3878
|
]),
|
|
3777
3879
|
_: 2
|
|
3778
3880
|
}, 1032, ["onClick"])
|
|
@@ -3783,12 +3885,17 @@ const Di = {
|
|
|
3783
3885
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3784
3886
|
]),
|
|
3785
3887
|
actionButton: v(() => [
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3888
|
+
P("div", Ws, [
|
|
3889
|
+
N(b, {
|
|
3890
|
+
size: "small",
|
|
3891
|
+
onClick: k
|
|
3892
|
+
}, {
|
|
3893
|
+
default: v(() => [
|
|
3894
|
+
Q(O(y(r)("filter.clearAllButtonText")), 1)
|
|
3895
|
+
]),
|
|
3896
|
+
_: 1
|
|
3897
|
+
})
|
|
3898
|
+
])
|
|
3792
3899
|
]),
|
|
3793
3900
|
_: 1
|
|
3794
3901
|
}, 512), [
|
|
@@ -3797,7 +3904,7 @@ const Di = {
|
|
|
3797
3904
|
]));
|
|
3798
3905
|
};
|
|
3799
3906
|
}
|
|
3800
|
-
}),
|
|
3907
|
+
}), Qs = /* @__PURE__ */ ke(Zs, [["__scopeId", "data-v-4ea260f0"]]), Xe = /* @__PURE__ */ oe({
|
|
3801
3908
|
__name: "PermissionsWrapper",
|
|
3802
3909
|
props: {
|
|
3803
3910
|
/**
|
|
@@ -3819,7 +3926,7 @@ const Di = {
|
|
|
3819
3926
|
}
|
|
3820
3927
|
},
|
|
3821
3928
|
setup(e) {
|
|
3822
|
-
const n = e, t = M(void 0), r =
|
|
3929
|
+
const n = e, t = M(void 0), r = S(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
3823
3930
|
return xe(() => n.authFunction, async () => {
|
|
3824
3931
|
t.value = await n.authFunction();
|
|
3825
3932
|
}, { immediate: !0 }), (o, a) => r.value ? Z(o.$slots, "default", {
|
|
@@ -3827,16 +3934,16 @@ const Di = {
|
|
|
3827
3934
|
isAllowed: t.value
|
|
3828
3935
|
}) : G("", !0);
|
|
3829
3936
|
}
|
|
3830
|
-
}),
|
|
3937
|
+
}), Xs = { class: "form-section-wrapper" }, el = {
|
|
3831
3938
|
key: 0,
|
|
3832
3939
|
class: "form-section-title"
|
|
3833
|
-
},
|
|
3940
|
+
}, tl = {
|
|
3834
3941
|
key: 1,
|
|
3835
3942
|
class: "form-section-description"
|
|
3836
|
-
},
|
|
3943
|
+
}, nl = {
|
|
3837
3944
|
key: 2,
|
|
3838
3945
|
class: "form-section-footer"
|
|
3839
|
-
},
|
|
3946
|
+
}, rl = { class: "form-section-content" }, ol = /* @__PURE__ */ oe({
|
|
3840
3947
|
__name: "EntityFormSection",
|
|
3841
3948
|
props: {
|
|
3842
3949
|
title: {
|
|
@@ -3862,35 +3969,35 @@ const Di = {
|
|
|
3862
3969
|
},
|
|
3863
3970
|
setup(e) {
|
|
3864
3971
|
const n = ut();
|
|
3865
|
-
return (t, r) => (f(),
|
|
3972
|
+
return (t, r) => (f(), x("fieldset", {
|
|
3866
3973
|
class: Fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
3867
3974
|
}, [
|
|
3868
|
-
|
|
3869
|
-
e.hideInfoHeader ? G("", !0) : (f(),
|
|
3975
|
+
P("div", Xs, [
|
|
3976
|
+
e.hideInfoHeader ? G("", !0) : (f(), x("div", {
|
|
3870
3977
|
key: 0,
|
|
3871
3978
|
class: Fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3872
3979
|
}, [
|
|
3873
|
-
e.title ? (f(),
|
|
3874
|
-
e.description ||
|
|
3980
|
+
e.title ? (f(), x("h4", el, O(e.title), 1)) : G("", !0),
|
|
3981
|
+
e.description || y(n).description ? (f(), x("div", tl, [
|
|
3875
3982
|
Z(t.$slots, "description", {}, () => [
|
|
3876
|
-
|
|
3983
|
+
P("p", null, O(e.description), 1)
|
|
3877
3984
|
], !0)
|
|
3878
3985
|
])) : G("", !0),
|
|
3879
|
-
|
|
3986
|
+
y(n).footer ? (f(), x("div", nl, [
|
|
3880
3987
|
Z(t.$slots, "footer", {}, void 0, !0)
|
|
3881
3988
|
])) : G("", !0)
|
|
3882
3989
|
], 2)),
|
|
3883
|
-
|
|
3990
|
+
P("div", rl, [
|
|
3884
3991
|
Z(t.$slots, "default", {}, void 0, !0)
|
|
3885
3992
|
])
|
|
3886
3993
|
])
|
|
3887
3994
|
], 2));
|
|
3888
3995
|
}
|
|
3889
|
-
}),
|
|
3890
|
-
const
|
|
3996
|
+
}), dn = /* @__PURE__ */ ke(ol, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Nt, useDeleteUrlBuilder: al, useErrors: il, useFetchUrlBuilder: xl, useFetcher: sl, useDebouncedFilter: ur, useStringHelpers: Tl, useHelpers: $l, useGatewayFeatureSupported: jl, useTruncationDetector: Ml } = ce;
|
|
3997
|
+
const ll = { class: "add-to-group-form-container" }, ul = { class: "add-to-group-cta-text" }, cl = {
|
|
3891
3998
|
key: 0,
|
|
3892
3999
|
class: "kong-ui-entity-add-to-groups-error"
|
|
3893
|
-
},
|
|
4000
|
+
}, dl = { key: 0 }, pl = /* @__PURE__ */ oe({
|
|
3894
4001
|
__name: "AddToGroupModal",
|
|
3895
4002
|
props: {
|
|
3896
4003
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3907,9 +4014,9 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3907
4014
|
},
|
|
3908
4015
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
3909
4016
|
setup(e, { emit: n }) {
|
|
3910
|
-
var
|
|
3911
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } =
|
|
3912
|
-
headers: (
|
|
4017
|
+
var V;
|
|
4018
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } = Nt({
|
|
4019
|
+
headers: (V = t.config) == null ? void 0 : V.requestHeaders
|
|
3913
4020
|
}), a = M([]), {
|
|
3914
4021
|
debouncedQueryChange: i,
|
|
3915
4022
|
loading: s,
|
|
@@ -3917,7 +4024,7 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3917
4024
|
error: u,
|
|
3918
4025
|
loadItems: d,
|
|
3919
4026
|
results: c
|
|
3920
|
-
} =
|
|
4027
|
+
} = ur(
|
|
3921
4028
|
t.config,
|
|
3922
4029
|
$e.list[t.config.app].all,
|
|
3923
4030
|
"",
|
|
@@ -3925,97 +4032,97 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3925
4032
|
fetchedItemsKey: "data",
|
|
3926
4033
|
searchKeys: ["name", "id"]
|
|
3927
4034
|
}
|
|
3928
|
-
), m =
|
|
3929
|
-
label:
|
|
3930
|
-
value:
|
|
3931
|
-
selected: a.value.includes(
|
|
3932
|
-
data:
|
|
4035
|
+
), m = S(() => u.value ? r("consumer_groups.errors.general") : ""), g = M(0), k = S(() => l.value === void 0), _ = S(() => c.value.map((I) => ({
|
|
4036
|
+
label: I.name,
|
|
4037
|
+
value: I.id,
|
|
4038
|
+
selected: a.value.includes(I.id),
|
|
4039
|
+
data: I
|
|
3933
4040
|
// we need this to determine whether or not to show the description text
|
|
3934
|
-
}))), p = (
|
|
4041
|
+
}))), p = (I) => {
|
|
3935
4042
|
var j;
|
|
3936
|
-
const
|
|
3937
|
-
return
|
|
3938
|
-
},
|
|
3939
|
-
|
|
3940
|
-
},
|
|
4043
|
+
const E = k.value ? c.value.find((B) => B.id === I) : (j = l.value) == null ? void 0 : j.find((B) => B.id === I);
|
|
4044
|
+
return E ? E.name : I;
|
|
4045
|
+
}, A = () => {
|
|
4046
|
+
F.value = "", h.value = [], w.value = [], n("cancel");
|
|
4047
|
+
}, h = M([]), b = M(!1), F = M(""), H = async () => {
|
|
3941
4048
|
if (!a.value.length) {
|
|
3942
|
-
|
|
4049
|
+
F.value = "", w.value = [], n("cancel");
|
|
3943
4050
|
return;
|
|
3944
4051
|
}
|
|
3945
|
-
b.value = !0,
|
|
4052
|
+
b.value = !0, F.value = "", h.value = [], w.value = [];
|
|
3946
4053
|
try {
|
|
3947
|
-
const
|
|
4054
|
+
const I = a.value.map((B) => z(B)), E = await Promise.allSettled(I);
|
|
3948
4055
|
let j = !0;
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
}), j ? (
|
|
4056
|
+
E.forEach((B) => {
|
|
4057
|
+
B.status !== "fulfilled" && (j = !1);
|
|
4058
|
+
}), j ? (h.value = [], w.value = [], n("add:success", a.value), a.value = []) : (h.value.length && n("add:partial-success", h.value), a.value = [], D(E));
|
|
3952
4059
|
} catch {
|
|
3953
|
-
|
|
4060
|
+
F.value = r("consumer_groups.errors.add"), n("error", F.value);
|
|
3954
4061
|
} finally {
|
|
3955
4062
|
b.value = !1;
|
|
3956
4063
|
}
|
|
3957
|
-
}, re =
|
|
3958
|
-
var
|
|
3959
|
-
let
|
|
3960
|
-
return t.config.app === "konnect" ?
|
|
3961
|
-
}),
|
|
3962
|
-
const
|
|
3963
|
-
group:
|
|
4064
|
+
}, re = S(() => {
|
|
4065
|
+
var E, j, B, J;
|
|
4066
|
+
let I = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
4067
|
+
return t.config.app === "konnect" ? I = I.replace(/{controlPlaneId}/gi, ((E = t.config) == null ? void 0 : E.controlPlaneId) || "").replace(/{consumerId}/gi, ((j = t.config) == null ? void 0 : j.consumerId) || "") : t.config.app === "kongManager" && (I = I.replace(/\/{workspace}/gi, (B = t.config) != null && B.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), I;
|
|
4068
|
+
}), z = async (I) => {
|
|
4069
|
+
const E = {
|
|
4070
|
+
group: I
|
|
3964
4071
|
};
|
|
3965
4072
|
try {
|
|
3966
|
-
const j = await o.post(re.value,
|
|
3967
|
-
return
|
|
4073
|
+
const j = await o.post(re.value, E);
|
|
4074
|
+
return h.value.push(I), j;
|
|
3968
4075
|
} catch (j) {
|
|
3969
|
-
let
|
|
3970
|
-
return j.response.status === 409 && (
|
|
4076
|
+
let B = `${p(I)} - ${j.message}`;
|
|
4077
|
+
return j.response.status === 409 && (B = `${p(I)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(B));
|
|
3971
4078
|
}
|
|
3972
|
-
},
|
|
3973
|
-
|
|
4079
|
+
}, w = M([]), D = (I) => {
|
|
4080
|
+
w.value = I.map((E) => {
|
|
3974
4081
|
var j;
|
|
3975
|
-
return (j =
|
|
4082
|
+
return (j = E.reason) == null ? void 0 : j.message;
|
|
3976
4083
|
}).filter(Boolean);
|
|
3977
4084
|
};
|
|
3978
4085
|
return xe(_, () => {
|
|
3979
4086
|
g.value++;
|
|
3980
4087
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
3981
4088
|
await d();
|
|
3982
|
-
}), (
|
|
3983
|
-
const j =
|
|
3984
|
-
return f(),
|
|
4089
|
+
}), (I, E) => {
|
|
4090
|
+
const j = q("KMultiselect"), B = q("KAlert"), J = q("KPrompt");
|
|
4091
|
+
return f(), U(J, {
|
|
3985
4092
|
"action-pending": b.value,
|
|
3986
4093
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
3987
4094
|
"data-testid": "add-to-group-modal",
|
|
3988
4095
|
"is-visible": e.visible,
|
|
3989
|
-
title:
|
|
3990
|
-
onCanceled:
|
|
4096
|
+
title: y(r)("consumer_groups.consumers.add.title"),
|
|
4097
|
+
onCanceled: A,
|
|
3991
4098
|
onProceed: H
|
|
3992
4099
|
}, {
|
|
3993
4100
|
"body-content": v(() => [
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
4101
|
+
P("div", ll, [
|
|
4102
|
+
P("p", ul, O(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4103
|
+
N(j, {
|
|
3997
4104
|
modelValue: a.value,
|
|
3998
|
-
"onUpdate:modelValue":
|
|
4105
|
+
"onUpdate:modelValue": E[0] || (E[0] = (X) => a.value = X),
|
|
3999
4106
|
autosuggest: "",
|
|
4000
4107
|
"data-testid": "add-to-groups-multiselect",
|
|
4001
|
-
"dropdown-footer-text": k.value ?
|
|
4108
|
+
"dropdown-footer-text": k.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
4002
4109
|
items: _.value,
|
|
4003
|
-
label:
|
|
4004
|
-
loading:
|
|
4005
|
-
placeholder:
|
|
4110
|
+
label: y(r)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4111
|
+
loading: y(s),
|
|
4112
|
+
placeholder: y(r)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
4006
4113
|
readonly: b.value,
|
|
4007
4114
|
required: "",
|
|
4008
4115
|
width: "100%",
|
|
4009
|
-
onQueryChange:
|
|
4116
|
+
onQueryChange: y(i)
|
|
4010
4117
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4011
|
-
|
|
4012
|
-
|
|
4118
|
+
F.value || m.value || w.value.length ? (f(), x("div", cl, [
|
|
4119
|
+
N(B, { appearance: "danger" }, {
|
|
4013
4120
|
alertMessage: v(() => [
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
(f(!0),
|
|
4121
|
+
P("p", null, O(y(r)("consumer_groups.errors.add")), 1),
|
|
4122
|
+
w.value.length ? (f(), x("ul", dl, [
|
|
4123
|
+
(f(!0), x(ve, null, ye(w.value, (X, ee) => (f(), x("li", { key: ee }, O(X), 1))), 128))
|
|
4017
4124
|
])) : G("", !0),
|
|
4018
|
-
|
|
4125
|
+
P("div", null, O(F.value || m.value), 1)
|
|
4019
4126
|
]),
|
|
4020
4127
|
_: 1
|
|
4021
4128
|
})
|
|
@@ -4032,7 +4139,7 @@ const Ft = (e, n) => {
|
|
|
4032
4139
|
for (const [r, o] of n)
|
|
4033
4140
|
t[r] = o;
|
|
4034
4141
|
return t;
|
|
4035
|
-
},
|
|
4142
|
+
}, fl = /* @__PURE__ */ Ft(pl, [["__scopeId", "data-v-4d30f3c5"]]), ml = { class: "kong-ui-entities-consumer-groups-list" }, gl = { key: 1 }, yl = /* @__PURE__ */ oe({
|
|
4036
4143
|
__name: "ConsumerGroupList",
|
|
4037
4144
|
props: {
|
|
4038
4145
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4073,20 +4180,20 @@ const Ft = (e, n) => {
|
|
|
4073
4180
|
},
|
|
4074
4181
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4075
4182
|
setup(e, { emit: n }) {
|
|
4076
|
-
var
|
|
4077
|
-
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } =
|
|
4078
|
-
headers: (
|
|
4079
|
-
}), s = M(1), l =
|
|
4183
|
+
var Bt;
|
|
4184
|
+
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Nt({
|
|
4185
|
+
headers: (Bt = t.config) == null ? void 0 : Bt.requestHeaders
|
|
4186
|
+
}), s = M(1), l = S(() => !!t.config.consumerId), u = S(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4080
4187
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4081
4188
|
};
|
|
4082
4189
|
t.config.app === "kongManager" && (d.consumers_count = { label: o("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), d.tags = { label: o("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4083
4190
|
const c = d, m = ($) => ({
|
|
4084
4191
|
"data-testid": $.username ?? $.custom_id ?? $.id
|
|
4085
|
-
}), g =
|
|
4086
|
-
var Y, ue, Ce,
|
|
4192
|
+
}), g = S(() => {
|
|
4193
|
+
var Y, ue, Ce, Ee;
|
|
4087
4194
|
let $ = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4088
|
-
return t.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = t.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((ue = t.config) == null ? void 0 : ue.consumerId) || "") : t.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((
|
|
4089
|
-
}), k = M(""), _ =
|
|
4195
|
+
return t.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = t.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((ue = t.config) == null ? void 0 : ue.consumerId) || "") : t.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), $;
|
|
4196
|
+
}), k = M(""), _ = S(() => {
|
|
4090
4197
|
const $ = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4091
4198
|
return $ ? {
|
|
4092
4199
|
isExactMatch: $,
|
|
@@ -4102,9 +4209,9 @@ const Ft = (e, n) => {
|
|
|
4102
4209
|
},
|
|
4103
4210
|
schema: t.config.filterSchema
|
|
4104
4211
|
};
|
|
4105
|
-
}), p =
|
|
4212
|
+
}), p = S(() => l.value ? "consumer_groups" : void 0), { fetcher: A, fetcherState: h } = sl(t.config, g.value, p.value), b = () => {
|
|
4106
4213
|
k.value = "";
|
|
4107
|
-
},
|
|
4214
|
+
}, F = () => {
|
|
4108
4215
|
s.value++;
|
|
4109
4216
|
}, H = M(""), re = ($, Y) => {
|
|
4110
4217
|
const ue = $.id;
|
|
@@ -4121,7 +4228,7 @@ const Ft = (e, n) => {
|
|
|
4121
4228
|
field: "id",
|
|
4122
4229
|
message: o("consumer_groups.copy.success", { val: ue })
|
|
4123
4230
|
});
|
|
4124
|
-
},
|
|
4231
|
+
}, z = ($, Y) => {
|
|
4125
4232
|
const ue = JSON.stringify($);
|
|
4126
4233
|
if (!Y(ue)) {
|
|
4127
4234
|
n("copy:error", {
|
|
@@ -4134,62 +4241,62 @@ const Ft = (e, n) => {
|
|
|
4134
4241
|
entity: $,
|
|
4135
4242
|
message: o("consumer_groups.copy.success_brief")
|
|
4136
4243
|
});
|
|
4137
|
-
},
|
|
4244
|
+
}, w = async ($) => {
|
|
4138
4245
|
var ue;
|
|
4139
4246
|
await ((ue = t.canRetrieve) == null ? void 0 : ue.call(t, $)) && a.push(t.config.getViewRoute($.id));
|
|
4140
|
-
},
|
|
4247
|
+
}, D = ($) => ({
|
|
4141
4248
|
label: o("consumer_groups.actions.view"),
|
|
4142
4249
|
to: t.config.getViewRoute($)
|
|
4143
|
-
}),
|
|
4250
|
+
}), V = ($) => ({
|
|
4144
4251
|
label: o("consumer_groups.actions.edit"),
|
|
4145
4252
|
to: t.config.getEditRoute($)
|
|
4146
|
-
}),
|
|
4147
|
-
|
|
4253
|
+
}), I = M(void 0), E = M(!1), j = M(!1), B = M(""), J = al(t.config, g.value), X = ($) => {
|
|
4254
|
+
I.value = $, E.value = !0;
|
|
4148
4255
|
}, ee = () => {
|
|
4149
|
-
|
|
4256
|
+
E.value = !1;
|
|
4150
4257
|
}, te = async () => {
|
|
4151
4258
|
var $, Y, ue;
|
|
4152
|
-
if (($ =
|
|
4259
|
+
if (($ = I.value) != null && $.id) {
|
|
4153
4260
|
j.value = !0;
|
|
4154
4261
|
try {
|
|
4155
|
-
await i.delete(
|
|
4262
|
+
await i.delete(J(I.value.id)), j.value = !1, E.value = !1, s.value++, n("delete:success", I.value);
|
|
4156
4263
|
} catch (Ce) {
|
|
4157
|
-
|
|
4264
|
+
B.value = ((ue = (Y = Ce.response) == null ? void 0 : Y.data) == null ? void 0 : ue.message) || Ce.message || o("consumer_groups.errors.delete"), n("error", Ce);
|
|
4158
4265
|
} finally {
|
|
4159
4266
|
j.value = !1;
|
|
4160
4267
|
}
|
|
4161
4268
|
}
|
|
4162
|
-
}, se = M(!1),
|
|
4269
|
+
}, se = M(!1), Re = () => {
|
|
4163
4270
|
se.value = !0;
|
|
4164
4271
|
}, C = () => {
|
|
4165
4272
|
se.value = !1;
|
|
4166
|
-
},
|
|
4273
|
+
}, K = ($, Y) => {
|
|
4167
4274
|
Y || C(), s.value++, n("add:success", $);
|
|
4168
|
-
},
|
|
4169
|
-
l.value &&
|
|
4170
|
-
},
|
|
4171
|
-
|
|
4275
|
+
}, ae = () => {
|
|
4276
|
+
l.value && Re();
|
|
4277
|
+
}, L = M(void 0), R = M(!1), ge = M(""), _e = ($) => {
|
|
4278
|
+
L.value = $, R.value = !0;
|
|
4172
4279
|
}, de = () => {
|
|
4173
|
-
|
|
4174
|
-
},
|
|
4175
|
-
var Y, ue, Ce,
|
|
4280
|
+
R.value = !1, L.value = void 0;
|
|
4281
|
+
}, Be = S(() => {
|
|
4282
|
+
var Y, ue, Ce, Ee;
|
|
4176
4283
|
let $ = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4177
|
-
return t.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = t.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((ue = t.config) == null ? void 0 : ue.consumerId) || "") : t.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((
|
|
4178
|
-
}),
|
|
4179
|
-
if (
|
|
4180
|
-
|
|
4284
|
+
return t.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = t.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((ue = t.config) == null ? void 0 : ue.consumerId) || "") : t.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), $;
|
|
4285
|
+
}), Ge = M(!1), cr = async () => {
|
|
4286
|
+
if (L.value) {
|
|
4287
|
+
Ge.value = !0;
|
|
4181
4288
|
try {
|
|
4182
|
-
const $ =
|
|
4183
|
-
await i.delete($), n("remove:success",
|
|
4289
|
+
const $ = Be.value.replace(/{consumerGroupId}/gi, L.value.id);
|
|
4290
|
+
await i.delete($), n("remove:success", L.value), de(), s.value++;
|
|
4184
4291
|
} catch ($) {
|
|
4185
4292
|
ge.value = $.message || o("consumer_groups.errors.delete"), n("error", $);
|
|
4186
4293
|
} finally {
|
|
4187
|
-
|
|
4294
|
+
Ge.value = !1;
|
|
4188
4295
|
}
|
|
4189
4296
|
}
|
|
4190
4297
|
};
|
|
4191
|
-
xe(
|
|
4192
|
-
if ($.status ===
|
|
4298
|
+
xe(h, ($) => {
|
|
4299
|
+
if ($.status === Oe.Error) {
|
|
4193
4300
|
H.value = o("consumer_groups.errors.general"), n("error", $.error);
|
|
4194
4301
|
return;
|
|
4195
4302
|
}
|
|
@@ -4204,9 +4311,9 @@ const Ft = (e, n) => {
|
|
|
4204
4311
|
return Qe(async () => {
|
|
4205
4312
|
await t.canCreate() && (pt.value.title = l.value ? o("consumer_groups.list.empty_state.title_for_consumer") : o("consumer_groups.list.empty_state.title"), pt.value.ctaText = l.value ? o("consumer_groups.actions.add_to_group") : o("consumer_groups.actions.create"));
|
|
4206
4313
|
}), ($, Y) => {
|
|
4207
|
-
const ue =
|
|
4208
|
-
return f(),
|
|
4209
|
-
|
|
4314
|
+
const ue = q("KButton"), Ce = q("KBadge"), Ee = q("KTruncate"), He = q("KDropdownItem"), Kt = q("KClipboardProvider"), dr = q("KPrompt");
|
|
4315
|
+
return f(), x("div", ml, [
|
|
4316
|
+
N(y(Ns), {
|
|
4210
4317
|
"cache-identifier": e.cacheIdentifier,
|
|
4211
4318
|
"disable-pagination": l.value,
|
|
4212
4319
|
"disable-pagination-page-jump": "",
|
|
@@ -4214,20 +4321,20 @@ const Ft = (e, n) => {
|
|
|
4214
4321
|
"empty-state-options": pt.value,
|
|
4215
4322
|
"enable-entity-actions": "",
|
|
4216
4323
|
"error-message": H.value,
|
|
4217
|
-
fetcher:
|
|
4324
|
+
fetcher: y(A),
|
|
4218
4325
|
"fetcher-cache-key": s.value,
|
|
4219
4326
|
"pagination-type": "offset",
|
|
4220
4327
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
4221
4328
|
query: k.value,
|
|
4222
4329
|
"row-attributes": m,
|
|
4223
|
-
"table-headers":
|
|
4330
|
+
"table-headers": y(c),
|
|
4224
4331
|
onClearSearchInput: b,
|
|
4225
|
-
"onClick:row": Y[3] || (Y[3] = (W) =>
|
|
4226
|
-
onEmptyStateCtaClicked:
|
|
4227
|
-
onSort:
|
|
4332
|
+
"onClick:row": Y[3] || (Y[3] = (W) => w(W)),
|
|
4333
|
+
onEmptyStateCtaClicked: ae,
|
|
4334
|
+
onSort: F
|
|
4228
4335
|
}, {
|
|
4229
4336
|
"toolbar-filter": v(() => [
|
|
4230
|
-
l.value ? G("", !0) : (f(),
|
|
4337
|
+
l.value ? G("", !0) : (f(), U(y(Qs), {
|
|
4231
4338
|
key: 0,
|
|
4232
4339
|
modelValue: k.value,
|
|
4233
4340
|
"onUpdate:modelValue": Y[0] || (Y[0] = (W) => k.value = W),
|
|
@@ -4235,19 +4342,19 @@ const Ft = (e, n) => {
|
|
|
4235
4342
|
}, null, 8, ["modelValue", "config"]))
|
|
4236
4343
|
]),
|
|
4237
4344
|
"toolbar-button": v(() => [
|
|
4238
|
-
|
|
4345
|
+
N(y(Xe), {
|
|
4239
4346
|
"auth-function": () => e.canCreate()
|
|
4240
4347
|
}, {
|
|
4241
4348
|
default: v(() => [
|
|
4242
|
-
|
|
4349
|
+
N(ue, {
|
|
4243
4350
|
appearance: "primary",
|
|
4244
4351
|
"data-testid": "toolbar-add-consumer-group",
|
|
4245
4352
|
icon: "plus",
|
|
4246
4353
|
to: e.config.consumerId ? void 0 : e.config.createRoute,
|
|
4247
|
-
onClick: Y[1] || (Y[1] = () => e.config.consumerId ?
|
|
4354
|
+
onClick: Y[1] || (Y[1] = () => e.config.consumerId ? Re() : void 0)
|
|
4248
4355
|
}, {
|
|
4249
4356
|
default: v(() => [
|
|
4250
|
-
Q(
|
|
4357
|
+
Q(O(e.config.consumerId ? y(o)("consumer_groups.actions.add_to_group") : y(o)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4251
4358
|
]),
|
|
4252
4359
|
_: 1
|
|
4253
4360
|
}, 8, ["to"])
|
|
@@ -4256,92 +4363,92 @@ const Ft = (e, n) => {
|
|
|
4256
4363
|
}, 8, ["auth-function"])
|
|
4257
4364
|
]),
|
|
4258
4365
|
name: v(({ rowValue: W }) => [
|
|
4259
|
-
|
|
4366
|
+
P("b", null, O(W ?? "-"), 1)
|
|
4260
4367
|
]),
|
|
4261
4368
|
consumers_count: v(({ rowValue: W }) => [
|
|
4262
|
-
Q(
|
|
4369
|
+
Q(O(W ?? "-"), 1)
|
|
4263
4370
|
]),
|
|
4264
4371
|
tags: v(({ rowValue: W }) => [
|
|
4265
|
-
(W == null ? void 0 : W.length) > 0 ? (f(),
|
|
4372
|
+
(W == null ? void 0 : W.length) > 0 ? (f(), U(Ee, { key: 0 }, {
|
|
4266
4373
|
default: v(() => [
|
|
4267
|
-
(f(!0),
|
|
4268
|
-
key:
|
|
4374
|
+
(f(!0), x(ve, null, ye(W, (Ke) => (f(), U(Ce, {
|
|
4375
|
+
key: Ke,
|
|
4269
4376
|
onClick: Y[2] || (Y[2] = rt(() => {
|
|
4270
4377
|
}, ["stop"]))
|
|
4271
4378
|
}, {
|
|
4272
4379
|
default: v(() => [
|
|
4273
|
-
Q(
|
|
4380
|
+
Q(O(Ke), 1)
|
|
4274
4381
|
]),
|
|
4275
4382
|
_: 2
|
|
4276
4383
|
}, 1024))), 128))
|
|
4277
4384
|
]),
|
|
4278
4385
|
_: 2
|
|
4279
|
-
}, 1024)) : (f(),
|
|
4386
|
+
}, 1024)) : (f(), x("span", gl, "-"))
|
|
4280
4387
|
]),
|
|
4281
4388
|
actions: v(({ row: W }) => [
|
|
4282
|
-
|
|
4283
|
-
default: v(({ copyToClipboard:
|
|
4284
|
-
|
|
4389
|
+
N(Kt, null, {
|
|
4390
|
+
default: v(({ copyToClipboard: Ke }) => [
|
|
4391
|
+
N(He, {
|
|
4285
4392
|
"data-testid": "action-entity-copy-id",
|
|
4286
|
-
onClick: (
|
|
4393
|
+
onClick: (pr) => re(W, Ke)
|
|
4287
4394
|
}, {
|
|
4288
4395
|
default: v(() => [
|
|
4289
|
-
Q(
|
|
4396
|
+
Q(O(y(o)("consumer_groups.actions.copy_id")), 1)
|
|
4290
4397
|
]),
|
|
4291
4398
|
_: 2
|
|
4292
4399
|
}, 1032, ["onClick"])
|
|
4293
4400
|
]),
|
|
4294
4401
|
_: 2
|
|
4295
4402
|
}, 1024),
|
|
4296
|
-
|
|
4297
|
-
default: v(({ copyToClipboard:
|
|
4298
|
-
|
|
4403
|
+
N(Kt, null, {
|
|
4404
|
+
default: v(({ copyToClipboard: Ke }) => [
|
|
4405
|
+
N(He, {
|
|
4299
4406
|
"data-testid": "action-entity-copy-json",
|
|
4300
|
-
onClick: (
|
|
4407
|
+
onClick: (pr) => z(W, Ke)
|
|
4301
4408
|
}, {
|
|
4302
4409
|
default: v(() => [
|
|
4303
|
-
Q(
|
|
4410
|
+
Q(O(y(o)("consumer_groups.actions.copy_json")), 1)
|
|
4304
4411
|
]),
|
|
4305
4412
|
_: 2
|
|
4306
4413
|
}, 1032, ["onClick"])
|
|
4307
4414
|
]),
|
|
4308
4415
|
_: 2
|
|
4309
4416
|
}, 1024),
|
|
4310
|
-
|
|
4417
|
+
N(y(Xe), {
|
|
4311
4418
|
"auth-function": () => e.canRetrieve(W)
|
|
4312
4419
|
}, {
|
|
4313
4420
|
default: v(() => [
|
|
4314
|
-
|
|
4421
|
+
N(He, {
|
|
4315
4422
|
"data-testid": "action-entity-view",
|
|
4316
4423
|
"has-divider": "",
|
|
4317
|
-
item:
|
|
4424
|
+
item: D(W.id)
|
|
4318
4425
|
}, null, 8, ["item"])
|
|
4319
4426
|
]),
|
|
4320
4427
|
_: 2
|
|
4321
4428
|
}, 1032, ["auth-function"]),
|
|
4322
|
-
|
|
4429
|
+
N(y(Xe), {
|
|
4323
4430
|
"auth-function": () => e.canEdit(W)
|
|
4324
4431
|
}, {
|
|
4325
4432
|
default: v(() => [
|
|
4326
|
-
|
|
4433
|
+
N(He, {
|
|
4327
4434
|
"data-testid": "action-entity-edit",
|
|
4328
|
-
item:
|
|
4435
|
+
item: V(W.id)
|
|
4329
4436
|
}, null, 8, ["item"])
|
|
4330
4437
|
]),
|
|
4331
4438
|
_: 2
|
|
4332
4439
|
}, 1032, ["auth-function"]),
|
|
4333
|
-
|
|
4440
|
+
N(y(Xe), {
|
|
4334
4441
|
"auth-function": () => e.canDelete(W)
|
|
4335
4442
|
}, {
|
|
4336
4443
|
default: v(() => [
|
|
4337
|
-
|
|
4444
|
+
N(He, {
|
|
4445
|
+
danger: "",
|
|
4338
4446
|
"data-testid": "action-entity-delete",
|
|
4339
4447
|
"has-divider": "",
|
|
4340
|
-
"is-dangerous": "",
|
|
4341
4448
|
onClick: () => e.config.consumerId ? _e(W) : X(W)
|
|
4342
4449
|
}, {
|
|
4343
4450
|
default: v(() => [
|
|
4344
|
-
Q(
|
|
4451
|
+
Q(O(e.config.consumerId ? y(o)("consumer_groups.actions.exit") : y(o)("consumer_groups.actions.delete")), 1)
|
|
4345
4452
|
]),
|
|
4346
4453
|
_: 2
|
|
4347
4454
|
}, 1032, ["onClick"])
|
|
@@ -4351,56 +4458,56 @@ const Ft = (e, n) => {
|
|
|
4351
4458
|
]),
|
|
4352
4459
|
_: 1
|
|
4353
4460
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4354
|
-
|
|
4461
|
+
N(y(qs), {
|
|
4355
4462
|
"action-pending": j.value,
|
|
4356
4463
|
"data-testid": "delete-consumer-group-modal",
|
|
4357
|
-
description:
|
|
4358
|
-
"entity-name":
|
|
4359
|
-
"entity-type":
|
|
4360
|
-
error:
|
|
4361
|
-
title:
|
|
4362
|
-
visible:
|
|
4464
|
+
description: y(o)("consumer_groups.delete.description"),
|
|
4465
|
+
"entity-name": I.value && (I.value.name || I.value.id),
|
|
4466
|
+
"entity-type": y(yn).ConsumerGroup,
|
|
4467
|
+
error: B.value,
|
|
4468
|
+
title: y(o)("consumer_groups.delete.title"),
|
|
4469
|
+
visible: E.value,
|
|
4363
4470
|
onCancel: ee,
|
|
4364
4471
|
onProceed: te
|
|
4365
4472
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4366
|
-
e.config.consumerId ? (f(),
|
|
4473
|
+
e.config.consumerId ? (f(), U(fl, {
|
|
4367
4474
|
key: 0,
|
|
4368
4475
|
config: e.config,
|
|
4369
4476
|
"data-testid": "add-to-group-modal",
|
|
4370
4477
|
visible: se.value,
|
|
4371
|
-
"onAdd:partialSuccess": Y[4] || (Y[4] = (W) =>
|
|
4372
|
-
"onAdd:success": Y[5] || (Y[5] = (W) =>
|
|
4478
|
+
"onAdd:partialSuccess": Y[4] || (Y[4] = (W) => K(W, !0)),
|
|
4479
|
+
"onAdd:success": Y[5] || (Y[5] = (W) => K(W)),
|
|
4373
4480
|
onCancel: C
|
|
4374
4481
|
}, null, 8, ["config", "visible"])) : G("", !0),
|
|
4375
|
-
e.config.consumerId &&
|
|
4482
|
+
e.config.consumerId && L.value ? (f(), U(dr, {
|
|
4376
4483
|
key: 1,
|
|
4377
4484
|
"data-testid": "exit-group-modal",
|
|
4378
|
-
"is-visible":
|
|
4379
|
-
title:
|
|
4485
|
+
"is-visible": R.value,
|
|
4486
|
+
title: y(o)("consumer_groups.consumers.exit.title"),
|
|
4380
4487
|
type: "danger",
|
|
4381
4488
|
onCanceled: de,
|
|
4382
|
-
onProceed:
|
|
4489
|
+
onProceed: cr
|
|
4383
4490
|
}, {
|
|
4384
4491
|
"body-content": v(() => [
|
|
4385
|
-
|
|
4492
|
+
N(y(r), {
|
|
4386
4493
|
class: "exit-modal-message",
|
|
4387
4494
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4388
4495
|
tag: "p"
|
|
4389
4496
|
}, Te({
|
|
4390
4497
|
consumerGroup: v(() => [
|
|
4391
|
-
|
|
4498
|
+
P("strong", null, O(L.value.name || L.value.id), 1)
|
|
4392
4499
|
]),
|
|
4393
4500
|
_: 2
|
|
4394
4501
|
}, [
|
|
4395
4502
|
e.config.consumerUsername ? {
|
|
4396
4503
|
name: "consumer",
|
|
4397
4504
|
fn: v(() => [
|
|
4398
|
-
|
|
4505
|
+
P("strong", null, O(e.config.consumerUsername), 1)
|
|
4399
4506
|
]),
|
|
4400
4507
|
key: "0"
|
|
4401
4508
|
} : void 0
|
|
4402
4509
|
]), 1032, ["keypath"]),
|
|
4403
|
-
|
|
4510
|
+
P("p", null, O(y(o)("consumer_groups.consumers.exit.description")), 1)
|
|
4404
4511
|
]),
|
|
4405
4512
|
_: 1
|
|
4406
4513
|
}, 8, ["is-visible", "title"])) : G("", !0)
|
|
@@ -4408,10 +4515,10 @@ const Ft = (e, n) => {
|
|
|
4408
4515
|
};
|
|
4409
4516
|
}
|
|
4410
4517
|
});
|
|
4411
|
-
const
|
|
4518
|
+
const El = /* @__PURE__ */ Ft(yl, [["__scopeId", "data-v-e2fa781a"]]), hl = { class: "kong-ui-entities-consumer-group-form" }, vl = { class: "select-item-label" }, bl = {
|
|
4412
4519
|
key: 0,
|
|
4413
4520
|
class: "select-item-desc"
|
|
4414
|
-
},
|
|
4521
|
+
}, Cl = /* @__PURE__ */ oe({
|
|
4415
4522
|
__name: "ConsumerGroupForm",
|
|
4416
4523
|
props: {
|
|
4417
4524
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4429,8 +4536,8 @@ const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4429
4536
|
},
|
|
4430
4537
|
emits: ["update", "error", "loading"],
|
|
4431
4538
|
setup(e, { emit: n }) {
|
|
4432
|
-
var te, se,
|
|
4433
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), o = wt(), a =
|
|
4539
|
+
var te, se, Re;
|
|
4540
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), o = wt(), a = qt({
|
|
4434
4541
|
fields: {
|
|
4435
4542
|
name: "",
|
|
4436
4543
|
tags: "",
|
|
@@ -4438,7 +4545,7 @@ const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4438
4545
|
},
|
|
4439
4546
|
errorMessage: "",
|
|
4440
4547
|
readonly: !1
|
|
4441
|
-
}), i =
|
|
4548
|
+
}), i = qt({
|
|
4442
4549
|
name: "",
|
|
4443
4550
|
tags: "",
|
|
4444
4551
|
consumers: []
|
|
@@ -4448,188 +4555,188 @@ const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4448
4555
|
error: u,
|
|
4449
4556
|
loadItems: d,
|
|
4450
4557
|
results: c
|
|
4451
|
-
} =
|
|
4558
|
+
} = ur(t.config, (se = $e.form[(te = t.config) == null ? void 0 : te.app]) == null ? void 0 : se.consumersList, "", {
|
|
4452
4559
|
fetchedItemsKey: "data",
|
|
4453
4560
|
searchKeys: ["username", "custom_id"]
|
|
4454
|
-
}), { axiosInstance: m } =
|
|
4455
|
-
headers: (
|
|
4456
|
-
}), { getMessageFromError: g } =
|
|
4561
|
+
}), { axiosInstance: m } = Nt({
|
|
4562
|
+
headers: (Re = t.config) == null ? void 0 : Re.requestHeaders
|
|
4563
|
+
}), { getMessageFromError: g } = il(), k = S(() => c.value.map((C) => ({
|
|
4457
4564
|
label: C.username || C.custom_id,
|
|
4458
4565
|
value: C.id,
|
|
4459
4566
|
selected: a.fields.consumers.includes(C.id),
|
|
4460
4567
|
data: C
|
|
4461
4568
|
// we need this to determine whether or not to show the description text
|
|
4462
|
-
}))), _ =
|
|
4463
|
-
var C,
|
|
4464
|
-
return (
|
|
4465
|
-
}), p =
|
|
4466
|
-
var
|
|
4467
|
-
let
|
|
4468
|
-
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ?
|
|
4469
|
-
},
|
|
4569
|
+
}))), _ = S(() => {
|
|
4570
|
+
var C, K;
|
|
4571
|
+
return (K = $e.form[(C = t.config) == null ? void 0 : C.app]) == null ? void 0 : K.edit;
|
|
4572
|
+
}), p = S(() => t.consumerGroupId ? nt.Edit : nt.Create), A = S(() => !!a.fields.name && !w.value), h = S(() => JSON.stringify(a.fields) !== JSON.stringify(i)), b = (C, K = "", ae = "") => {
|
|
4573
|
+
var R, ge, _e, de, Be, Ge;
|
|
4574
|
+
let L = `${(R = t.config) == null ? void 0 : R.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][C]}`;
|
|
4575
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? L = L.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((Be = t.config) == null ? void 0 : Be.app) === "kongManager" && (L = L.replace(/\/{workspace}/gi, (Ge = t.config) != null && Ge.workspace ? `/${t.config.workspace}` : "")), L = L.replace(/{id}/gi, K || t.consumerGroupId), (C === "addConsumer" || C === "removeConsumer") && (L = L.replace(/{consumerId}/gi, ae)), L;
|
|
4576
|
+
}, F = () => {
|
|
4470
4577
|
var C;
|
|
4471
4578
|
o.push(((C = t.config) == null ? void 0 : C.cancelRoute) || { name: "consumer-group-list" });
|
|
4472
4579
|
}, H = (C) => {
|
|
4473
4580
|
n("error", C);
|
|
4474
4581
|
}, re = (C) => {
|
|
4475
4582
|
n("loading", C);
|
|
4476
|
-
},
|
|
4477
|
-
var
|
|
4478
|
-
a.fields.name = ((
|
|
4479
|
-
const
|
|
4480
|
-
if (a.fields.tags = (
|
|
4583
|
+
}, z = async (C) => {
|
|
4584
|
+
var ae, L, R, ge, _e;
|
|
4585
|
+
a.fields.name = ((ae = C == null ? void 0 : C.item) == null ? void 0 : ae.name) || ((L = C == null ? void 0 : C.consumer_group) == null ? void 0 : L.name) || (C == null ? void 0 : C.name) || "";
|
|
4586
|
+
const K = ((R = C == null ? void 0 : C.item) == null ? void 0 : R.tags) || (C == null ? void 0 : C.consumer_group.tags) || (C == null ? void 0 : C.tags) || [];
|
|
4587
|
+
if (a.fields.tags = (K == null ? void 0 : K.join(", ")) || "", "consumers" in C)
|
|
4481
4588
|
a.fields.consumers = ((ge = C == null ? void 0 : C.consumers) == null ? void 0 : ge.map((de) => de.id)) || [];
|
|
4482
4589
|
else
|
|
4483
4590
|
try {
|
|
4484
4591
|
const { data: de } = await m.get(b("getConsumers"));
|
|
4485
|
-
a.fields.consumers = "consumers" in de ? (_e = de == null ? void 0 : de.consumers) == null ? void 0 : _e.map((
|
|
4592
|
+
a.fields.consumers = "consumers" in de ? (_e = de == null ? void 0 : de.consumers) == null ? void 0 : _e.map((Be) => Be.id) : [];
|
|
4486
4593
|
} catch (de) {
|
|
4487
|
-
|
|
4594
|
+
E(de);
|
|
4488
4595
|
}
|
|
4489
4596
|
Object.assign(i, a.fields);
|
|
4490
|
-
},
|
|
4491
|
-
var C,
|
|
4597
|
+
}, w = S(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), D = () => {
|
|
4598
|
+
var C, K;
|
|
4492
4599
|
return {
|
|
4493
4600
|
name: a.fields.name,
|
|
4494
|
-
tags: (
|
|
4601
|
+
tags: (K = (C = a.fields.tags.split(",")) == null ? void 0 : C.map((ae) => String(ae || "").trim())) == null ? void 0 : K.filter((ae) => ae !== "")
|
|
4495
4602
|
};
|
|
4496
|
-
},
|
|
4603
|
+
}, V = async (C, K = "") => await m.post(b("addConsumer", K, C), { consumer: C }), I = async (C, K = "") => await m.delete(b("removeConsumer", K, C)), E = (C) => {
|
|
4497
4604
|
a.errorMessage = g(C), n("error", C);
|
|
4498
4605
|
}, j = (C = t.consumerGroupId) => {
|
|
4499
4606
|
Object.assign(i, a.fields), n("update", { ...a.fields, id: C });
|
|
4500
|
-
},
|
|
4501
|
-
const
|
|
4502
|
-
|
|
4503
|
-
code:
|
|
4504
|
-
message:
|
|
4505
|
-
}) : j(
|
|
4506
|
-
},
|
|
4607
|
+
}, B = (C, K, ae = t.consumerGroupId) => {
|
|
4608
|
+
const L = C == null ? void 0 : C.find((R) => R.status !== "fulfilled");
|
|
4609
|
+
L ? E({
|
|
4610
|
+
code: L.status,
|
|
4611
|
+
message: K
|
|
4612
|
+
}) : j(ae);
|
|
4613
|
+
}, J = async () => {
|
|
4507
4614
|
let C = "";
|
|
4508
4615
|
try {
|
|
4509
|
-
const { data:
|
|
4510
|
-
C = "item" in
|
|
4511
|
-
} catch (
|
|
4512
|
-
|
|
4616
|
+
const { data: K } = await m.post(b("create"), D());
|
|
4617
|
+
C = "item" in K ? K.item.id : K.id;
|
|
4618
|
+
} catch (K) {
|
|
4619
|
+
E(K);
|
|
4513
4620
|
}
|
|
4514
4621
|
if (a.fields.consumers.length > 0 && C)
|
|
4515
4622
|
try {
|
|
4516
|
-
const
|
|
4517
|
-
|
|
4518
|
-
} catch (
|
|
4519
|
-
|
|
4623
|
+
const K = a.fields.consumers.map((L) => V(L, C)), ae = await Promise.allSettled(K);
|
|
4624
|
+
B(ae, r("consumer_groups.errors.add_consumer"), C);
|
|
4625
|
+
} catch (K) {
|
|
4626
|
+
E(K);
|
|
4520
4627
|
}
|
|
4521
4628
|
else
|
|
4522
4629
|
a.fields.consumers.length === 0 && C && j(C);
|
|
4523
4630
|
}, X = async () => {
|
|
4524
|
-
var
|
|
4631
|
+
var ae;
|
|
4525
4632
|
try {
|
|
4526
|
-
((
|
|
4527
|
-
} catch (
|
|
4528
|
-
|
|
4633
|
+
((ae = t.config) == null ? void 0 : ae.app) === "konnect" ? await m.put(b("edit"), D()) : await m.patch(b("edit"), D());
|
|
4634
|
+
} catch (L) {
|
|
4635
|
+
E(L);
|
|
4529
4636
|
}
|
|
4530
|
-
const C = a.fields.consumers.filter((
|
|
4531
|
-
if (
|
|
4637
|
+
const C = a.fields.consumers.filter((L) => !i.consumers.includes(L)), K = i.consumers.filter((L) => !a.fields.consumers.includes(L));
|
|
4638
|
+
if (K.length === 0 && C.length === 0)
|
|
4532
4639
|
j();
|
|
4533
4640
|
else {
|
|
4534
|
-
if (
|
|
4641
|
+
if (K.length > 0)
|
|
4535
4642
|
try {
|
|
4536
|
-
const
|
|
4537
|
-
|
|
4538
|
-
} catch (
|
|
4539
|
-
|
|
4643
|
+
const L = K.map((ge) => I(ge)), R = await Promise.allSettled(L);
|
|
4644
|
+
B(R, r("consumer_groups.errors.remove_consumer"));
|
|
4645
|
+
} catch (L) {
|
|
4646
|
+
E(L);
|
|
4540
4647
|
}
|
|
4541
4648
|
if (C.length > 0)
|
|
4542
4649
|
try {
|
|
4543
|
-
const
|
|
4544
|
-
|
|
4545
|
-
} catch (
|
|
4546
|
-
|
|
4650
|
+
const L = C.map((ge) => V(ge)), R = await Promise.allSettled(L);
|
|
4651
|
+
B(R, r("consumer_groups.errors.add_consumer"));
|
|
4652
|
+
} catch (L) {
|
|
4653
|
+
E(L);
|
|
4547
4654
|
}
|
|
4548
4655
|
}
|
|
4549
4656
|
}, ee = async () => {
|
|
4550
4657
|
try {
|
|
4551
|
-
a.readonly = !0, p.value === nt.Create ? await
|
|
4658
|
+
a.readonly = !0, p.value === nt.Create ? await J() : await X();
|
|
4552
4659
|
} finally {
|
|
4553
4660
|
a.readonly = !1;
|
|
4554
4661
|
}
|
|
4555
4662
|
};
|
|
4556
4663
|
return Qe(async () => {
|
|
4557
4664
|
await d();
|
|
4558
|
-
}), (C,
|
|
4559
|
-
const
|
|
4560
|
-
return f(),
|
|
4561
|
-
|
|
4562
|
-
"can-submit":
|
|
4665
|
+
}), (C, K) => {
|
|
4666
|
+
const ae = q("KInput"), L = q("KMultiselect");
|
|
4667
|
+
return f(), x("div", hl, [
|
|
4668
|
+
N(y(Ss), {
|
|
4669
|
+
"can-submit": A.value && h.value,
|
|
4563
4670
|
config: e.config,
|
|
4564
4671
|
"edit-id": e.consumerGroupId,
|
|
4565
|
-
"error-message": a.errorMessage ||
|
|
4672
|
+
"error-message": a.errorMessage || y(u) || w.value,
|
|
4566
4673
|
"fetch-url": _.value,
|
|
4567
4674
|
"is-readonly": a.readonly,
|
|
4568
|
-
onCancel:
|
|
4569
|
-
"onFetch:error":
|
|
4570
|
-
"onFetch:success":
|
|
4571
|
-
onLoading:
|
|
4675
|
+
onCancel: F,
|
|
4676
|
+
"onFetch:error": K[3] || (K[3] = (R) => H(R)),
|
|
4677
|
+
"onFetch:success": z,
|
|
4678
|
+
onLoading: K[4] || (K[4] = (R) => re(R)),
|
|
4572
4679
|
onSubmit: ee
|
|
4573
4680
|
}, {
|
|
4574
4681
|
default: v(() => [
|
|
4575
|
-
|
|
4576
|
-
description:
|
|
4577
|
-
title:
|
|
4682
|
+
N(y(dn), {
|
|
4683
|
+
description: y(r)("consumer_groups.form.general_info.description"),
|
|
4684
|
+
title: y(r)("consumer_groups.form.general_info.title")
|
|
4578
4685
|
}, {
|
|
4579
4686
|
default: v(() => [
|
|
4580
|
-
|
|
4687
|
+
N(ae, {
|
|
4581
4688
|
modelValue: a.fields.name,
|
|
4582
|
-
"onUpdate:modelValue":
|
|
4689
|
+
"onUpdate:modelValue": K[0] || (K[0] = (R) => a.fields.name = R),
|
|
4583
4690
|
modelModifiers: { trim: !0 },
|
|
4584
4691
|
autocomplete: "off",
|
|
4585
4692
|
"data-testid": "consumer-group-form-name",
|
|
4586
|
-
label:
|
|
4587
|
-
placeholder:
|
|
4693
|
+
label: y(r)("consumer_groups.form.fields.name.label"),
|
|
4694
|
+
placeholder: y(r)("consumer_groups.form.fields.name.placeholder"),
|
|
4588
4695
|
required: "",
|
|
4589
4696
|
type: "text"
|
|
4590
4697
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4591
|
-
|
|
4698
|
+
N(ae, {
|
|
4592
4699
|
modelValue: a.fields.tags,
|
|
4593
|
-
"onUpdate:modelValue":
|
|
4700
|
+
"onUpdate:modelValue": K[1] || (K[1] = (R) => a.fields.tags = R),
|
|
4594
4701
|
modelModifiers: { trim: !0 },
|
|
4595
4702
|
autocomplete: "off",
|
|
4596
4703
|
"data-testid": "consumer-group-form-tags",
|
|
4597
|
-
help:
|
|
4598
|
-
label:
|
|
4704
|
+
help: y(r)("consumer_groups.form.fields.tags.help"),
|
|
4705
|
+
label: y(r)("consumer_groups.form.fields.tags.label"),
|
|
4599
4706
|
"label-attributes": {
|
|
4600
|
-
info:
|
|
4707
|
+
info: y(r)("consumer_groups.form.fields.tags.tooltip"),
|
|
4601
4708
|
tooltipAttributes: { maxWidth: "300" }
|
|
4602
4709
|
},
|
|
4603
|
-
placeholder:
|
|
4710
|
+
placeholder: y(r)("consumer_groups.form.fields.tags.placeholder"),
|
|
4604
4711
|
type: "text"
|
|
4605
4712
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder"])
|
|
4606
4713
|
]),
|
|
4607
4714
|
_: 1
|
|
4608
4715
|
}, 8, ["description", "title"]),
|
|
4609
|
-
|
|
4610
|
-
description:
|
|
4716
|
+
N(y(dn), {
|
|
4717
|
+
description: y(r)("consumer_groups.form.consumers.description"),
|
|
4611
4718
|
"has-divider": "",
|
|
4612
|
-
title:
|
|
4719
|
+
title: y(r)("consumer_groups.form.consumers.title")
|
|
4613
4720
|
}, {
|
|
4614
4721
|
default: v(() => [
|
|
4615
|
-
|
|
4722
|
+
N(L, {
|
|
4616
4723
|
modelValue: a.fields.consumers,
|
|
4617
|
-
"onUpdate:modelValue":
|
|
4724
|
+
"onUpdate:modelValue": K[2] || (K[2] = (R) => a.fields.consumers = R),
|
|
4618
4725
|
appearance: "select",
|
|
4619
4726
|
autosuggest: "",
|
|
4620
4727
|
"expand-selected": "",
|
|
4621
4728
|
items: k.value,
|
|
4622
|
-
label:
|
|
4623
|
-
loading:
|
|
4624
|
-
placeholder:
|
|
4729
|
+
label: y(r)("consumer_groups.form.fields.consumers.label"),
|
|
4730
|
+
loading: y(l),
|
|
4731
|
+
placeholder: y(r)("consumer_groups.form.fields.consumers.placeholder"),
|
|
4625
4732
|
width: "auto",
|
|
4626
|
-
onQueryChange:
|
|
4733
|
+
onQueryChange: y(s)
|
|
4627
4734
|
}, {
|
|
4628
|
-
"item-template": v(({ item:
|
|
4735
|
+
"item-template": v(({ item: R }) => {
|
|
4629
4736
|
var ge, _e, de;
|
|
4630
4737
|
return [
|
|
4631
|
-
|
|
4632
|
-
(ge =
|
|
4738
|
+
P("div", vl, O(R.label), 1),
|
|
4739
|
+
(ge = R == null ? void 0 : R.data) != null && ge.username && ((_e = R == null ? void 0 : R.data) != null && _e.custom_id) ? (f(), x("div", bl, O((de = R == null ? void 0 : R.data) == null ? void 0 : de.custom_id), 1)) : G("", !0)
|
|
4633
4740
|
];
|
|
4634
4741
|
}),
|
|
4635
4742
|
_: 1
|
|
@@ -4644,7 +4751,7 @@ const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4644
4751
|
};
|
|
4645
4752
|
}
|
|
4646
4753
|
});
|
|
4647
|
-
const
|
|
4754
|
+
const Ol = /* @__PURE__ */ Ft(Cl, [["__scopeId", "data-v-2da12897"]]), kl = { class: "kong-ui-consumer-group-entity-config-card" }, Nl = /* @__PURE__ */ oe({
|
|
4648
4755
|
__name: "ConsumerGroupConfigCard",
|
|
4649
4756
|
props: {
|
|
4650
4757
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4671,7 +4778,7 @@ const wl = /* @__PURE__ */ Ft(cl, [["__scopeId", "data-v-2da12897"]]), dl = { cl
|
|
|
4671
4778
|
},
|
|
4672
4779
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4673
4780
|
setup(e) {
|
|
4674
|
-
const n = e, { i18n: { t } } = ct.useI18n(), r =
|
|
4781
|
+
const n = e, { i18n: { t } } = ct.useI18n(), r = S(() => $e.form[n.config.app].edit), o = M({
|
|
4675
4782
|
id: {},
|
|
4676
4783
|
name: {},
|
|
4677
4784
|
created_at: {},
|
|
@@ -4680,8 +4787,8 @@ const wl = /* @__PURE__ */ Ft(cl, [["__scopeId", "data-v-2da12897"]]), dl = { cl
|
|
|
4680
4787
|
tooltip: t("consumer_groups.form.fields.tags.tooltip")
|
|
4681
4788
|
}
|
|
4682
4789
|
});
|
|
4683
|
-
return (a, i) => (f(),
|
|
4684
|
-
|
|
4790
|
+
return (a, i) => (f(), x("div", kl, [
|
|
4791
|
+
N(y(_s), {
|
|
4685
4792
|
config: e.config,
|
|
4686
4793
|
"config-card-doc": e.configCardDoc,
|
|
4687
4794
|
"config-schema": o.value,
|
|
@@ -4697,7 +4804,7 @@ const wl = /* @__PURE__ */ Ft(cl, [["__scopeId", "data-v-2da12897"]]), dl = { cl
|
|
|
4697
4804
|
}
|
|
4698
4805
|
});
|
|
4699
4806
|
export {
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4807
|
+
Nl as ConsumerGroupConfigCard,
|
|
4808
|
+
Ol as ConsumerGroupForm,
|
|
4809
|
+
El as ConsumerGroupList
|
|
4703
4810
|
};
|