@kong-ui-public/entities-snis 1.1.59 → 2.0.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-snis.es.js +1144 -1037
- package/dist/entities-snis.umd.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +7 -7
package/dist/entities-snis.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as X, ref as x, computed as
|
|
2
|
-
import { createI18n as
|
|
3
|
-
import
|
|
4
|
-
import { ToastManager as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as X, ref as x, computed as S, watch as te, renderSlot as Z, createCommentVNode as Q, unref as s, onBeforeMount as Ie, resolveComponent as K, openBlock as k, createBlock as L, withCtx as u, createElementVNode as F, toDisplayString as O, createElementBlock as P, withModifiers as ve, createVNode as I, createTextVNode as W, createSlots as ze, withDirectives as ye, vShow as me, renderList as Ce, Fragment as We, useSlots as st, normalizeClass as he, onMounted as ct, onUnmounted as ut, inject as dt, resolveDynamicComponent as Se, mergeProps as Oe, normalizeStyle as pt, pushScopeId as ft, popScopeId as yt, reactive as Fe } from "vue";
|
|
2
|
+
import { createI18n as xe, i18nTComponent as Je } from "@kong-ui-public/i18n";
|
|
3
|
+
import mt from "axios";
|
|
4
|
+
import { ToastManager as gt } from "@kong/kongponents";
|
|
5
|
+
import { useRouter as Ze } from "vue-router";
|
|
6
|
+
const vt = {
|
|
7
7
|
create: "New SNI",
|
|
8
8
|
copy_id: "Copy ID",
|
|
9
9
|
copy_json: "Copy JSON",
|
|
@@ -11,10 +11,10 @@ const pt = {
|
|
|
11
11
|
delete: "Delete",
|
|
12
12
|
clear: "Clear",
|
|
13
13
|
loading: "Loading..."
|
|
14
|
-
},
|
|
14
|
+
}, ht = {
|
|
15
15
|
placeholder: "Filter by exact name or ID",
|
|
16
16
|
no_results: "No results found"
|
|
17
|
-
},
|
|
17
|
+
}, bt = {
|
|
18
18
|
title: "SNIs",
|
|
19
19
|
list: {
|
|
20
20
|
toolbar_actions: {
|
|
@@ -31,7 +31,7 @@ const pt = {
|
|
|
31
31
|
description: "SNIs are used to map hostnames to a certificate."
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, kt = {
|
|
35
35
|
sections: {
|
|
36
36
|
general: {
|
|
37
37
|
title: "General Information",
|
|
@@ -59,7 +59,7 @@ const pt = {
|
|
|
59
59
|
footer: "Search by exact ID to find certificates not included in the list"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
},
|
|
62
|
+
}, wt = {
|
|
63
63
|
delete: "The SNI could not be deleted at this time.",
|
|
64
64
|
general: "SNIs could not be retrieved",
|
|
65
65
|
certificates: {
|
|
@@ -67,31 +67,31 @@ const pt = {
|
|
|
67
67
|
invalid: "Please select a valid certificate ID"
|
|
68
68
|
},
|
|
69
69
|
copy: "Failed to copy to clipboard"
|
|
70
|
-
},
|
|
70
|
+
}, St = {
|
|
71
71
|
success: "Copied {val} to clipboard",
|
|
72
72
|
success_brief: "Successfully copied to clipboard"
|
|
73
|
-
},
|
|
74
|
-
actions:
|
|
75
|
-
search:
|
|
76
|
-
snis:
|
|
77
|
-
form:
|
|
73
|
+
}, _t = {
|
|
74
|
+
actions: vt,
|
|
75
|
+
search: ht,
|
|
76
|
+
snis: bt,
|
|
77
|
+
form: kt,
|
|
78
78
|
delete: {
|
|
79
79
|
title: "Delete an SNI",
|
|
80
80
|
description: "This action cannot be reversed so make sure to check the SNI usage before deleting."
|
|
81
81
|
},
|
|
82
|
-
errors:
|
|
83
|
-
copy:
|
|
82
|
+
errors: wt,
|
|
83
|
+
copy: St
|
|
84
84
|
};
|
|
85
|
-
function
|
|
86
|
-
const e =
|
|
85
|
+
function It() {
|
|
86
|
+
const e = xe("en-us", _t);
|
|
87
87
|
return {
|
|
88
88
|
i18n: e,
|
|
89
|
-
i18nT:
|
|
89
|
+
i18nT: Je(e)
|
|
90
90
|
// Translation component <i18n-t>
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
const Ye = {
|
|
94
|
-
useI18n:
|
|
94
|
+
useI18n: It
|
|
95
95
|
}, de = {
|
|
96
96
|
list: {
|
|
97
97
|
konnect: {
|
|
@@ -116,75 +116,75 @@ const Ye = {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
var
|
|
120
|
-
function
|
|
119
|
+
var Ge = /* @__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))(Ge || {}), ge = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ge || {}), ne = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(ne || {});
|
|
120
|
+
function Te(e = {}) {
|
|
121
121
|
return {
|
|
122
|
-
axiosInstance:
|
|
122
|
+
axiosInstance: mt.create({
|
|
123
123
|
withCredentials: !0,
|
|
124
124
|
timeout: 3e4,
|
|
125
125
|
...e
|
|
126
126
|
})
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Ct() {
|
|
130
130
|
return {
|
|
131
|
-
debounce: (e,
|
|
131
|
+
debounce: (e, r) => {
|
|
132
132
|
let t;
|
|
133
|
-
return (...
|
|
133
|
+
return (...a) => {
|
|
134
134
|
clearTimeout(t), t = window == null ? void 0 : window.setTimeout(() => {
|
|
135
|
-
e(...
|
|
136
|
-
},
|
|
135
|
+
e(...a);
|
|
136
|
+
}, r);
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
const ke = "khcp-user-table-preferences",
|
|
141
|
+
const ke = "khcp-user-table-preferences", xt = {
|
|
142
142
|
pageSize: 30,
|
|
143
143
|
sortColumnKey: void 0,
|
|
144
144
|
sortColumnOrder: void 0
|
|
145
145
|
};
|
|
146
|
-
function
|
|
146
|
+
function Tt() {
|
|
147
147
|
const e = (t) => {
|
|
148
148
|
if (typeof t == "string")
|
|
149
149
|
try {
|
|
150
150
|
return JSON.parse(t);
|
|
151
|
-
} catch (
|
|
152
|
-
console.error("useTablePreferences(tryParseJson)",
|
|
151
|
+
} catch (a) {
|
|
152
|
+
console.error("useTablePreferences(tryParseJson)", a);
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
|
-
},
|
|
155
|
+
}, r = () => {
|
|
156
156
|
const t = e(localStorage.getItem(ke));
|
|
157
157
|
return !t || !Object.keys(t).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(t));
|
|
158
158
|
};
|
|
159
159
|
return {
|
|
160
|
-
setTablePreferences: (t,
|
|
160
|
+
setTablePreferences: (t, a) => {
|
|
161
161
|
try {
|
|
162
|
-
const n =
|
|
163
|
-
n.set(t,
|
|
162
|
+
const n = r();
|
|
163
|
+
n.set(t, a), localStorage.setItem(ke, JSON.stringify(Object.fromEntries(n.entries())));
|
|
164
164
|
} catch (n) {
|
|
165
165
|
console.error("useTablePreferences(setTablePreferences)", n);
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
getTablePreferences: (t) => {
|
|
169
|
-
const
|
|
170
|
-
return (
|
|
169
|
+
const a = r();
|
|
170
|
+
return (a == null ? void 0 : a.get(t)) || void 0 || xt;
|
|
171
171
|
},
|
|
172
172
|
deleteAllTablePreferences: () => {
|
|
173
173
|
localStorage.removeItem(ke);
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
const
|
|
177
|
+
const Nt = {
|
|
178
178
|
actions: {
|
|
179
179
|
copyId: "Copy ID",
|
|
180
180
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
181
181
|
copyToClipboard: "Copied successfully!",
|
|
182
182
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
183
183
|
}
|
|
184
|
-
},
|
|
184
|
+
}, Et = {
|
|
185
185
|
message: "Are you sure you want to delete this {entityType}?",
|
|
186
186
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
187
|
-
},
|
|
187
|
+
}, At = {
|
|
188
188
|
actions: {
|
|
189
189
|
save: "Save",
|
|
190
190
|
cancel: "Cancel",
|
|
@@ -193,13 +193,13 @@ const _t = {
|
|
|
193
193
|
errors: {
|
|
194
194
|
edit: "The entity could not be edited at this time."
|
|
195
195
|
}
|
|
196
|
-
},
|
|
196
|
+
}, $t = {
|
|
197
197
|
emptyState: {
|
|
198
198
|
noSearchResultsTitle: "No results found",
|
|
199
199
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
200
200
|
noSearchResultsCtaText: "Clear"
|
|
201
201
|
}
|
|
202
|
-
},
|
|
202
|
+
}, Ot = {
|
|
203
203
|
title: "Configuration",
|
|
204
204
|
actions: {
|
|
205
205
|
copy: "Copy JSON"
|
|
@@ -234,7 +234,7 @@ const _t = {
|
|
|
234
234
|
entryTitle: "Entry {index}",
|
|
235
235
|
structuredFormat: "Structured"
|
|
236
236
|
}
|
|
237
|
-
},
|
|
237
|
+
}, Ft = {
|
|
238
238
|
filterButtonText: "Filter",
|
|
239
239
|
fieldLabel: "Filter by:",
|
|
240
240
|
inputPlaceholder: "Enter a value",
|
|
@@ -242,15 +242,15 @@ const _t = {
|
|
|
242
242
|
applyButtonText: "Apply",
|
|
243
243
|
clearButtonText: "Clear",
|
|
244
244
|
clearAllButtonText: "Clear all filters"
|
|
245
|
-
},
|
|
245
|
+
}, Kt = {
|
|
246
246
|
errors: {
|
|
247
247
|
fetch: "Could not fetch available items",
|
|
248
248
|
invalid: "Please select a valid value"
|
|
249
249
|
}
|
|
250
|
-
},
|
|
250
|
+
}, Mt = {
|
|
251
251
|
unexpected: "An unexpected error has occurred",
|
|
252
252
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
253
|
-
},
|
|
253
|
+
}, jt = {
|
|
254
254
|
enable: {
|
|
255
255
|
title: "Enable {entityType}",
|
|
256
256
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -261,32 +261,32 @@ const _t = {
|
|
|
261
261
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
262
262
|
confirmText: "Yes, disable"
|
|
263
263
|
}
|
|
264
|
-
},
|
|
265
|
-
global:
|
|
266
|
-
deleteModal:
|
|
267
|
-
baseForm:
|
|
268
|
-
baseTable:
|
|
269
|
-
baseConfigCard:
|
|
270
|
-
filter:
|
|
271
|
-
debouncedFilter:
|
|
272
|
-
errors:
|
|
273
|
-
toggleModal:
|
|
264
|
+
}, Pt = {
|
|
265
|
+
global: Nt,
|
|
266
|
+
deleteModal: Et,
|
|
267
|
+
baseForm: At,
|
|
268
|
+
baseTable: $t,
|
|
269
|
+
baseConfigCard: Ot,
|
|
270
|
+
filter: Ft,
|
|
271
|
+
debouncedFilter: Kt,
|
|
272
|
+
errors: Mt,
|
|
273
|
+
toggleModal: jt
|
|
274
274
|
};
|
|
275
|
-
function
|
|
276
|
-
const e =
|
|
275
|
+
function Ne() {
|
|
276
|
+
const e = xe("en-us", Pt);
|
|
277
277
|
return {
|
|
278
278
|
i18n: e,
|
|
279
|
-
i18nT:
|
|
279
|
+
i18nT: Je(e)
|
|
280
280
|
// Translation component <i18n-t>
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
const e = (t,
|
|
285
|
-
if (t.length !==
|
|
283
|
+
function Qe() {
|
|
284
|
+
const e = (t, a) => (a == null ? void 0 : a[t]) ?? void 0, r = (t, a) => {
|
|
285
|
+
if (t.length !== a.length)
|
|
286
286
|
return !1;
|
|
287
|
-
const n = /* @__PURE__ */ new Set([...t, ...
|
|
287
|
+
const n = /* @__PURE__ */ new Set([...t, ...a]);
|
|
288
288
|
for (const i of n) {
|
|
289
|
-
const o = t.filter((
|
|
289
|
+
const o = t.filter((d) => d === i).length, f = a.filter((d) => d === i).length;
|
|
290
290
|
if (o !== f)
|
|
291
291
|
return !1;
|
|
292
292
|
}
|
|
@@ -294,16 +294,16 @@ function Ze() {
|
|
|
294
294
|
};
|
|
295
295
|
return {
|
|
296
296
|
getPropValue: e,
|
|
297
|
-
objectsAreEqual: (t,
|
|
297
|
+
objectsAreEqual: (t, a, n) => {
|
|
298
298
|
if (n) {
|
|
299
|
-
if (Object.keys(t).length === Object.keys(
|
|
299
|
+
if (Object.keys(t).length === Object.keys(a).length)
|
|
300
300
|
for (const i in t)
|
|
301
|
-
if (Array.isArray(t[i]) && Array.isArray(
|
|
302
|
-
if (
|
|
301
|
+
if (Array.isArray(t[i]) && Array.isArray(a[i])) {
|
|
302
|
+
if (r(t[i], a[i]))
|
|
303
303
|
continue;
|
|
304
304
|
return !1;
|
|
305
305
|
} else {
|
|
306
|
-
if (t[i] ===
|
|
306
|
+
if (t[i] === a[i])
|
|
307
307
|
continue;
|
|
308
308
|
return !1;
|
|
309
309
|
}
|
|
@@ -312,174 +312,174 @@ function Ze() {
|
|
|
312
312
|
return !0;
|
|
313
313
|
}
|
|
314
314
|
try {
|
|
315
|
-
return JSON.stringify(t) === JSON.stringify(
|
|
315
|
+
return JSON.stringify(t) === JSON.stringify(a);
|
|
316
316
|
} catch {
|
|
317
317
|
return !1;
|
|
318
318
|
}
|
|
319
319
|
},
|
|
320
|
-
sortAlpha: (t) => (
|
|
321
|
-
let i =
|
|
322
|
-
return Array.isArray(
|
|
320
|
+
sortAlpha: (t) => (a, n) => {
|
|
321
|
+
let i = a[t] === void 0 || a[t] === null ? "" : a[t], o = n[t] === void 0 || n[t] === null ? "" : n[t];
|
|
322
|
+
return Array.isArray(a[t]) && (i = a[t][0]), Array.isArray(n[t]) && (o = n[t][0]), i.localeCompare(o);
|
|
323
323
|
},
|
|
324
324
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
325
325
|
};
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Rt(e, r, t, a = {
|
|
328
328
|
fetchedItemsKey: "data",
|
|
329
329
|
searchKeys: ["id"]
|
|
330
330
|
}) {
|
|
331
331
|
t || (t = "100");
|
|
332
|
-
const { axiosInstance: n } =
|
|
332
|
+
const { axiosInstance: n } = Te({
|
|
333
333
|
headers: e.requestHeaders
|
|
334
|
-
}), { i18n: { t: i } } =
|
|
334
|
+
}), { i18n: { t: i } } = Ne(), { debounce: o } = Ct(), f = o(async (b) => {
|
|
335
335
|
await p(b);
|
|
336
|
-
}, 200),
|
|
337
|
-
let
|
|
338
|
-
e.app === "konnect" ?
|
|
339
|
-
const { isValidUuid:
|
|
336
|
+
}, 200), d = x(!1), y = x(""), l = x(""), g = x([]), w = x([]), T = x(void 0), U = s(r);
|
|
337
|
+
let v = `${e.apiBaseUrl}${U}`;
|
|
338
|
+
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
339
|
+
const { isValidUuid: c } = Qe(), h = async () => {
|
|
340
340
|
try {
|
|
341
|
-
|
|
342
|
-
const { data: b } = await n.get(`${
|
|
343
|
-
b != null && b.next || (T.value =
|
|
341
|
+
d.value = !0;
|
|
342
|
+
const { data: b } = await n.get(`${v}?size=${t}`);
|
|
343
|
+
b != null && b.next || (T.value = a.fetchedItemsKey in b ? b[a.fetchedItemsKey] : []), w.value = a.fetchedItemsKey in b ? b[a.fetchedItemsKey] : [], g.value = w.value;
|
|
344
344
|
} catch {
|
|
345
|
-
|
|
345
|
+
g.value = [], y.value = i("debouncedFilter.errors.fetch");
|
|
346
346
|
} finally {
|
|
347
|
-
|
|
347
|
+
d.value = !1;
|
|
348
348
|
}
|
|
349
|
-
},
|
|
350
|
-
var H,
|
|
351
|
-
if (
|
|
352
|
-
if (
|
|
349
|
+
}, C = x(""), p = async (b) => {
|
|
350
|
+
var H, Y, E;
|
|
351
|
+
if (C.value !== b)
|
|
352
|
+
if (C.value = b || "", T.value === void 0)
|
|
353
353
|
try {
|
|
354
|
-
if (
|
|
355
|
-
let
|
|
356
|
-
b && (
|
|
357
|
-
const { data:
|
|
358
|
-
|
|
354
|
+
if (d.value = !0, y.value = "", l.value = "", e.app === "konnect") {
|
|
355
|
+
let j = v + "";
|
|
356
|
+
b && (j += `/${b}`);
|
|
357
|
+
const { data: M } = await n.get(`${j}?size=${t}`);
|
|
358
|
+
a.fetchedItemsKey in M ? g.value = M[a.fetchedItemsKey] : M != null && M.id ? g.value = [M] : g.value = [];
|
|
359
359
|
} else if (b) {
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
const { data:
|
|
363
|
-
return [
|
|
364
|
-
})()) :
|
|
365
|
-
...
|
|
366
|
-
const { data:
|
|
367
|
-
return
|
|
360
|
+
const j = [];
|
|
361
|
+
c(b) && a.searchKeys.includes("id") ? j.push((async () => {
|
|
362
|
+
const { data: $ } = await n.get(`${v}/${b}`);
|
|
363
|
+
return [$[a.fetchedItemsKey] ?? $];
|
|
364
|
+
})()) : j.push(
|
|
365
|
+
...a.searchKeys.filter(($) => $ !== "id").map(async ($) => {
|
|
366
|
+
const { data: D } = await n.get(`${v}?${$}=${b}`);
|
|
367
|
+
return D[a.fetchedItemsKey];
|
|
368
368
|
})
|
|
369
369
|
);
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
var
|
|
373
|
-
(
|
|
374
|
-
|
|
370
|
+
const M = await Promise.all(j), B = /* @__PURE__ */ new Set();
|
|
371
|
+
g.value = [], (H = M == null ? void 0 : M.forEach) == null || H.call(M, ($) => {
|
|
372
|
+
var D;
|
|
373
|
+
(D = $ == null ? void 0 : $.forEach) == null || D.call($, (ee) => {
|
|
374
|
+
B.has(ee.id) || (B.add(ee.id), g.value.push(ee));
|
|
375
375
|
});
|
|
376
376
|
});
|
|
377
377
|
} else
|
|
378
|
-
|
|
379
|
-
} catch (
|
|
380
|
-
((
|
|
378
|
+
g.value = w.value;
|
|
379
|
+
} catch (j) {
|
|
380
|
+
((Y = j == null ? void 0 : j.response) == null ? void 0 : Y.status) === 404 ? l.value = i("debouncedFilter.errors.invalid") : (g.value = [], y.value = i("debouncedFilter.errors.fetch"));
|
|
381
381
|
} finally {
|
|
382
|
-
|
|
382
|
+
d.value = !1;
|
|
383
383
|
}
|
|
384
384
|
else
|
|
385
|
-
|
|
386
|
-
var
|
|
387
|
-
let
|
|
388
|
-
for (const
|
|
389
|
-
const
|
|
390
|
-
|
|
385
|
+
d.value = !0, l.value = "", b ? (g.value = (E = T.value) == null ? void 0 : E.filter((j) => {
|
|
386
|
+
var M;
|
|
387
|
+
let B = !1;
|
|
388
|
+
for (const $ of a.searchKeys) {
|
|
389
|
+
const D = typeof j[$] == "string" ? (M = j[$]) == null ? void 0 : M.toLowerCase() : j[$];
|
|
390
|
+
D != null && D.includes(b.toLowerCase()) && (B = !0);
|
|
391
391
|
}
|
|
392
|
-
return
|
|
393
|
-
}), (!
|
|
392
|
+
return B;
|
|
393
|
+
}), (!g.value || !g.value.length) && (l.value = i("debouncedFilter.errors.invalid"))) : g.value = T.value, d.value = !1;
|
|
394
394
|
};
|
|
395
395
|
return {
|
|
396
|
-
loading:
|
|
396
|
+
loading: d,
|
|
397
397
|
error: y,
|
|
398
398
|
validationError: l,
|
|
399
|
-
results:
|
|
399
|
+
results: g,
|
|
400
400
|
allRecords: T,
|
|
401
|
-
loadItems:
|
|
401
|
+
loadItems: h,
|
|
402
402
|
debouncedQueryChange: f
|
|
403
403
|
};
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
const t =
|
|
405
|
+
function Ut(e, r) {
|
|
406
|
+
const t = s(r), a = S(
|
|
407
407
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
408
408
|
);
|
|
409
|
-
return
|
|
409
|
+
return a.value.search = "", (n) => `${a.value.href}/${n}`;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
const { i18n: { t: e } } =
|
|
411
|
+
function Bt() {
|
|
412
|
+
const { i18n: { t: e } } = Ne();
|
|
413
413
|
return {
|
|
414
|
-
getMessageFromError: (
|
|
415
|
-
var t,
|
|
416
|
-
if (!
|
|
414
|
+
getMessageFromError: (r) => {
|
|
415
|
+
var t, a, n;
|
|
416
|
+
if (!r)
|
|
417
417
|
return e("errors.unexpected");
|
|
418
|
-
if ((t =
|
|
419
|
-
if (
|
|
420
|
-
return
|
|
421
|
-
if ((
|
|
422
|
-
return
|
|
418
|
+
if ((t = r == null ? void 0 : r.response) != null && t.data) {
|
|
419
|
+
if (r.response.data.detail)
|
|
420
|
+
return r.response.data.detail;
|
|
421
|
+
if ((a = r.response.data.details) != null && a.length)
|
|
422
|
+
return r.response.data.details.map((i) => {
|
|
423
423
|
let o = e("errors.unexpected");
|
|
424
424
|
return i.messages && typeof i.messages == "object" && i.messages.length && (o = i.messages.join(", ")), i.field ? `${i.field} - ${o}` : o;
|
|
425
425
|
}).join("; ");
|
|
426
|
-
if (
|
|
427
|
-
const { message: i } =
|
|
426
|
+
if (r.response.data.message) {
|
|
427
|
+
const { message: i } = r.response.data;
|
|
428
428
|
return Array.isArray(i) ? (n = i[0]) != null && n.constraints ? Object.values(i[0].constraints)[0] : i[0] : i;
|
|
429
429
|
}
|
|
430
|
-
if (typeof
|
|
431
|
-
return
|
|
432
|
-
if (typeof
|
|
433
|
-
return Object.keys(
|
|
430
|
+
if (typeof r.response.data == "string")
|
|
431
|
+
return r.response.data;
|
|
432
|
+
if (typeof r.response.data == "object")
|
|
433
|
+
return Object.keys(r.response.data).map((i) => `${i} ${r.response.data[i]}`).join(", ");
|
|
434
434
|
}
|
|
435
|
-
return
|
|
435
|
+
return r.message || e("errors.unexpected");
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
function
|
|
440
|
-
const
|
|
439
|
+
function Vt(e) {
|
|
440
|
+
const r = window.location.origin, t = r.endsWith("/") ? r : `${r}/`;
|
|
441
441
|
try {
|
|
442
|
-
const
|
|
442
|
+
const a = e.join("/"), n = `${t}${a}`, i = e.some((o) => o.trim() === "");
|
|
443
443
|
if (!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(n) && !i && new URL(n))
|
|
444
|
-
return `${t}${
|
|
444
|
+
return `${t}${a}`;
|
|
445
445
|
throw new Error("Invalid url");
|
|
446
|
-
} catch (
|
|
447
|
-
return console.warn("Failed to build valid URL:",
|
|
446
|
+
} catch (a) {
|
|
447
|
+
return console.warn("Failed to build valid URL:", a), "";
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
function
|
|
451
|
-
const t = x(
|
|
450
|
+
function Xe(e, r) {
|
|
451
|
+
const t = x(s(e)), a = x(s(r)), n = S(
|
|
452
452
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
453
|
-
), i =
|
|
454
|
-
() =>
|
|
453
|
+
), i = S(
|
|
454
|
+
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
455
455
|
);
|
|
456
456
|
return (o) => {
|
|
457
|
-
const { page: f, pageSize:
|
|
457
|
+
const { page: f, pageSize: d, offset: y, sortColumnKey: l, sortColumnOrder: g, query: w } = o;
|
|
458
458
|
try {
|
|
459
459
|
let T = new URL(i.value.href);
|
|
460
|
-
return n.value &&
|
|
461
|
-
T.searchParams.append(
|
|
462
|
-
}), l && T.searchParams.append("sort_by", l),
|
|
460
|
+
return n.value && w ? (T.search = "", T = new URL(`${T.href}/${w}/`)) : (n.value || new URLSearchParams(w).forEach((U, v) => {
|
|
461
|
+
T.searchParams.append(v, U);
|
|
462
|
+
}), l && T.searchParams.append("sort_by", l), g === "desc" && T.searchParams.append("sort_desc", "1"), T.searchParams.append("size", String(d))), y && f !== 1 && T.searchParams.append("offset", String(y)), T.href;
|
|
463
463
|
} catch (T) {
|
|
464
|
-
return console.error("RouteList(fetcher)", T),
|
|
464
|
+
return console.error("RouteList(fetcher)", T), a.value;
|
|
465
465
|
}
|
|
466
466
|
};
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
const
|
|
468
|
+
function qt(e, r, t = "data") {
|
|
469
|
+
const a = s(r), { axiosInstance: n } = Te({
|
|
470
470
|
headers: e.requestHeaders
|
|
471
|
-
}), i =
|
|
471
|
+
}), i = Xe(e, a), o = x({
|
|
472
472
|
status: ne.Idle
|
|
473
473
|
});
|
|
474
474
|
return { fetcher: async (f) => {
|
|
475
475
|
try {
|
|
476
476
|
o.value = { status: ne.Loading };
|
|
477
|
-
const
|
|
478
|
-
let
|
|
479
|
-
y[l] && Array.isArray(y[l]) ?
|
|
480
|
-
const
|
|
481
|
-
data:
|
|
482
|
-
total:
|
|
477
|
+
const d = i(f), { data: y } = await n.get(d), l = t && t.replace(/[^\w-_]/gi, "");
|
|
478
|
+
let g;
|
|
479
|
+
y[l] && Array.isArray(y[l]) ? g = y[l] : g = Object.keys(y).length ? [y] : [];
|
|
480
|
+
const w = {
|
|
481
|
+
data: g,
|
|
482
|
+
total: g.length,
|
|
483
483
|
...y.offset ? {
|
|
484
484
|
pagination: {
|
|
485
485
|
offset: y.offset
|
|
@@ -488,180 +488,180 @@ function Pt(e, a, t = "data") {
|
|
|
488
488
|
};
|
|
489
489
|
return o.value = {
|
|
490
490
|
status: ne.Idle,
|
|
491
|
-
response:
|
|
492
|
-
},
|
|
493
|
-
} catch (
|
|
491
|
+
response: w
|
|
492
|
+
}, w;
|
|
493
|
+
} catch (d) {
|
|
494
494
|
const y = {
|
|
495
495
|
data: [],
|
|
496
496
|
total: 0
|
|
497
497
|
};
|
|
498
|
-
return f.query &&
|
|
498
|
+
return f.query && d.response.status === 404 ? (o.value = {
|
|
499
499
|
status: ne.NoResults,
|
|
500
500
|
response: y,
|
|
501
|
-
error:
|
|
501
|
+
error: d
|
|
502
502
|
}, y) : (o.value = {
|
|
503
503
|
status: ne.Error,
|
|
504
504
|
response: y,
|
|
505
|
-
error:
|
|
505
|
+
error: d
|
|
506
506
|
}, y);
|
|
507
507
|
}
|
|
508
508
|
}, fetcherState: o };
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
const e = (t,
|
|
510
|
+
function Lt() {
|
|
511
|
+
const e = (t, a = "_") => t ? t.split(a).map((n) => n.toLowerCase() === "id" ? n.toUpperCase() : n.charAt(0).toUpperCase() + n.substring(1)).join(" ") : "", r = /(?:^|[\s-:'"])\w/g;
|
|
512
512
|
return {
|
|
513
|
-
capitalize: (t) => t ? t.replace(
|
|
513
|
+
capitalize: (t) => t ? t.replace(r, (a) => a.toUpperCase()) : "",
|
|
514
514
|
convertKeyToTitle: e
|
|
515
515
|
};
|
|
516
516
|
}
|
|
517
|
-
const
|
|
517
|
+
const et = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Ke = (e) => {
|
|
518
518
|
if (typeof e != "string")
|
|
519
519
|
throw new TypeError("Invalid argument expected string");
|
|
520
|
-
const
|
|
521
|
-
if (!
|
|
520
|
+
const r = e.match(et);
|
|
521
|
+
if (!r)
|
|
522
522
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
523
|
-
return
|
|
524
|
-
},
|
|
525
|
-
const
|
|
526
|
-
return isNaN(
|
|
527
|
-
},
|
|
528
|
-
if (
|
|
523
|
+
return r.shift(), r;
|
|
524
|
+
}, Me = (e) => e === "*" || e === "x" || e === "X", je = (e) => {
|
|
525
|
+
const r = parseInt(e, 10);
|
|
526
|
+
return isNaN(r) ? e : r;
|
|
527
|
+
}, Dt = (e, r) => typeof e != typeof r ? [String(e), String(r)] : [e, r], Ht = (e, r) => {
|
|
528
|
+
if (Me(e) || Me(r))
|
|
529
529
|
return 0;
|
|
530
|
-
const [t,
|
|
531
|
-
return t >
|
|
532
|
-
}, Pe = (e,
|
|
533
|
-
for (let t = 0; t < Math.max(e.length,
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
return
|
|
530
|
+
const [t, a] = Dt(je(e), je(r));
|
|
531
|
+
return t > a ? 1 : t < a ? -1 : 0;
|
|
532
|
+
}, Pe = (e, r) => {
|
|
533
|
+
for (let t = 0; t < Math.max(e.length, r.length); t++) {
|
|
534
|
+
const a = Ht(e[t] || "0", r[t] || "0");
|
|
535
|
+
if (a !== 0)
|
|
536
|
+
return a;
|
|
537
537
|
}
|
|
538
538
|
return 0;
|
|
539
|
-
},
|
|
540
|
-
const t = Ke(e),
|
|
539
|
+
}, zt = (e, r) => {
|
|
540
|
+
const t = Ke(e), a = Ke(r), n = t.pop(), i = a.pop(), o = Pe(t, a);
|
|
541
541
|
return o !== 0 ? o : n && i ? Pe(n.split("."), i.split(".")) : n || i ? n ? -1 : 1 : 0;
|
|
542
|
-
},
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
return
|
|
546
|
-
},
|
|
542
|
+
}, Re = (e, r, t) => {
|
|
543
|
+
Wt(t);
|
|
544
|
+
const a = zt(e, r);
|
|
545
|
+
return tt[t].includes(a);
|
|
546
|
+
}, tt = {
|
|
547
547
|
">": [1],
|
|
548
548
|
">=": [0, 1],
|
|
549
549
|
"=": [0],
|
|
550
550
|
"<=": [-1, 0],
|
|
551
551
|
"<": [-1],
|
|
552
552
|
"!=": [-1, 1]
|
|
553
|
-
},
|
|
553
|
+
}, Ue = Object.keys(tt), Wt = (e) => {
|
|
554
554
|
if (typeof e != "string")
|
|
555
555
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
556
|
-
if (
|
|
557
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
558
|
-
},
|
|
559
|
-
function
|
|
560
|
-
const { gatewayInfo:
|
|
561
|
-
if (!
|
|
556
|
+
if (Ue.indexOf(e) === -1)
|
|
557
|
+
throw new Error(`Invalid operator, expected one of ${Ue.join("|")}`);
|
|
558
|
+
}, Jt = (e) => typeof e == "string" && /^[v\d]/.test(e) && et.test(e);
|
|
559
|
+
function Zt(e) {
|
|
560
|
+
const { gatewayInfo: r, supportedRange: t } = e;
|
|
561
|
+
if (!r)
|
|
562
562
|
return !0;
|
|
563
|
-
const { edition:
|
|
564
|
-
if (!
|
|
563
|
+
const { edition: a, version: n } = r;
|
|
564
|
+
if (!Jt(n))
|
|
565
565
|
return console.error("Invalid version"), !1;
|
|
566
|
-
const i = t[
|
|
566
|
+
const i = t[a];
|
|
567
567
|
if (!i)
|
|
568
568
|
return !1;
|
|
569
569
|
const [o, f] = i;
|
|
570
|
-
return !(o &&
|
|
570
|
+
return !(o && Re(n, o, "<") || f && Re(n, f, ">"));
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
const
|
|
572
|
+
function Yt(e) {
|
|
573
|
+
const r = x(0), t = x(0), a = x(!1);
|
|
574
574
|
return te(e, (n) => {
|
|
575
|
-
n && !
|
|
575
|
+
n && !a.value && (r.value = n.offsetWidth, t.value = n.scrollWidth, a.value = !0);
|
|
576
576
|
}), {
|
|
577
|
-
isTruncated:
|
|
577
|
+
isTruncated: S(() => r.value < t.value)
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
|
-
const
|
|
581
|
-
function
|
|
580
|
+
const Gt = new gt();
|
|
581
|
+
function Qt() {
|
|
582
582
|
return {
|
|
583
583
|
notify: async (e) => {
|
|
584
|
-
const
|
|
584
|
+
const r = {
|
|
585
585
|
appearance: "success",
|
|
586
586
|
message: "Success",
|
|
587
587
|
timeoutMilliseconds: 3e3
|
|
588
588
|
};
|
|
589
|
-
|
|
590
|
-
...
|
|
589
|
+
Gt.open({
|
|
590
|
+
...r,
|
|
591
591
|
...e
|
|
592
592
|
});
|
|
593
593
|
}
|
|
594
594
|
};
|
|
595
595
|
}
|
|
596
596
|
const oe = {
|
|
597
|
-
useAxios:
|
|
598
|
-
useDebouncedFilter:
|
|
599
|
-
useDeleteUrlBuilder:
|
|
600
|
-
useErrors:
|
|
601
|
-
useExternalLinkCreator:
|
|
602
|
-
useFetcher:
|
|
603
|
-
useFetchUrlBuilder:
|
|
604
|
-
useHelpers:
|
|
605
|
-
useStringHelpers:
|
|
606
|
-
useI18n:
|
|
607
|
-
useGatewayFeatureSupported:
|
|
608
|
-
useTruncationDetector:
|
|
609
|
-
useToaster:
|
|
610
|
-
}, ue = (e,
|
|
597
|
+
useAxios: Te,
|
|
598
|
+
useDebouncedFilter: Rt,
|
|
599
|
+
useDeleteUrlBuilder: Ut,
|
|
600
|
+
useErrors: Bt,
|
|
601
|
+
useExternalLinkCreator: Vt,
|
|
602
|
+
useFetcher: qt,
|
|
603
|
+
useFetchUrlBuilder: Xe,
|
|
604
|
+
useHelpers: Qe,
|
|
605
|
+
useStringHelpers: Lt,
|
|
606
|
+
useI18n: Ne,
|
|
607
|
+
useGatewayFeatureSupported: Zt,
|
|
608
|
+
useTruncationDetector: Yt,
|
|
609
|
+
useToaster: Qt
|
|
610
|
+
}, ue = (e, r) => {
|
|
611
611
|
const t = e.__vccOpts || e;
|
|
612
|
-
for (const [
|
|
613
|
-
t[
|
|
612
|
+
for (const [a, n] of r)
|
|
613
|
+
t[a] = n;
|
|
614
614
|
return t;
|
|
615
|
-
},
|
|
615
|
+
}, Xt = "#0044f4", er = "#3a3f51";
|
|
616
616
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
617
|
-
function
|
|
617
|
+
function rt(e) {
|
|
618
618
|
return typeof e > "u" || e === null;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function tr(e) {
|
|
621
621
|
return typeof e == "object" && e !== null;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
return Array.isArray(e) ? e :
|
|
623
|
+
function rr(e) {
|
|
624
|
+
return Array.isArray(e) ? e : rt(e) ? [] : [e];
|
|
625
625
|
}
|
|
626
|
-
function
|
|
627
|
-
var t,
|
|
628
|
-
if (
|
|
629
|
-
for (i = Object.keys(
|
|
630
|
-
n = i[t], e[n] =
|
|
626
|
+
function ar(e, r) {
|
|
627
|
+
var t, a, n, i;
|
|
628
|
+
if (r)
|
|
629
|
+
for (i = Object.keys(r), t = 0, a = i.length; t < a; t += 1)
|
|
630
|
+
n = i[t], e[n] = r[n];
|
|
631
631
|
return e;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
var t = "",
|
|
635
|
-
for (
|
|
633
|
+
function nr(e, r) {
|
|
634
|
+
var t = "", a;
|
|
635
|
+
for (a = 0; a < r; a += 1)
|
|
636
636
|
t += e;
|
|
637
637
|
return t;
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function ir(e) {
|
|
640
640
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
641
641
|
}
|
|
642
|
-
var
|
|
643
|
-
isNothing:
|
|
644
|
-
isObject:
|
|
645
|
-
toArray:
|
|
646
|
-
repeat:
|
|
647
|
-
isNegativeZero:
|
|
648
|
-
extend:
|
|
642
|
+
var or = rt, lr = tr, sr = rr, cr = nr, ur = ir, dr = ar, Ee = {
|
|
643
|
+
isNothing: or,
|
|
644
|
+
isObject: lr,
|
|
645
|
+
toArray: sr,
|
|
646
|
+
repeat: cr,
|
|
647
|
+
isNegativeZero: ur,
|
|
648
|
+
extend: dr
|
|
649
649
|
};
|
|
650
|
-
function
|
|
651
|
-
var t = "",
|
|
652
|
-
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !
|
|
650
|
+
function at(e, r) {
|
|
651
|
+
var t = "", a = e.reason || "(unknown reason)";
|
|
652
|
+
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !r && e.mark.snippet && (t += `
|
|
653
653
|
|
|
654
|
-
` + e.mark.snippet),
|
|
654
|
+
` + e.mark.snippet), a + " " + t) : a;
|
|
655
655
|
}
|
|
656
|
-
function pe(e,
|
|
657
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark =
|
|
656
|
+
function pe(e, r) {
|
|
657
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = r, this.message = at(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
658
658
|
}
|
|
659
659
|
pe.prototype = Object.create(Error.prototype);
|
|
660
660
|
pe.prototype.constructor = pe;
|
|
661
661
|
pe.prototype.toString = function(e) {
|
|
662
|
-
return this.name + ": " +
|
|
662
|
+
return this.name + ": " + at(this, e);
|
|
663
663
|
};
|
|
664
|
-
var ie = pe,
|
|
664
|
+
var ie = pe, pr = [
|
|
665
665
|
"kind",
|
|
666
666
|
"multi",
|
|
667
667
|
"resolve",
|
|
@@ -672,41 +672,41 @@ var ie = pe, la = [
|
|
|
672
672
|
"representName",
|
|
673
673
|
"defaultStyle",
|
|
674
674
|
"styleAliases"
|
|
675
|
-
],
|
|
675
|
+
], fr = [
|
|
676
676
|
"scalar",
|
|
677
677
|
"sequence",
|
|
678
678
|
"mapping"
|
|
679
679
|
];
|
|
680
|
-
function
|
|
681
|
-
var
|
|
680
|
+
function yr(e) {
|
|
681
|
+
var r = {};
|
|
682
682
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
683
|
-
e[t].forEach(function(
|
|
684
|
-
|
|
683
|
+
e[t].forEach(function(a) {
|
|
684
|
+
r[String(a)] = t;
|
|
685
685
|
});
|
|
686
|
-
}),
|
|
686
|
+
}), r;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
689
|
-
if (
|
|
690
|
-
if (
|
|
688
|
+
function mr(e, r) {
|
|
689
|
+
if (r = r || {}, Object.keys(r).forEach(function(t) {
|
|
690
|
+
if (pr.indexOf(t) === -1)
|
|
691
691
|
throw new ie('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
692
|
-
}), this.options =
|
|
692
|
+
}), this.options = r, this.tag = e, this.kind = r.kind || null, this.resolve = r.resolve || function() {
|
|
693
693
|
return !0;
|
|
694
|
-
}, this.construct =
|
|
694
|
+
}, this.construct = r.construct || function(t) {
|
|
695
695
|
return t;
|
|
696
|
-
}, this.instanceOf =
|
|
696
|
+
}, this.instanceOf = r.instanceOf || null, this.predicate = r.predicate || null, this.represent = r.represent || null, this.representName = r.representName || null, this.defaultStyle = r.defaultStyle || null, this.multi = r.multi || !1, this.styleAliases = yr(r.styleAliases || null), fr.indexOf(this.kind) === -1)
|
|
697
697
|
throw new ie('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
698
698
|
}
|
|
699
|
-
var z =
|
|
700
|
-
function Be(e,
|
|
699
|
+
var z = mr;
|
|
700
|
+
function Be(e, r) {
|
|
701
701
|
var t = [];
|
|
702
|
-
return e[
|
|
702
|
+
return e[r].forEach(function(a) {
|
|
703
703
|
var n = t.length;
|
|
704
704
|
t.forEach(function(i, o) {
|
|
705
|
-
i.tag ===
|
|
706
|
-
}), t[n] =
|
|
705
|
+
i.tag === a.tag && i.kind === a.kind && i.multi === a.multi && (n = o);
|
|
706
|
+
}), t[n] = a;
|
|
707
707
|
}), t;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function gr() {
|
|
710
710
|
var e = {
|
|
711
711
|
scalar: {},
|
|
712
712
|
sequence: {},
|
|
@@ -718,28 +718,28 @@ function da() {
|
|
|
718
718
|
mapping: [],
|
|
719
719
|
fallback: []
|
|
720
720
|
}
|
|
721
|
-
},
|
|
722
|
-
function
|
|
721
|
+
}, r, t;
|
|
722
|
+
function a(n) {
|
|
723
723
|
n.multi ? (e.multi[n.kind].push(n), e.multi.fallback.push(n)) : e[n.kind][n.tag] = e.fallback[n.tag] = n;
|
|
724
724
|
}
|
|
725
|
-
for (
|
|
726
|
-
arguments[
|
|
725
|
+
for (r = 0, t = arguments.length; r < t; r += 1)
|
|
726
|
+
arguments[r].forEach(a);
|
|
727
727
|
return e;
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function _e(e) {
|
|
730
730
|
return this.extend(e);
|
|
731
731
|
}
|
|
732
|
-
|
|
733
|
-
var
|
|
732
|
+
_e.prototype.extend = function(e) {
|
|
733
|
+
var r = [], t = [];
|
|
734
734
|
if (e instanceof z)
|
|
735
735
|
t.push(e);
|
|
736
736
|
else if (Array.isArray(e))
|
|
737
737
|
t = t.concat(e);
|
|
738
738
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
|
739
|
-
e.implicit && (
|
|
739
|
+
e.implicit && (r = r.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit));
|
|
740
740
|
else
|
|
741
741
|
throw new ie("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
742
|
-
|
|
742
|
+
r.forEach(function(n) {
|
|
743
743
|
if (!(n instanceof z))
|
|
744
744
|
throw new ie("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
745
745
|
if (n.loadKind && n.loadKind !== "scalar")
|
|
@@ -750,48 +750,48 @@ Se.prototype.extend = function(e) {
|
|
|
750
750
|
if (!(n instanceof z))
|
|
751
751
|
throw new ie("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
752
752
|
});
|
|
753
|
-
var
|
|
754
|
-
return
|
|
753
|
+
var a = Object.create(_e.prototype);
|
|
754
|
+
return a.implicit = (this.implicit || []).concat(r), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = Be(a, "implicit"), a.compiledExplicit = Be(a, "explicit"), a.compiledTypeMap = gr(a.compiledImplicit, a.compiledExplicit), a;
|
|
755
755
|
};
|
|
756
|
-
var
|
|
756
|
+
var vr = _e, hr = new z("tag:yaml.org,2002:str", {
|
|
757
757
|
kind: "scalar",
|
|
758
758
|
construct: function(e) {
|
|
759
759
|
return e !== null ? e : "";
|
|
760
760
|
}
|
|
761
|
-
}),
|
|
761
|
+
}), br = new z("tag:yaml.org,2002:seq", {
|
|
762
762
|
kind: "sequence",
|
|
763
763
|
construct: function(e) {
|
|
764
764
|
return e !== null ? e : [];
|
|
765
765
|
}
|
|
766
|
-
}),
|
|
766
|
+
}), kr = new z("tag:yaml.org,2002:map", {
|
|
767
767
|
kind: "mapping",
|
|
768
768
|
construct: function(e) {
|
|
769
769
|
return e !== null ? e : {};
|
|
770
770
|
}
|
|
771
|
-
}),
|
|
771
|
+
}), wr = new vr({
|
|
772
772
|
explicit: [
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
773
|
+
hr,
|
|
774
|
+
br,
|
|
775
|
+
kr
|
|
776
776
|
]
|
|
777
777
|
});
|
|
778
|
-
function
|
|
778
|
+
function Sr(e) {
|
|
779
779
|
if (e === null)
|
|
780
780
|
return !0;
|
|
781
|
-
var
|
|
782
|
-
return
|
|
781
|
+
var r = e.length;
|
|
782
|
+
return r === 1 && e === "~" || r === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function _r() {
|
|
785
785
|
return null;
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function Ir(e) {
|
|
788
788
|
return e === null;
|
|
789
789
|
}
|
|
790
|
-
var
|
|
790
|
+
var Cr = new z("tag:yaml.org,2002:null", {
|
|
791
791
|
kind: "scalar",
|
|
792
|
-
resolve:
|
|
793
|
-
construct:
|
|
794
|
-
predicate:
|
|
792
|
+
resolve: Sr,
|
|
793
|
+
construct: _r,
|
|
794
|
+
predicate: Ir,
|
|
795
795
|
represent: {
|
|
796
796
|
canonical: function() {
|
|
797
797
|
return "~";
|
|
@@ -811,23 +811,23 @@ var ka = new z("tag:yaml.org,2002:null", {
|
|
|
811
811
|
},
|
|
812
812
|
defaultStyle: "lowercase"
|
|
813
813
|
});
|
|
814
|
-
function
|
|
814
|
+
function xr(e) {
|
|
815
815
|
if (e === null)
|
|
816
816
|
return !1;
|
|
817
|
-
var
|
|
818
|
-
return
|
|
817
|
+
var r = e.length;
|
|
818
|
+
return r === 4 && (e === "true" || e === "True" || e === "TRUE") || r === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Tr(e) {
|
|
821
821
|
return e === "true" || e === "True" || e === "TRUE";
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function Nr(e) {
|
|
824
824
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
825
825
|
}
|
|
826
|
-
var
|
|
826
|
+
var Er = new z("tag:yaml.org,2002:bool", {
|
|
827
827
|
kind: "scalar",
|
|
828
|
-
resolve:
|
|
829
|
-
construct:
|
|
830
|
-
predicate:
|
|
828
|
+
resolve: xr,
|
|
829
|
+
construct: Tr,
|
|
830
|
+
predicate: Nr,
|
|
831
831
|
represent: {
|
|
832
832
|
lowercase: function(e) {
|
|
833
833
|
return e ? "true" : "false";
|
|
@@ -841,84 +841,84 @@ var Ia = new z("tag:yaml.org,2002:bool", {
|
|
|
841
841
|
},
|
|
842
842
|
defaultStyle: "lowercase"
|
|
843
843
|
});
|
|
844
|
-
function
|
|
844
|
+
function Ar(e) {
|
|
845
845
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function $r(e) {
|
|
848
848
|
return 48 <= e && e <= 55;
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Or(e) {
|
|
851
851
|
return 48 <= e && e <= 57;
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function Fr(e) {
|
|
854
854
|
if (e === null)
|
|
855
855
|
return !1;
|
|
856
|
-
var
|
|
857
|
-
if (!
|
|
856
|
+
var r = e.length, t = 0, a = !1, n;
|
|
857
|
+
if (!r)
|
|
858
858
|
return !1;
|
|
859
859
|
if (n = e[t], (n === "-" || n === "+") && (n = e[++t]), n === "0") {
|
|
860
|
-
if (t + 1 ===
|
|
860
|
+
if (t + 1 === r)
|
|
861
861
|
return !0;
|
|
862
862
|
if (n = e[++t], n === "b") {
|
|
863
|
-
for (t++; t <
|
|
863
|
+
for (t++; t < r; t++)
|
|
864
864
|
if (n = e[t], n !== "_") {
|
|
865
865
|
if (n !== "0" && n !== "1")
|
|
866
866
|
return !1;
|
|
867
|
-
|
|
867
|
+
a = !0;
|
|
868
868
|
}
|
|
869
|
-
return
|
|
869
|
+
return a && n !== "_";
|
|
870
870
|
}
|
|
871
871
|
if (n === "x") {
|
|
872
|
-
for (t++; t <
|
|
872
|
+
for (t++; t < r; t++)
|
|
873
873
|
if (n = e[t], n !== "_") {
|
|
874
|
-
if (!
|
|
874
|
+
if (!Ar(e.charCodeAt(t)))
|
|
875
875
|
return !1;
|
|
876
|
-
|
|
876
|
+
a = !0;
|
|
877
877
|
}
|
|
878
|
-
return
|
|
878
|
+
return a && n !== "_";
|
|
879
879
|
}
|
|
880
880
|
if (n === "o") {
|
|
881
|
-
for (t++; t <
|
|
881
|
+
for (t++; t < r; t++)
|
|
882
882
|
if (n = e[t], n !== "_") {
|
|
883
|
-
if (
|
|
883
|
+
if (!$r(e.charCodeAt(t)))
|
|
884
884
|
return !1;
|
|
885
|
-
|
|
885
|
+
a = !0;
|
|
886
886
|
}
|
|
887
|
-
return
|
|
887
|
+
return a && n !== "_";
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
890
|
if (n === "_")
|
|
891
891
|
return !1;
|
|
892
|
-
for (; t <
|
|
892
|
+
for (; t < r; t++)
|
|
893
893
|
if (n = e[t], n !== "_") {
|
|
894
|
-
if (!
|
|
894
|
+
if (!Or(e.charCodeAt(t)))
|
|
895
895
|
return !1;
|
|
896
|
-
|
|
896
|
+
a = !0;
|
|
897
897
|
}
|
|
898
|
-
return !(!
|
|
898
|
+
return !(!a || n === "_");
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
var
|
|
902
|
-
if (
|
|
900
|
+
function Kr(e) {
|
|
901
|
+
var r = e, t = 1, a;
|
|
902
|
+
if (r.indexOf("_") !== -1 && (r = r.replace(/_/g, "")), a = r[0], (a === "-" || a === "+") && (a === "-" && (t = -1), r = r.slice(1), a = r[0]), r === "0")
|
|
903
903
|
return 0;
|
|
904
|
-
if (
|
|
905
|
-
if (
|
|
906
|
-
return t * parseInt(
|
|
907
|
-
if (
|
|
908
|
-
return t * parseInt(
|
|
909
|
-
if (
|
|
910
|
-
return t * parseInt(
|
|
904
|
+
if (a === "0") {
|
|
905
|
+
if (r[1] === "b")
|
|
906
|
+
return t * parseInt(r.slice(2), 2);
|
|
907
|
+
if (r[1] === "x")
|
|
908
|
+
return t * parseInt(r.slice(2), 16);
|
|
909
|
+
if (r[1] === "o")
|
|
910
|
+
return t * parseInt(r.slice(2), 8);
|
|
911
911
|
}
|
|
912
|
-
return t * parseInt(
|
|
912
|
+
return t * parseInt(r, 10);
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function Mr(e) {
|
|
915
915
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !Ee.isNegativeZero(e);
|
|
916
916
|
}
|
|
917
|
-
var
|
|
917
|
+
var jr = new z("tag:yaml.org,2002:int", {
|
|
918
918
|
kind: "scalar",
|
|
919
|
-
resolve:
|
|
920
|
-
construct:
|
|
921
|
-
predicate:
|
|
919
|
+
resolve: Fr,
|
|
920
|
+
construct: Kr,
|
|
921
|
+
predicate: Mr,
|
|
922
922
|
represent: {
|
|
923
923
|
binary: function(e) {
|
|
924
924
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -941,24 +941,24 @@ var Aa = new z("tag:yaml.org,2002:int", {
|
|
|
941
941
|
decimal: [10, "dec"],
|
|
942
942
|
hexadecimal: [16, "hex"]
|
|
943
943
|
}
|
|
944
|
-
}),
|
|
944
|
+
}), Pr = new RegExp(
|
|
945
945
|
// 2.5e4, 2.5 and integers
|
|
946
946
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
947
947
|
);
|
|
948
|
-
function
|
|
949
|
-
return !(e === null ||
|
|
948
|
+
function Rr(e) {
|
|
949
|
+
return !(e === null || !Pr.test(e) || // Quick hack to not allow integers end with `_`
|
|
950
950
|
// Probably should update regexp & check speed
|
|
951
951
|
e[e.length - 1] === "_");
|
|
952
952
|
}
|
|
953
|
-
function
|
|
954
|
-
var
|
|
955
|
-
return
|
|
953
|
+
function Ur(e) {
|
|
954
|
+
var r, t;
|
|
955
|
+
return r = e.replace(/_/g, "").toLowerCase(), t = r[0] === "-" ? -1 : 1, "+-".indexOf(r[0]) >= 0 && (r = r.slice(1)), r === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : r === ".nan" ? NaN : t * parseFloat(r, 10);
|
|
956
956
|
}
|
|
957
|
-
var
|
|
958
|
-
function
|
|
957
|
+
var Br = /^[-+]?[0-9]+e/;
|
|
958
|
+
function Vr(e, r) {
|
|
959
959
|
var t;
|
|
960
960
|
if (isNaN(e))
|
|
961
|
-
switch (
|
|
961
|
+
switch (r) {
|
|
962
962
|
case "lowercase":
|
|
963
963
|
return ".nan";
|
|
964
964
|
case "uppercase":
|
|
@@ -967,7 +967,7 @@ function Ma(e, a) {
|
|
|
967
967
|
return ".NaN";
|
|
968
968
|
}
|
|
969
969
|
else if (Number.POSITIVE_INFINITY === e)
|
|
970
|
-
switch (
|
|
970
|
+
switch (r) {
|
|
971
971
|
case "lowercase":
|
|
972
972
|
return ".inf";
|
|
973
973
|
case "uppercase":
|
|
@@ -976,7 +976,7 @@ function Ma(e, a) {
|
|
|
976
976
|
return ".Inf";
|
|
977
977
|
}
|
|
978
978
|
else if (Number.NEGATIVE_INFINITY === e)
|
|
979
|
-
switch (
|
|
979
|
+
switch (r) {
|
|
980
980
|
case "lowercase":
|
|
981
981
|
return "-.inf";
|
|
982
982
|
case "uppercase":
|
|
@@ -986,192 +986,192 @@ function Ma(e, a) {
|
|
|
986
986
|
}
|
|
987
987
|
else if (Ee.isNegativeZero(e))
|
|
988
988
|
return "-0.0";
|
|
989
|
-
return t = e.toString(10),
|
|
989
|
+
return t = e.toString(10), Br.test(t) ? t.replace("e", ".e") : t;
|
|
990
990
|
}
|
|
991
|
-
function
|
|
991
|
+
function qr(e) {
|
|
992
992
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || Ee.isNegativeZero(e));
|
|
993
993
|
}
|
|
994
|
-
var
|
|
994
|
+
var Lr = new z("tag:yaml.org,2002:float", {
|
|
995
995
|
kind: "scalar",
|
|
996
|
-
resolve:
|
|
997
|
-
construct:
|
|
998
|
-
predicate:
|
|
999
|
-
represent:
|
|
996
|
+
resolve: Rr,
|
|
997
|
+
construct: Ur,
|
|
998
|
+
predicate: qr,
|
|
999
|
+
represent: Vr,
|
|
1000
1000
|
defaultStyle: "lowercase"
|
|
1001
|
-
}),
|
|
1001
|
+
}), Dr = wr.extend({
|
|
1002
1002
|
implicit: [
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1003
|
+
Cr,
|
|
1004
|
+
Er,
|
|
1005
|
+
jr,
|
|
1006
|
+
Lr
|
|
1007
1007
|
]
|
|
1008
|
-
}),
|
|
1008
|
+
}), Hr = Dr, nt = new RegExp(
|
|
1009
1009
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1010
|
-
),
|
|
1010
|
+
), it = new RegExp(
|
|
1011
1011
|
"^([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]))?))?$"
|
|
1012
1012
|
);
|
|
1013
|
-
function
|
|
1014
|
-
return e === null ? !1 :
|
|
1013
|
+
function zr(e) {
|
|
1014
|
+
return e === null ? !1 : nt.exec(e) !== null || it.exec(e) !== null;
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1017
|
-
var
|
|
1018
|
-
if (
|
|
1016
|
+
function Wr(e) {
|
|
1017
|
+
var r, t, a, n, i, o, f, d = 0, y = null, l, g, w;
|
|
1018
|
+
if (r = nt.exec(e), r === null && (r = it.exec(e)), r === null)
|
|
1019
1019
|
throw new Error("Date resolve error");
|
|
1020
|
-
if (t = +
|
|
1021
|
-
return new Date(Date.UTC(t,
|
|
1022
|
-
if (i = +
|
|
1023
|
-
for (
|
|
1024
|
-
|
|
1025
|
-
|
|
1020
|
+
if (t = +r[1], a = +r[2] - 1, n = +r[3], !r[4])
|
|
1021
|
+
return new Date(Date.UTC(t, a, n));
|
|
1022
|
+
if (i = +r[4], o = +r[5], f = +r[6], r[7]) {
|
|
1023
|
+
for (d = r[7].slice(0, 3); d.length < 3; )
|
|
1024
|
+
d += "0";
|
|
1025
|
+
d = +d;
|
|
1026
1026
|
}
|
|
1027
|
-
return
|
|
1027
|
+
return r[9] && (l = +r[10], g = +(r[11] || 0), y = (l * 60 + g) * 6e4, r[9] === "-" && (y = -y)), w = new Date(Date.UTC(t, a, n, i, o, f, d)), y && w.setTime(w.getTime() - y), w;
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1029
|
+
function Jr(e) {
|
|
1030
1030
|
return e.toISOString();
|
|
1031
1031
|
}
|
|
1032
|
-
var
|
|
1032
|
+
var Zr = new z("tag:yaml.org,2002:timestamp", {
|
|
1033
1033
|
kind: "scalar",
|
|
1034
|
-
resolve:
|
|
1035
|
-
construct:
|
|
1034
|
+
resolve: zr,
|
|
1035
|
+
construct: Wr,
|
|
1036
1036
|
instanceOf: Date,
|
|
1037
|
-
represent:
|
|
1037
|
+
represent: Jr
|
|
1038
1038
|
});
|
|
1039
|
-
function
|
|
1039
|
+
function Yr(e) {
|
|
1040
1040
|
return e === "<<" || e === null;
|
|
1041
1041
|
}
|
|
1042
|
-
var
|
|
1042
|
+
var Gr = new z("tag:yaml.org,2002:merge", {
|
|
1043
1043
|
kind: "scalar",
|
|
1044
|
-
resolve:
|
|
1045
|
-
}),
|
|
1044
|
+
resolve: Yr
|
|
1045
|
+
}), Ae = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1046
1046
|
\r`;
|
|
1047
|
-
function
|
|
1047
|
+
function Qr(e) {
|
|
1048
1048
|
if (e === null)
|
|
1049
1049
|
return !1;
|
|
1050
|
-
var
|
|
1050
|
+
var r, t, a = 0, n = e.length, i = Ae;
|
|
1051
1051
|
for (t = 0; t < n; t++)
|
|
1052
|
-
if (
|
|
1053
|
-
if (
|
|
1052
|
+
if (r = i.indexOf(e.charAt(t)), !(r > 64)) {
|
|
1053
|
+
if (r < 0)
|
|
1054
1054
|
return !1;
|
|
1055
|
-
|
|
1055
|
+
a += 6;
|
|
1056
1056
|
}
|
|
1057
|
-
return
|
|
1057
|
+
return a % 8 === 0;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1060
|
-
var
|
|
1061
|
-
for (
|
|
1062
|
-
|
|
1059
|
+
function Xr(e) {
|
|
1060
|
+
var r, t, a = e.replace(/[\r\n=]/g, ""), n = a.length, i = Ae, o = 0, f = [];
|
|
1061
|
+
for (r = 0; r < n; r++)
|
|
1062
|
+
r % 4 === 0 && r && (f.push(o >> 16 & 255), f.push(o >> 8 & 255), f.push(o & 255)), o = o << 6 | i.indexOf(a.charAt(r));
|
|
1063
1063
|
return t = n % 4 * 6, t === 0 ? (f.push(o >> 16 & 255), f.push(o >> 8 & 255), f.push(o & 255)) : t === 18 ? (f.push(o >> 10 & 255), f.push(o >> 2 & 255)) : t === 12 && f.push(o >> 4 & 255), new Uint8Array(f);
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
var
|
|
1067
|
-
for (
|
|
1068
|
-
|
|
1069
|
-
return n = i % 3, n === 0 ? (
|
|
1065
|
+
function ea(e) {
|
|
1066
|
+
var r = "", t = 0, a, n, i = e.length, o = Ae;
|
|
1067
|
+
for (a = 0; a < i; a++)
|
|
1068
|
+
a % 3 === 0 && a && (r += o[t >> 18 & 63], r += o[t >> 12 & 63], r += o[t >> 6 & 63], r += o[t & 63]), t = (t << 8) + e[a];
|
|
1069
|
+
return n = i % 3, n === 0 ? (r += o[t >> 18 & 63], r += o[t >> 12 & 63], r += o[t >> 6 & 63], r += o[t & 63]) : n === 2 ? (r += o[t >> 10 & 63], r += o[t >> 4 & 63], r += o[t << 2 & 63], r += o[64]) : n === 1 && (r += o[t >> 2 & 63], r += o[t << 4 & 63], r += o[64], r += o[64]), r;
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function ta(e) {
|
|
1072
1072
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1073
1073
|
}
|
|
1074
|
-
var
|
|
1074
|
+
var ra = new z("tag:yaml.org,2002:binary", {
|
|
1075
1075
|
kind: "scalar",
|
|
1076
|
-
resolve:
|
|
1077
|
-
construct:
|
|
1078
|
-
predicate:
|
|
1079
|
-
represent:
|
|
1080
|
-
}),
|
|
1081
|
-
function
|
|
1076
|
+
resolve: Qr,
|
|
1077
|
+
construct: Xr,
|
|
1078
|
+
predicate: ta,
|
|
1079
|
+
represent: ea
|
|
1080
|
+
}), aa = Object.prototype.hasOwnProperty, na = Object.prototype.toString;
|
|
1081
|
+
function ia(e) {
|
|
1082
1082
|
if (e === null)
|
|
1083
1083
|
return !0;
|
|
1084
|
-
var
|
|
1085
|
-
for (t = 0,
|
|
1086
|
-
if (n = f[t], o = !1,
|
|
1084
|
+
var r = [], t, a, n, i, o, f = e;
|
|
1085
|
+
for (t = 0, a = f.length; t < a; t += 1) {
|
|
1086
|
+
if (n = f[t], o = !1, na.call(n) !== "[object Object]")
|
|
1087
1087
|
return !1;
|
|
1088
1088
|
for (i in n)
|
|
1089
|
-
if (
|
|
1089
|
+
if (aa.call(n, i))
|
|
1090
1090
|
if (!o)
|
|
1091
1091
|
o = !0;
|
|
1092
1092
|
else
|
|
1093
1093
|
return !1;
|
|
1094
1094
|
if (!o)
|
|
1095
1095
|
return !1;
|
|
1096
|
-
if (
|
|
1097
|
-
|
|
1096
|
+
if (r.indexOf(i) === -1)
|
|
1097
|
+
r.push(i);
|
|
1098
1098
|
else
|
|
1099
1099
|
return !1;
|
|
1100
1100
|
}
|
|
1101
1101
|
return !0;
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1103
|
+
function oa(e) {
|
|
1104
1104
|
return e !== null ? e : [];
|
|
1105
1105
|
}
|
|
1106
|
-
var
|
|
1106
|
+
var la = new z("tag:yaml.org,2002:omap", {
|
|
1107
1107
|
kind: "sequence",
|
|
1108
|
-
resolve:
|
|
1109
|
-
construct:
|
|
1110
|
-
}),
|
|
1111
|
-
function
|
|
1108
|
+
resolve: ia,
|
|
1109
|
+
construct: oa
|
|
1110
|
+
}), sa = Object.prototype.toString;
|
|
1111
|
+
function ca(e) {
|
|
1112
1112
|
if (e === null)
|
|
1113
1113
|
return !0;
|
|
1114
|
-
var
|
|
1115
|
-
for (i = new Array(o.length),
|
|
1116
|
-
if (
|
|
1114
|
+
var r, t, a, n, i, o = e;
|
|
1115
|
+
for (i = new Array(o.length), r = 0, t = o.length; r < t; r += 1) {
|
|
1116
|
+
if (a = o[r], sa.call(a) !== "[object Object]" || (n = Object.keys(a), n.length !== 1))
|
|
1117
1117
|
return !1;
|
|
1118
|
-
i[
|
|
1118
|
+
i[r] = [n[0], a[n[0]]];
|
|
1119
1119
|
}
|
|
1120
1120
|
return !0;
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function ua(e) {
|
|
1123
1123
|
if (e === null)
|
|
1124
1124
|
return [];
|
|
1125
|
-
var
|
|
1126
|
-
for (i = new Array(o.length),
|
|
1127
|
-
|
|
1125
|
+
var r, t, a, n, i, o = e;
|
|
1126
|
+
for (i = new Array(o.length), r = 0, t = o.length; r < t; r += 1)
|
|
1127
|
+
a = o[r], n = Object.keys(a), i[r] = [n[0], a[n[0]]];
|
|
1128
1128
|
return i;
|
|
1129
1129
|
}
|
|
1130
|
-
var
|
|
1130
|
+
var da = new z("tag:yaml.org,2002:pairs", {
|
|
1131
1131
|
kind: "sequence",
|
|
1132
|
-
resolve:
|
|
1133
|
-
construct:
|
|
1134
|
-
}),
|
|
1135
|
-
function
|
|
1132
|
+
resolve: ca,
|
|
1133
|
+
construct: ua
|
|
1134
|
+
}), pa = Object.prototype.hasOwnProperty;
|
|
1135
|
+
function fa(e) {
|
|
1136
1136
|
if (e === null)
|
|
1137
1137
|
return !0;
|
|
1138
|
-
var
|
|
1139
|
-
for (
|
|
1140
|
-
if (
|
|
1138
|
+
var r, t = e;
|
|
1139
|
+
for (r in t)
|
|
1140
|
+
if (pa.call(t, r) && t[r] !== null)
|
|
1141
1141
|
return !1;
|
|
1142
1142
|
return !0;
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function ya(e) {
|
|
1145
1145
|
return e !== null ? e : {};
|
|
1146
1146
|
}
|
|
1147
|
-
var
|
|
1147
|
+
var ma = new z("tag:yaml.org,2002:set", {
|
|
1148
1148
|
kind: "mapping",
|
|
1149
|
-
resolve:
|
|
1150
|
-
construct:
|
|
1149
|
+
resolve: fa,
|
|
1150
|
+
construct: ya
|
|
1151
1151
|
});
|
|
1152
|
-
|
|
1152
|
+
Hr.extend({
|
|
1153
1153
|
implicit: [
|
|
1154
|
-
|
|
1155
|
-
|
|
1154
|
+
Zr,
|
|
1155
|
+
Gr
|
|
1156
1156
|
],
|
|
1157
1157
|
explicit: [
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1158
|
+
ra,
|
|
1159
|
+
la,
|
|
1160
|
+
da,
|
|
1161
|
+
ma
|
|
1162
1162
|
]
|
|
1163
1163
|
});
|
|
1164
|
-
function
|
|
1164
|
+
function Ve(e) {
|
|
1165
1165
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1166
1166
|
` : 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" : "";
|
|
1167
1167
|
}
|
|
1168
|
-
var
|
|
1168
|
+
var ga = new Array(256), va = new Array(256);
|
|
1169
1169
|
for (var ce = 0; ce < 256; ce++)
|
|
1170
|
-
|
|
1171
|
-
const
|
|
1170
|
+
ga[ce] = Ve(ce) ? 1 : 0, va[ce] = Ve(ce);
|
|
1171
|
+
const ha = ["onReset", "onSubmit"], ba = {
|
|
1172
1172
|
class: "form-actions",
|
|
1173
1173
|
"data-testid": "form-actions"
|
|
1174
|
-
},
|
|
1174
|
+
}, ka = /* @__PURE__ */ X({
|
|
1175
1175
|
__name: "EntityBaseForm",
|
|
1176
1176
|
props: {
|
|
1177
1177
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1219,104 +1219,104 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
},
|
|
1221
1221
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
1222
|
-
setup(e, { emit:
|
|
1222
|
+
setup(e, { emit: r }) {
|
|
1223
1223
|
var t;
|
|
1224
|
-
const
|
|
1225
|
-
headers: (t =
|
|
1226
|
-
}),
|
|
1227
|
-
var
|
|
1228
|
-
if (!
|
|
1224
|
+
const a = e, n = Ze(), { i18n: { t: i } } = oe.useI18n(), { getMessageFromError: o } = oe.useErrors(), { axiosInstance: f } = oe.useAxios({
|
|
1225
|
+
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
1226
|
+
}), d = x(!1), y = x(!1), l = x(""), g = S(() => a.canSubmit === !1 || a.isReadonly), w = S(() => {
|
|
1227
|
+
var c, h;
|
|
1228
|
+
if (!a.editId)
|
|
1229
1229
|
return "";
|
|
1230
|
-
let
|
|
1231
|
-
return
|
|
1230
|
+
let C = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
1231
|
+
return a.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((c = a.config) == null ? void 0 : c.controlPlaneId) || "") : a.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (h = a.config) != null && h.workspace ? `/${a.config.workspace}` : "")), C = C.replace(/{id}/gi, a.editId), C;
|
|
1232
1232
|
}), T = () => {
|
|
1233
|
-
|
|
1233
|
+
a.config.cancelRoute ? n.push(a.config.cancelRoute) : U();
|
|
1234
1234
|
}, U = () => {
|
|
1235
|
-
|
|
1236
|
-
},
|
|
1237
|
-
|
|
1235
|
+
r("cancel");
|
|
1236
|
+
}, v = () => {
|
|
1237
|
+
g.value || r("submit");
|
|
1238
1238
|
};
|
|
1239
|
-
return te(() =>
|
|
1240
|
-
|
|
1241
|
-
}, { immediate: !0 }),
|
|
1242
|
-
if (
|
|
1239
|
+
return te(() => d.value, (c) => {
|
|
1240
|
+
r("loading", c);
|
|
1241
|
+
}, { immediate: !0 }), Ie(async () => {
|
|
1242
|
+
if (a.editId)
|
|
1243
1243
|
try {
|
|
1244
|
-
y.value = !1,
|
|
1245
|
-
const { data:
|
|
1246
|
-
|
|
1247
|
-
} catch (
|
|
1248
|
-
const
|
|
1249
|
-
l.value =
|
|
1244
|
+
y.value = !1, d.value = !0;
|
|
1245
|
+
const { data: c } = await f.get(w.value);
|
|
1246
|
+
r("fetch:success", c);
|
|
1247
|
+
} catch (c) {
|
|
1248
|
+
const h = o(c);
|
|
1249
|
+
l.value = h.startsWith("code") ? i("baseForm.errors.edit") : h, y.value = !0, r("fetch:error", c);
|
|
1250
1250
|
} finally {
|
|
1251
|
-
|
|
1251
|
+
d.value = !1;
|
|
1252
1252
|
}
|
|
1253
|
-
}), (
|
|
1254
|
-
const
|
|
1255
|
-
return
|
|
1256
|
-
body:
|
|
1257
|
-
|
|
1253
|
+
}), (c, h) => {
|
|
1254
|
+
const C = K("KSkeleton"), p = K("KEmptyState"), b = K("KAlert"), H = K("KButton"), Y = K("KCard");
|
|
1255
|
+
return k(), L(Y, { class: "kong-ui-entity-base-form" }, {
|
|
1256
|
+
body: u(() => [
|
|
1257
|
+
d.value ? (k(), L(C, {
|
|
1258
1258
|
key: 0,
|
|
1259
1259
|
type: "form"
|
|
1260
|
-
})) : y.value ? (
|
|
1260
|
+
})) : y.value ? (k(), L(p, {
|
|
1261
1261
|
key: 1,
|
|
1262
|
-
"cta-text":
|
|
1262
|
+
"cta-text": s(i)("baseForm.actions.back"),
|
|
1263
1263
|
"data-testid": "form-fetch-error",
|
|
1264
1264
|
"handle-click": T,
|
|
1265
1265
|
"is-error": !0
|
|
1266
1266
|
}, {
|
|
1267
|
-
message:
|
|
1268
|
-
|
|
1267
|
+
message: u(() => [
|
|
1268
|
+
F("h3", null, O(l.value), 1)
|
|
1269
1269
|
]),
|
|
1270
1270
|
_: 1
|
|
1271
|
-
}, 8, ["cta-text"])) : (
|
|
1271
|
+
}, 8, ["cta-text"])) : (k(), P("form", {
|
|
1272
1272
|
key: 2,
|
|
1273
1273
|
"data-testid": "form-content",
|
|
1274
1274
|
onReset: ve(U, ["prevent"]),
|
|
1275
|
-
onSubmit: ve(
|
|
1275
|
+
onSubmit: ve(v, ["prevent"])
|
|
1276
1276
|
}, [
|
|
1277
|
-
|
|
1278
|
-
e.errorMessage ? (
|
|
1277
|
+
Z(c.$slots, "default", {}, void 0, !0),
|
|
1278
|
+
e.errorMessage ? (k(), L(b, {
|
|
1279
1279
|
key: 0,
|
|
1280
1280
|
"alert-message": e.errorMessage,
|
|
1281
1281
|
appearance: "danger",
|
|
1282
1282
|
"data-testid": "form-error"
|
|
1283
1283
|
}, null, 8, ["alert-message"])) : Q("", !0),
|
|
1284
|
-
|
|
1285
|
-
|
|
1284
|
+
F("div", ba, [
|
|
1285
|
+
Z(c.$slots, "form-actions", {}, () => [
|
|
1286
1286
|
I(H, {
|
|
1287
|
-
appearance: "
|
|
1287
|
+
appearance: "secondary",
|
|
1288
1288
|
"data-testid": "form-cancel",
|
|
1289
1289
|
disabled: e.isReadonly,
|
|
1290
1290
|
type: "reset"
|
|
1291
1291
|
}, {
|
|
1292
|
-
default:
|
|
1293
|
-
W(
|
|
1292
|
+
default: u(() => [
|
|
1293
|
+
W(O(s(i)("baseForm.actions.cancel")), 1)
|
|
1294
1294
|
]),
|
|
1295
1295
|
_: 1
|
|
1296
1296
|
}, 8, ["disabled"]),
|
|
1297
1297
|
I(H, {
|
|
1298
1298
|
appearance: "primary",
|
|
1299
1299
|
"data-testid": "form-submit",
|
|
1300
|
-
disabled:
|
|
1300
|
+
disabled: g.value,
|
|
1301
1301
|
type: "submit"
|
|
1302
1302
|
}, {
|
|
1303
|
-
default:
|
|
1304
|
-
W(
|
|
1303
|
+
default: u(() => [
|
|
1304
|
+
W(O(s(i)("baseForm.actions.save")), 1)
|
|
1305
1305
|
]),
|
|
1306
1306
|
_: 1
|
|
1307
1307
|
}, 8, ["disabled"])
|
|
1308
1308
|
], !0)
|
|
1309
1309
|
])
|
|
1310
|
-
], 40,
|
|
1310
|
+
], 40, ha))
|
|
1311
1311
|
]),
|
|
1312
1312
|
_: 3
|
|
1313
1313
|
});
|
|
1314
1314
|
};
|
|
1315
1315
|
}
|
|
1316
|
-
}),
|
|
1316
|
+
}), wa = /* @__PURE__ */ ue(ka, [["__scopeId", "data-v-81612aef"]]), Sa = {
|
|
1317
1317
|
key: 0,
|
|
1318
1318
|
"data-testid": "first-col"
|
|
1319
|
-
},
|
|
1319
|
+
}, _a = /* @__PURE__ */ X({
|
|
1320
1320
|
__name: "EntityBaseTableCell",
|
|
1321
1321
|
props: {
|
|
1322
1322
|
keyName: {
|
|
@@ -1329,68 +1329,68 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
},
|
|
1331
1331
|
setup(e) {
|
|
1332
|
-
const
|
|
1333
|
-
var
|
|
1334
|
-
return ((
|
|
1335
|
-
}),
|
|
1336
|
-
var
|
|
1337
|
-
return ((
|
|
1338
|
-
}), n =
|
|
1339
|
-
var
|
|
1340
|
-
const
|
|
1341
|
-
return
|
|
1332
|
+
const r = e, t = S(() => {
|
|
1333
|
+
var v;
|
|
1334
|
+
return ((v = r.rowEl) == null ? void 0 : v.querySelector(`[data-testid="${r.keyName}"]`)) || null;
|
|
1335
|
+
}), a = S(() => {
|
|
1336
|
+
var v;
|
|
1337
|
+
return ((v = t.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
1338
|
+
}), n = S(() => {
|
|
1339
|
+
var v, c;
|
|
1340
|
+
const h = (v = r.rowEl) == null ? void 0 : v.querySelectorAll("td");
|
|
1341
|
+
return h ? ((c = h[0]) == null ? void 0 : c.getAttribute("data-testid")) === r.keyName : !1;
|
|
1342
1342
|
});
|
|
1343
1343
|
let i;
|
|
1344
1344
|
const o = () => {
|
|
1345
1345
|
i && (i.disconnect(), i = void 0);
|
|
1346
1346
|
}, f = () => {
|
|
1347
|
-
var
|
|
1348
|
-
y.value = ((
|
|
1349
|
-
},
|
|
1350
|
-
|
|
1351
|
-
(
|
|
1347
|
+
var v, c, h;
|
|
1348
|
+
y.value = ((v = a.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, l.value = ((c = t.value) == null ? void 0 : c.clientWidth) || 0, g.value = ((h = d.value) == null ? void 0 : h.innerText) || "";
|
|
1349
|
+
}, d = x({}), y = x(0), l = x(0), g = x(""), w = S(() => [a.value, t.value]), T = te(
|
|
1350
|
+
w,
|
|
1351
|
+
(v) => {
|
|
1352
1352
|
if (n.value && (o(), "ResizeObserver" in window && window)) {
|
|
1353
|
-
i = new ResizeObserver((
|
|
1353
|
+
i = new ResizeObserver((c) => {
|
|
1354
1354
|
window.requestAnimationFrame(() => {
|
|
1355
|
-
!Array.isArray(
|
|
1355
|
+
!Array.isArray(c) || !c.length || f();
|
|
1356
1356
|
});
|
|
1357
1357
|
});
|
|
1358
|
-
for (const
|
|
1359
|
-
|
|
1358
|
+
for (const c of v)
|
|
1359
|
+
c && i.observe(c);
|
|
1360
1360
|
}
|
|
1361
1361
|
},
|
|
1362
1362
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
1363
|
-
), U =
|
|
1364
|
-
return
|
|
1363
|
+
), U = S(() => n.value ? y.value > l.value : !1);
|
|
1364
|
+
return ct(() => {
|
|
1365
1365
|
f();
|
|
1366
|
-
}),
|
|
1366
|
+
}), ut(() => {
|
|
1367
1367
|
T();
|
|
1368
|
-
}), (
|
|
1369
|
-
const
|
|
1370
|
-
return
|
|
1368
|
+
}), (v, c) => {
|
|
1369
|
+
const h = K("KTooltip");
|
|
1370
|
+
return k(), P("span", {
|
|
1371
1371
|
ref_key: "contentRef",
|
|
1372
|
-
ref:
|
|
1372
|
+
ref: d,
|
|
1373
1373
|
class: "content-wrapper"
|
|
1374
1374
|
}, [
|
|
1375
|
-
n.value ? (
|
|
1376
|
-
I(
|
|
1377
|
-
label: U.value ?
|
|
1375
|
+
n.value ? (k(), P("span", Sa, [
|
|
1376
|
+
I(h, {
|
|
1377
|
+
label: U.value ? g.value : "",
|
|
1378
1378
|
"max-width": "300",
|
|
1379
1379
|
placement: "bottomStart"
|
|
1380
1380
|
}, {
|
|
1381
|
-
default:
|
|
1382
|
-
|
|
1381
|
+
default: u(() => [
|
|
1382
|
+
Z(v.$slots, "default", {}, void 0, !0)
|
|
1383
1383
|
]),
|
|
1384
1384
|
_: 3
|
|
1385
1385
|
}, 8, ["label"])
|
|
1386
|
-
])) :
|
|
1386
|
+
])) : Z(v.$slots, "default", { key: 1 }, void 0, !0)
|
|
1387
1387
|
], 512);
|
|
1388
1388
|
};
|
|
1389
1389
|
}
|
|
1390
|
-
}),
|
|
1390
|
+
}), Ia = /* @__PURE__ */ ue(_a, [["__scopeId", "data-v-e42a20c9"]]), Ca = { class: "toolbar-container" }, xa = {
|
|
1391
1391
|
key: 0,
|
|
1392
1392
|
class: "toolbar-button-container"
|
|
1393
|
-
},
|
|
1393
|
+
}, Ta = ["data-testid"], Na = /* @__PURE__ */ X({
|
|
1394
1394
|
__name: "EntityBaseTable",
|
|
1395
1395
|
props: {
|
|
1396
1396
|
// table header configuration
|
|
@@ -1498,8 +1498,8 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
},
|
|
1500
1500
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
1501
|
-
setup(e, { emit:
|
|
1502
|
-
const t = e, { i18n: { t:
|
|
1501
|
+
setup(e, { emit: r }) {
|
|
1502
|
+
const t = e, { i18n: { t: a } } = oe.useI18n(), n = S(() => t.cacheIdentifier || t.preferencesStorageKey), i = (p) => p.hasData || !!t.query, o = S(() => {
|
|
1503
1503
|
const p = [];
|
|
1504
1504
|
return Object.keys(t.tableHeaders).forEach((b) => {
|
|
1505
1505
|
const H = t.tableHeaders[b];
|
|
@@ -1516,9 +1516,9 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1516
1516
|
"data-rowid": p.id,
|
|
1517
1517
|
"data-testid": p.name,
|
|
1518
1518
|
...t.rowAttributes(p)
|
|
1519
|
-
}),
|
|
1519
|
+
}), d = x({}), y = (p) => {
|
|
1520
1520
|
var b;
|
|
1521
|
-
return (b =
|
|
1521
|
+
return (b = d.value) == null ? void 0 : b.$el.querySelector(`[data-rowid="${p.id}"]`);
|
|
1522
1522
|
}, l = (p) => {
|
|
1523
1523
|
const b = {
|
|
1524
1524
|
"data-testid": p.headerKey,
|
|
@@ -1529,44 +1529,44 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1529
1529
|
overflowX: "hidden",
|
|
1530
1530
|
textOverflow: "ellipsis"
|
|
1531
1531
|
}), b;
|
|
1532
|
-
},
|
|
1533
|
-
|
|
1534
|
-
},
|
|
1535
|
-
|
|
1536
|
-
}, T =
|
|
1537
|
-
|
|
1532
|
+
}, g = () => {
|
|
1533
|
+
r("empty-state-cta-clicked"), w();
|
|
1534
|
+
}, w = () => {
|
|
1535
|
+
r("clear-search-input");
|
|
1536
|
+
}, T = S(() => t.disableRowClick ? void 0 : (p, b) => {
|
|
1537
|
+
r("click:row", b);
|
|
1538
1538
|
}), U = (p) => {
|
|
1539
|
-
|
|
1540
|
-
}, { setTablePreferences:
|
|
1541
|
-
const p =
|
|
1539
|
+
r("sort", p);
|
|
1540
|
+
}, { setTablePreferences: v, getTablePreferences: c } = Tt(), h = S(() => {
|
|
1541
|
+
const p = c(t.preferencesStorageKey);
|
|
1542
1542
|
return {
|
|
1543
1543
|
...t.initialFetcherParams,
|
|
1544
1544
|
...p
|
|
1545
1545
|
};
|
|
1546
|
-
}),
|
|
1547
|
-
t.preferencesStorageKey &&
|
|
1546
|
+
}), C = (p) => {
|
|
1547
|
+
t.preferencesStorageKey && v(t.preferencesStorageKey, p);
|
|
1548
1548
|
};
|
|
1549
1549
|
return (p, b) => {
|
|
1550
|
-
const H =
|
|
1551
|
-
return
|
|
1550
|
+
const H = K("KIcon"), Y = K("KButton"), E = K("KDropdown"), j = K("KTable"), M = K("KCard");
|
|
1551
|
+
return k(), L(M, {
|
|
1552
1552
|
class: "kong-ui-entity-base-table",
|
|
1553
1553
|
title: e.title
|
|
1554
1554
|
}, {
|
|
1555
|
-
body:
|
|
1556
|
-
I(
|
|
1555
|
+
body: u(() => [
|
|
1556
|
+
I(j, {
|
|
1557
1557
|
ref_key: "tableRefs",
|
|
1558
|
-
ref:
|
|
1558
|
+
ref: d,
|
|
1559
1559
|
"cache-identifier": n.value,
|
|
1560
1560
|
"cell-attrs": l,
|
|
1561
1561
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
1562
1562
|
"disable-sorting": e.disableSorting,
|
|
1563
1563
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
1564
|
-
"empty-state-action-message": e.query ?
|
|
1564
|
+
"empty-state-action-message": e.query ? s(a)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
1565
1565
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
1566
1566
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
1567
1567
|
"empty-state-icon-size": "96",
|
|
1568
|
-
"empty-state-message": e.query ?
|
|
1569
|
-
"empty-state-title": e.query ?
|
|
1568
|
+
"empty-state-message": e.query ? s(a)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
1569
|
+
"empty-state-title": e.query ? s(a)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
1570
1570
|
"enable-client-sort": e.enableClientSort,
|
|
1571
1571
|
"error-state-title": e.errorMessage,
|
|
1572
1572
|
fetcher: e.fetcher,
|
|
@@ -1574,51 +1574,51 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1574
1574
|
"has-error": !!e.errorMessage,
|
|
1575
1575
|
headers: o.value,
|
|
1576
1576
|
"hide-pagination-when-optional": "",
|
|
1577
|
-
"initial-fetcher-params":
|
|
1577
|
+
"initial-fetcher-params": h.value,
|
|
1578
1578
|
"is-loading": e.isLoading,
|
|
1579
1579
|
"pagination-type": e.paginationType,
|
|
1580
1580
|
"row-attrs": f,
|
|
1581
1581
|
"search-input": e.query,
|
|
1582
|
-
onKtableEmptyStateCtaClicked:
|
|
1582
|
+
onKtableEmptyStateCtaClicked: g,
|
|
1583
1583
|
"onRow:click": T.value,
|
|
1584
|
-
onSort: b[0] || (b[0] = (
|
|
1585
|
-
"onUpdate:tablePreferences":
|
|
1586
|
-
},
|
|
1587
|
-
toolbar:
|
|
1588
|
-
ye(
|
|
1589
|
-
|
|
1590
|
-
p.$slots["toolbar-button"] ? (
|
|
1591
|
-
|
|
1584
|
+
onSort: b[0] || (b[0] = (B) => U(B)),
|
|
1585
|
+
"onUpdate:tablePreferences": C
|
|
1586
|
+
}, ze({
|
|
1587
|
+
toolbar: u(({ state: B }) => [
|
|
1588
|
+
ye(F("div", Ca, [
|
|
1589
|
+
Z(p.$slots, "toolbar-filter", {}, void 0, !0),
|
|
1590
|
+
p.$slots["toolbar-button"] ? (k(), P("div", xa, [
|
|
1591
|
+
Z(p.$slots, "toolbar-button", {}, void 0, !0)
|
|
1592
1592
|
])) : Q("", !0)
|
|
1593
1593
|
], 512), [
|
|
1594
|
-
[me, i(
|
|
1594
|
+
[me, i(B)]
|
|
1595
1595
|
])
|
|
1596
1596
|
]),
|
|
1597
|
-
actions:
|
|
1598
|
-
|
|
1597
|
+
actions: u(({ row: B, rowKey: $, rowValue: D }) => [
|
|
1598
|
+
F("div", {
|
|
1599
1599
|
class: "actions-container",
|
|
1600
|
-
"data-testid":
|
|
1600
|
+
"data-testid": B.name
|
|
1601
1601
|
}, [
|
|
1602
|
-
I(
|
|
1602
|
+
I(E, {
|
|
1603
1603
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
1604
1604
|
width: e.dropdownMenuWidth
|
|
1605
1605
|
}, {
|
|
1606
|
-
items:
|
|
1607
|
-
|
|
1608
|
-
row:
|
|
1609
|
-
rowKey:
|
|
1610
|
-
rowValue:
|
|
1606
|
+
items: u(() => [
|
|
1607
|
+
Z(p.$slots, "actions", {
|
|
1608
|
+
row: B,
|
|
1609
|
+
rowKey: $,
|
|
1610
|
+
rowValue: D
|
|
1611
1611
|
}, void 0, !0)
|
|
1612
1612
|
]),
|
|
1613
|
-
default:
|
|
1614
|
-
I(
|
|
1613
|
+
default: u(() => [
|
|
1614
|
+
I(Y, {
|
|
1615
1615
|
class: "actions-trigger",
|
|
1616
1616
|
"data-testid": "overflow-actions-button",
|
|
1617
1617
|
size: "small"
|
|
1618
1618
|
}, {
|
|
1619
|
-
icon:
|
|
1619
|
+
icon: u(() => [
|
|
1620
1620
|
I(H, {
|
|
1621
|
-
color:
|
|
1621
|
+
color: s(er),
|
|
1622
1622
|
icon: "more",
|
|
1623
1623
|
size: "16"
|
|
1624
1624
|
}, null, 8, ["color"])
|
|
@@ -1628,24 +1628,24 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1628
1628
|
]),
|
|
1629
1629
|
_: 2
|
|
1630
1630
|
}, 1032, ["width"])
|
|
1631
|
-
], 8,
|
|
1631
|
+
], 8, Ta)
|
|
1632
1632
|
]),
|
|
1633
1633
|
_: 2
|
|
1634
1634
|
}, [
|
|
1635
|
-
|
|
1636
|
-
name:
|
|
1637
|
-
fn:
|
|
1638
|
-
I(
|
|
1639
|
-
"key-name": String(
|
|
1640
|
-
"row-el": y(
|
|
1635
|
+
Ce(e.tableHeaders, (B, $) => ({
|
|
1636
|
+
name: $,
|
|
1637
|
+
fn: u(({ row: D, rowKey: ee, rowValue: le }) => [
|
|
1638
|
+
I(Ia, {
|
|
1639
|
+
"key-name": String($),
|
|
1640
|
+
"row-el": y(D)
|
|
1641
1641
|
}, {
|
|
1642
|
-
default:
|
|
1643
|
-
|
|
1644
|
-
row:
|
|
1642
|
+
default: u(() => [
|
|
1643
|
+
Z(p.$slots, $, {
|
|
1644
|
+
row: D,
|
|
1645
1645
|
rowKey: ee,
|
|
1646
1646
|
rowValue: le
|
|
1647
1647
|
}, () => [
|
|
1648
|
-
W(
|
|
1648
|
+
W(O(le), 1)
|
|
1649
1649
|
], !0)
|
|
1650
1650
|
]),
|
|
1651
1651
|
_: 2
|
|
@@ -1658,13 +1658,13 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1658
1658
|
}, 8, ["title"]);
|
|
1659
1659
|
};
|
|
1660
1660
|
}
|
|
1661
|
-
}),
|
|
1661
|
+
}), Ea = /* @__PURE__ */ ue(Na, [["__scopeId", "data-v-86d2d2a3"]]), Aa = {
|
|
1662
1662
|
key: 0,
|
|
1663
1663
|
class: "kong-ui-entity-delete-error"
|
|
1664
|
-
},
|
|
1664
|
+
}, $a = {
|
|
1665
1665
|
key: 1,
|
|
1666
1666
|
class: "description"
|
|
1667
|
-
},
|
|
1667
|
+
}, Oa = /* @__PURE__ */ X({
|
|
1668
1668
|
__name: "EntityDeleteModal",
|
|
1669
1669
|
props: {
|
|
1670
1670
|
visible: {
|
|
@@ -1702,15 +1702,15 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1702
1702
|
}
|
|
1703
1703
|
},
|
|
1704
1704
|
emits: ["cancel", "proceed"],
|
|
1705
|
-
setup(e, { emit:
|
|
1706
|
-
const t = e, { i18nT:
|
|
1707
|
-
|
|
1705
|
+
setup(e, { emit: r }) {
|
|
1706
|
+
const t = e, { i18nT: a } = oe.useI18n(), n = S(() => t.needConfirm ? t.entityName : ""), i = () => {
|
|
1707
|
+
r("cancel");
|
|
1708
1708
|
}, o = () => {
|
|
1709
|
-
|
|
1709
|
+
r("proceed");
|
|
1710
1710
|
};
|
|
1711
|
-
return (f,
|
|
1712
|
-
const y =
|
|
1713
|
-
return
|
|
1711
|
+
return (f, d) => {
|
|
1712
|
+
const y = K("KAlert"), l = K("KPrompt");
|
|
1713
|
+
return k(), L(l, {
|
|
1714
1714
|
"action-button-text": "Yes, delete",
|
|
1715
1715
|
"action-pending": e.actionPending,
|
|
1716
1716
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -1721,36 +1721,36 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1721
1721
|
onCanceled: i,
|
|
1722
1722
|
onProceed: o
|
|
1723
1723
|
}, {
|
|
1724
|
-
"body-content":
|
|
1725
|
-
e.error ? (
|
|
1724
|
+
"body-content": u(() => [
|
|
1725
|
+
e.error ? (k(), P("div", Aa, [
|
|
1726
1726
|
I(y, { appearance: "danger" }, {
|
|
1727
|
-
alertMessage:
|
|
1728
|
-
W(
|
|
1727
|
+
alertMessage: u(() => [
|
|
1728
|
+
W(O(e.error), 1)
|
|
1729
1729
|
]),
|
|
1730
1730
|
_: 1
|
|
1731
1731
|
})
|
|
1732
1732
|
])) : Q("", !0),
|
|
1733
|
-
I(
|
|
1733
|
+
I(s(a), {
|
|
1734
1734
|
class: "message",
|
|
1735
1735
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
1736
1736
|
tag: "p"
|
|
1737
|
-
},
|
|
1738
|
-
entityType:
|
|
1739
|
-
W(
|
|
1737
|
+
}, ze({
|
|
1738
|
+
entityType: u(() => [
|
|
1739
|
+
W(O(t.entityType), 1)
|
|
1740
1740
|
]),
|
|
1741
1741
|
_: 2
|
|
1742
1742
|
}, [
|
|
1743
1743
|
t.entityName ? {
|
|
1744
1744
|
name: "entityName",
|
|
1745
|
-
fn:
|
|
1746
|
-
|
|
1745
|
+
fn: u(() => [
|
|
1746
|
+
F("strong", null, O(t.entityName), 1)
|
|
1747
1747
|
]),
|
|
1748
1748
|
key: "0"
|
|
1749
1749
|
} : void 0
|
|
1750
1750
|
]), 1032, ["keypath"]),
|
|
1751
|
-
t.description || f.$slots.description ? (
|
|
1752
|
-
|
|
1753
|
-
|
|
1751
|
+
t.description || f.$slots.description ? (k(), P("div", $a, [
|
|
1752
|
+
Z(f.$slots, "description", {}, () => [
|
|
1753
|
+
F("p", null, O(t.description), 1)
|
|
1754
1754
|
], !0)
|
|
1755
1755
|
])) : Q("", !0)
|
|
1756
1756
|
]),
|
|
@@ -1758,13 +1758,13 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1758
1758
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
1759
1759
|
};
|
|
1760
1760
|
}
|
|
1761
|
-
}),
|
|
1761
|
+
}), Fa = /* @__PURE__ */ ue(Oa, [["__scopeId", "data-v-1c9a2a07"]]), Ka = {
|
|
1762
1762
|
fill: "none",
|
|
1763
1763
|
height: "20",
|
|
1764
1764
|
viewBox: "0 0 20 20",
|
|
1765
1765
|
width: "20",
|
|
1766
1766
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1767
|
-
},
|
|
1767
|
+
}, Ma = {
|
|
1768
1768
|
id: "mask0_180_20349",
|
|
1769
1769
|
height: "20",
|
|
1770
1770
|
maskUnits: "userSpaceOnUse",
|
|
@@ -1772,35 +1772,35 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1772
1772
|
width: "20",
|
|
1773
1773
|
x: "0",
|
|
1774
1774
|
y: "0"
|
|
1775
|
-
},
|
|
1775
|
+
}, ja = ["fill"], Pa = { mask: "url(#mask0_180_20349)" }, Ra = ["fill"], qe = /* @__PURE__ */ X({
|
|
1776
1776
|
__name: "IconFilter",
|
|
1777
1777
|
props: {
|
|
1778
1778
|
color: {
|
|
1779
1779
|
type: String,
|
|
1780
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
1780
|
+
default: `var(--kong-ui-entity-filter-color, ${Xt})`
|
|
1781
1781
|
}
|
|
1782
1782
|
},
|
|
1783
1783
|
setup(e) {
|
|
1784
|
-
return (
|
|
1785
|
-
|
|
1786
|
-
|
|
1784
|
+
return (r, t) => (k(), P("svg", Ka, [
|
|
1785
|
+
F("mask", Ma, [
|
|
1786
|
+
F("rect", {
|
|
1787
1787
|
fill: e.color,
|
|
1788
1788
|
height: "20",
|
|
1789
1789
|
width: "20"
|
|
1790
|
-
}, null, 8,
|
|
1790
|
+
}, null, 8, ja)
|
|
1791
1791
|
]),
|
|
1792
|
-
|
|
1793
|
-
|
|
1792
|
+
F("g", Pa, [
|
|
1793
|
+
F("path", {
|
|
1794
1794
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
1795
1795
|
fill: e.color
|
|
1796
|
-
}, null, 8,
|
|
1796
|
+
}, null, 8, Ra)
|
|
1797
1797
|
])
|
|
1798
1798
|
]));
|
|
1799
1799
|
}
|
|
1800
|
-
}),
|
|
1800
|
+
}), Ua = {
|
|
1801
1801
|
key: 1,
|
|
1802
1802
|
class: "kong-ui-entity-filter"
|
|
1803
|
-
},
|
|
1803
|
+
}, Ba = { class: "menu-item-title" }, Va = { class: "menu-item-indicator" }, qa = { class: "menu-item-body" }, La = ["for"], Da = { class: "menu-item-buttons" }, Ha = { class: "filter-clear-button-container" }, za = /* @__PURE__ */ X({
|
|
1804
1804
|
__name: "EntityFilter",
|
|
1805
1805
|
props: {
|
|
1806
1806
|
// filter config, either exact match or fuzzy match
|
|
@@ -1819,51 +1819,51 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1819
1819
|
}
|
|
1820
1820
|
},
|
|
1821
1821
|
emits: ["update:modelValue"],
|
|
1822
|
-
setup(e, { emit:
|
|
1823
|
-
const t = e, { i18n: { t:
|
|
1824
|
-
const
|
|
1825
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
1826
|
-
|
|
1827
|
-
}),
|
|
1828
|
-
}), f =
|
|
1829
|
-
const
|
|
1830
|
-
return Object.keys(
|
|
1831
|
-
label:
|
|
1832
|
-
value:
|
|
1822
|
+
setup(e, { emit: r }) {
|
|
1823
|
+
const t = e, { i18n: { t: a } } = oe.useI18n(), n = x(!1), i = x({}), o = S(() => {
|
|
1824
|
+
const c = [];
|
|
1825
|
+
return new URLSearchParams(t.modelValue).forEach((h, C) => {
|
|
1826
|
+
h !== "" && c.push(C);
|
|
1827
|
+
}), c;
|
|
1828
|
+
}), f = S(() => {
|
|
1829
|
+
const c = t.config.fields;
|
|
1830
|
+
return Object.keys(c).filter((h) => c[h].searchable).map((h) => ({
|
|
1831
|
+
label: c[h].label || h,
|
|
1832
|
+
value: h
|
|
1833
1833
|
}));
|
|
1834
1834
|
});
|
|
1835
|
-
te(() => t.modelValue, (
|
|
1836
|
-
i.value = {}, new URLSearchParams(
|
|
1837
|
-
i.value[
|
|
1835
|
+
te(() => t.modelValue, (c) => {
|
|
1836
|
+
i.value = {}, new URLSearchParams(c).forEach((h, C) => {
|
|
1837
|
+
i.value[C] = h;
|
|
1838
1838
|
});
|
|
1839
1839
|
});
|
|
1840
|
-
const
|
|
1840
|
+
const d = () => {
|
|
1841
1841
|
n.value = !n.value;
|
|
1842
|
-
}, y = (
|
|
1843
|
-
|
|
1844
|
-
}, l = (
|
|
1845
|
-
var
|
|
1846
|
-
return (((
|
|
1842
|
+
}, y = (c) => {
|
|
1843
|
+
r("update:modelValue", c);
|
|
1844
|
+
}, l = (c) => `filter-${c}`, g = (c) => {
|
|
1845
|
+
var h, C;
|
|
1846
|
+
return (((C = (h = t.config.schema) == null ? void 0 : h[c]) == null ? void 0 : C.values) ?? []).map((p) => ({
|
|
1847
1847
|
value: p,
|
|
1848
1848
|
label: p
|
|
1849
1849
|
}));
|
|
1850
|
-
},
|
|
1851
|
-
var
|
|
1852
|
-
return ((
|
|
1853
|
-
}, T = (
|
|
1850
|
+
}, w = (c) => {
|
|
1851
|
+
var h, C;
|
|
1852
|
+
return ((C = (h = t.config.schema) == null ? void 0 : h[c]) == null ? void 0 : C.type) ?? "text";
|
|
1853
|
+
}, T = (c) => {
|
|
1854
1854
|
i.value = {
|
|
1855
1855
|
...i.value,
|
|
1856
|
-
[
|
|
1857
|
-
},
|
|
1856
|
+
[c]: ""
|
|
1857
|
+
}, v();
|
|
1858
1858
|
}, U = () => {
|
|
1859
|
-
i.value = {},
|
|
1860
|
-
},
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1859
|
+
i.value = {}, v(!0);
|
|
1860
|
+
}, v = (c = !1) => {
|
|
1861
|
+
const h = Object.keys(i.value).reduce((C, p) => (i.value[p] && (C[p] = `${i.value[p]}`), C), {});
|
|
1862
|
+
c && (n.value = !1), r("update:modelValue", new URLSearchParams(h).toString());
|
|
1863
1863
|
};
|
|
1864
|
-
return (
|
|
1865
|
-
const
|
|
1866
|
-
return e.config.isExactMatch ? (
|
|
1864
|
+
return (c, h) => {
|
|
1865
|
+
const C = K("KInput"), p = K("KButton"), b = K("KSelect"), H = K("KMenuItem"), Y = K("KMenu");
|
|
1866
|
+
return e.config.isExactMatch ? (k(), L(C, {
|
|
1867
1867
|
key: 0,
|
|
1868
1868
|
autocomplete: "off",
|
|
1869
1869
|
class: "kong-ui-entity-filter-input",
|
|
@@ -1872,91 +1872,90 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1872
1872
|
placeholder: e.config.placeholder,
|
|
1873
1873
|
"onUpdate:modelValue": y
|
|
1874
1874
|
}, {
|
|
1875
|
-
|
|
1876
|
-
I(
|
|
1875
|
+
before: u(() => [
|
|
1876
|
+
I(qe)
|
|
1877
1877
|
]),
|
|
1878
1878
|
_: 1
|
|
1879
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
1879
|
+
}, 8, ["model-value", "placeholder"])) : (k(), P("div", Ua, [
|
|
1880
1880
|
I(p, {
|
|
1881
|
-
appearance: "
|
|
1881
|
+
appearance: "tertiary",
|
|
1882
1882
|
"data-testid": "filter-button",
|
|
1883
|
-
|
|
1884
|
-
onClick: u
|
|
1883
|
+
onClick: d
|
|
1885
1884
|
}, {
|
|
1886
|
-
default:
|
|
1887
|
-
|
|
1885
|
+
default: u(() => [
|
|
1886
|
+
I(qe),
|
|
1887
|
+
W(" " + O(s(a)("filter.filterButtonText")) + " " + O(o.value.length > 0 ? `(${o.value.length})` : ""), 1)
|
|
1888
1888
|
]),
|
|
1889
1889
|
_: 1
|
|
1890
1890
|
}),
|
|
1891
|
-
ye(
|
|
1891
|
+
ye(F("div", {
|
|
1892
1892
|
class: "kong-ui-entity-filter-backdrop",
|
|
1893
|
-
onClick:
|
|
1893
|
+
onClick: d
|
|
1894
1894
|
}, null, 512), [
|
|
1895
1895
|
[me, n.value]
|
|
1896
1896
|
]),
|
|
1897
|
-
ye(I(
|
|
1898
|
-
body:
|
|
1899
|
-
(
|
|
1900
|
-
key:
|
|
1901
|
-
"data-testid":
|
|
1897
|
+
ye(I(Y, { class: "kong-ui-entity-filter-menu" }, {
|
|
1898
|
+
body: u(() => [
|
|
1899
|
+
(k(!0), P(We, null, Ce(f.value, (E, j) => (k(), L(H, {
|
|
1900
|
+
key: E.value,
|
|
1901
|
+
"data-testid": E.value,
|
|
1902
1902
|
expandable: "",
|
|
1903
|
-
"last-menu-item":
|
|
1903
|
+
"last-menu-item": j === f.value.length - 1
|
|
1904
1904
|
}, {
|
|
1905
|
-
itemTitle:
|
|
1906
|
-
|
|
1907
|
-
W(
|
|
1908
|
-
ye(
|
|
1909
|
-
[me, o.value.includes(
|
|
1905
|
+
itemTitle: u(() => [
|
|
1906
|
+
F("span", Ba, [
|
|
1907
|
+
W(O(E.label) + " ", 1),
|
|
1908
|
+
ye(F("span", Va, null, 512), [
|
|
1909
|
+
[me, o.value.includes(E.value)]
|
|
1910
1910
|
])
|
|
1911
1911
|
])
|
|
1912
1912
|
]),
|
|
1913
|
-
itemBody:
|
|
1914
|
-
var
|
|
1913
|
+
itemBody: u(() => {
|
|
1914
|
+
var M, B;
|
|
1915
1915
|
return [
|
|
1916
|
-
|
|
1917
|
-
|
|
1916
|
+
F("div", qa, [
|
|
1917
|
+
F("label", {
|
|
1918
1918
|
class: "menu-item-label",
|
|
1919
|
-
for: l(
|
|
1920
|
-
},
|
|
1921
|
-
((
|
|
1919
|
+
for: l(E.value)
|
|
1920
|
+
}, O(s(a)("filter.fieldLabel")), 9, La),
|
|
1921
|
+
((B = (M = e.config.schema) == null ? void 0 : M[E.value]) == null ? void 0 : B.type) === "select" ? (k(), L(b, {
|
|
1922
1922
|
key: 0,
|
|
1923
|
-
id: l(
|
|
1924
|
-
modelValue: i.value[
|
|
1925
|
-
"onUpdate:modelValue": (
|
|
1923
|
+
id: l(E.value),
|
|
1924
|
+
modelValue: i.value[E.value],
|
|
1925
|
+
"onUpdate:modelValue": ($) => i.value[E.value] = $,
|
|
1926
1926
|
appearance: "select",
|
|
1927
|
-
items:
|
|
1928
|
-
placeholder:
|
|
1929
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
1927
|
+
items: g(E.value),
|
|
1928
|
+
placeholder: s(a)("filter.selectPlaceholder")
|
|
1929
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (k(), L(C, {
|
|
1930
1930
|
key: 1,
|
|
1931
|
-
id: l(
|
|
1932
|
-
modelValue: i.value[
|
|
1933
|
-
"onUpdate:modelValue": (
|
|
1931
|
+
id: l(E.value),
|
|
1932
|
+
modelValue: i.value[E.value],
|
|
1933
|
+
"onUpdate:modelValue": ($) => i.value[E.value] = $,
|
|
1934
1934
|
autocomplete: "off",
|
|
1935
|
-
placeholder:
|
|
1936
|
-
|
|
1937
|
-
type: k(N.value)
|
|
1935
|
+
placeholder: s(a)("filter.inputPlaceholder"),
|
|
1936
|
+
type: w(E.value)
|
|
1938
1937
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
1939
1938
|
]),
|
|
1940
|
-
|
|
1939
|
+
F("div", Da, [
|
|
1941
1940
|
I(p, {
|
|
1942
|
-
appearance: "
|
|
1941
|
+
appearance: "tertiary",
|
|
1943
1942
|
"data-testid": "apply-filter",
|
|
1944
1943
|
size: "small",
|
|
1945
|
-
onClick:
|
|
1944
|
+
onClick: h[0] || (h[0] = ($) => v(!0))
|
|
1946
1945
|
}, {
|
|
1947
|
-
default:
|
|
1948
|
-
W(
|
|
1946
|
+
default: u(() => [
|
|
1947
|
+
W(O(s(a)("filter.applyButtonText")), 1)
|
|
1949
1948
|
]),
|
|
1950
1949
|
_: 1
|
|
1951
1950
|
}),
|
|
1952
1951
|
I(p, {
|
|
1953
|
-
appearance: "
|
|
1952
|
+
appearance: "tertiary",
|
|
1954
1953
|
"data-testid": "clear-filter",
|
|
1955
1954
|
size: "small",
|
|
1956
|
-
onClick: (
|
|
1955
|
+
onClick: ($) => T(E.value)
|
|
1957
1956
|
}, {
|
|
1958
|
-
default:
|
|
1959
|
-
W(
|
|
1957
|
+
default: u(() => [
|
|
1958
|
+
W(O(s(a)("filter.clearButtonText")), 1)
|
|
1960
1959
|
]),
|
|
1961
1960
|
_: 2
|
|
1962
1961
|
}, 1032, ["onClick"])
|
|
@@ -1966,13 +1965,18 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1966
1965
|
_: 2
|
|
1967
1966
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
1968
1967
|
]),
|
|
1969
|
-
actionButton:
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1968
|
+
actionButton: u(() => [
|
|
1969
|
+
F("div", Ha, [
|
|
1970
|
+
I(p, {
|
|
1971
|
+
size: "small",
|
|
1972
|
+
onClick: U
|
|
1973
|
+
}, {
|
|
1974
|
+
default: u(() => [
|
|
1975
|
+
W(O(s(a)("filter.clearAllButtonText")), 1)
|
|
1976
|
+
]),
|
|
1977
|
+
_: 1
|
|
1978
|
+
})
|
|
1979
|
+
])
|
|
1976
1980
|
]),
|
|
1977
1981
|
_: 1
|
|
1978
1982
|
}, 512), [
|
|
@@ -1981,7 +1985,7 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
1981
1985
|
]));
|
|
1982
1986
|
};
|
|
1983
1987
|
}
|
|
1984
|
-
}),
|
|
1988
|
+
}), Wa = /* @__PURE__ */ ue(za, [["__scopeId", "data-v-4ea260f0"]]), we = /* @__PURE__ */ X({
|
|
1985
1989
|
__name: "PermissionsWrapper",
|
|
1986
1990
|
props: {
|
|
1987
1991
|
/**
|
|
@@ -2003,24 +2007,24 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
2003
2007
|
}
|
|
2004
2008
|
},
|
|
2005
2009
|
setup(e) {
|
|
2006
|
-
const
|
|
2007
|
-
return te(() =>
|
|
2008
|
-
t.value = await
|
|
2009
|
-
}, { immediate: !0 }), (n, i) =>
|
|
2010
|
+
const r = e, t = x(void 0), a = S(() => t.value === !0 || t.value !== void 0 && r.forceShow === !0);
|
|
2011
|
+
return te(() => r.authFunction, async () => {
|
|
2012
|
+
t.value = await r.authFunction();
|
|
2013
|
+
}, { immediate: !0 }), (n, i) => a.value ? Z(n.$slots, "default", {
|
|
2010
2014
|
key: 0,
|
|
2011
2015
|
isAllowed: t.value
|
|
2012
2016
|
}) : Q("", !0);
|
|
2013
2017
|
}
|
|
2014
|
-
}),
|
|
2018
|
+
}), Ja = { class: "form-section-wrapper" }, Za = {
|
|
2015
2019
|
key: 0,
|
|
2016
2020
|
class: "form-section-title"
|
|
2017
|
-
},
|
|
2021
|
+
}, Ya = {
|
|
2018
2022
|
key: 1,
|
|
2019
2023
|
class: "form-section-description"
|
|
2020
|
-
},
|
|
2024
|
+
}, Ga = {
|
|
2021
2025
|
key: 2,
|
|
2022
2026
|
class: "form-section-footer"
|
|
2023
|
-
},
|
|
2027
|
+
}, Qa = { class: "form-section-content" }, Xa = /* @__PURE__ */ X({
|
|
2024
2028
|
__name: "EntityFormSection",
|
|
2025
2029
|
props: {
|
|
2026
2030
|
title: {
|
|
@@ -2045,41 +2049,145 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
2045
2049
|
}
|
|
2046
2050
|
},
|
|
2047
2051
|
setup(e) {
|
|
2048
|
-
const
|
|
2049
|
-
return (t,
|
|
2052
|
+
const r = st();
|
|
2053
|
+
return (t, a) => (k(), P("fieldset", {
|
|
2050
2054
|
class: he(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
2051
2055
|
}, [
|
|
2052
|
-
|
|
2053
|
-
e.hideInfoHeader ? Q("", !0) : (
|
|
2056
|
+
F("div", Ja, [
|
|
2057
|
+
e.hideInfoHeader ? Q("", !0) : (k(), P("div", {
|
|
2054
2058
|
key: 0,
|
|
2055
2059
|
class: he(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
2056
2060
|
}, [
|
|
2057
|
-
e.title ? (
|
|
2058
|
-
e.description ||
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
+
e.title ? (k(), P("h4", Za, O(e.title), 1)) : Q("", !0),
|
|
2062
|
+
e.description || s(r).description ? (k(), P("div", Ya, [
|
|
2063
|
+
Z(t.$slots, "description", {}, () => [
|
|
2064
|
+
F("p", null, O(e.description), 1)
|
|
2061
2065
|
], !0)
|
|
2062
2066
|
])) : Q("", !0),
|
|
2063
|
-
|
|
2064
|
-
|
|
2067
|
+
s(r).footer ? (k(), P("div", Ga, [
|
|
2068
|
+
Z(t.$slots, "footer", {}, void 0, !0)
|
|
2065
2069
|
])) : Q("", !0)
|
|
2066
2070
|
], 2)),
|
|
2067
|
-
|
|
2068
|
-
|
|
2071
|
+
F("div", Qa, [
|
|
2072
|
+
Z(t.$slots, "default", {}, void 0, !0)
|
|
2069
2073
|
])
|
|
2070
2074
|
])
|
|
2071
2075
|
], 2));
|
|
2072
2076
|
}
|
|
2073
|
-
}), Le = /* @__PURE__ */ ue(
|
|
2077
|
+
}), Le = /* @__PURE__ */ ue(Xa, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: ot, useDeleteUrlBuilder: en, useErrors: tn, useExternalLinkCreator: Mn, useFetchUrlBuilder: jn, useFetcher: rn, useDebouncedFilter: an, useStringHelpers: Pn, useHelpers: Rn, useGatewayFeatureSupported: Un, useTruncationDetector: Bn } = oe, nn = {
|
|
2074
2078
|
fail: "Failed to copy id to clipboard",
|
|
2075
2079
|
success: {
|
|
2076
2080
|
prefix: "Successfully",
|
|
2077
2081
|
content: " copied to clipboard"
|
|
2078
2082
|
}
|
|
2079
|
-
},
|
|
2080
|
-
message:
|
|
2081
|
-
iconTitle:
|
|
2082
|
-
},
|
|
2083
|
+
}, on = "Copy to clipboard", ln = {
|
|
2084
|
+
message: nn,
|
|
2085
|
+
iconTitle: on
|
|
2086
|
+
}, sn = "kong-ui-copy-uuid-notify", De = "24px", cn = (e, r) => {
|
|
2087
|
+
const t = e.__vccOpts || e;
|
|
2088
|
+
for (const [a, n] of r)
|
|
2089
|
+
t[a] = n;
|
|
2090
|
+
return t;
|
|
2091
|
+
}, un = (e) => (ft("data-v-9971cc79"), e = e(), yt(), e), dn = ["aria-hidden"], pn = {
|
|
2092
|
+
key: 0,
|
|
2093
|
+
"data-testid": "kui-icon-svg-title"
|
|
2094
|
+
}, fn = /* @__PURE__ */ un(() => /* @__PURE__ */ F("path", {
|
|
2095
|
+
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",
|
|
2096
|
+
fill: "currentColor"
|
|
2097
|
+
}, null, -1)), yn = /* @__PURE__ */ X({
|
|
2098
|
+
__name: "CopyIcon",
|
|
2099
|
+
props: {
|
|
2100
|
+
/** The accessibility text provided to screen readers */
|
|
2101
|
+
title: {
|
|
2102
|
+
type: String,
|
|
2103
|
+
required: !1,
|
|
2104
|
+
default: ""
|
|
2105
|
+
},
|
|
2106
|
+
/** The icon color. Defaults to `currentColor` which inherits text color from the parent element */
|
|
2107
|
+
color: {
|
|
2108
|
+
type: String,
|
|
2109
|
+
required: !1,
|
|
2110
|
+
default: "currentColor"
|
|
2111
|
+
},
|
|
2112
|
+
/** The CSS display property for the icon. Defaults to `block` */
|
|
2113
|
+
display: {
|
|
2114
|
+
type: String,
|
|
2115
|
+
required: !1,
|
|
2116
|
+
default: "block"
|
|
2117
|
+
},
|
|
2118
|
+
/** Whether the icon is just eye-candy or is meaningful to the page (should screen-readers ignore the icon?) */
|
|
2119
|
+
decorative: {
|
|
2120
|
+
type: Boolean,
|
|
2121
|
+
required: !1,
|
|
2122
|
+
default: !1
|
|
2123
|
+
},
|
|
2124
|
+
/** The icon size */
|
|
2125
|
+
size: {
|
|
2126
|
+
type: [Number, String],
|
|
2127
|
+
required: !1,
|
|
2128
|
+
default: De,
|
|
2129
|
+
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2130
|
+
validator: (e) => {
|
|
2131
|
+
if (typeof e == "number" && e > 0)
|
|
2132
|
+
return !0;
|
|
2133
|
+
if (typeof e == "string") {
|
|
2134
|
+
const r = String(e).replace(/px/gi, ""), t = Number(r);
|
|
2135
|
+
if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
|
|
2136
|
+
return !0;
|
|
2137
|
+
}
|
|
2138
|
+
return !1;
|
|
2139
|
+
}
|
|
2140
|
+
},
|
|
2141
|
+
/** The HTML tag to utilize for the icon's wrapper element. Defaults to `span` */
|
|
2142
|
+
as: {
|
|
2143
|
+
type: String,
|
|
2144
|
+
required: !1,
|
|
2145
|
+
default: "span"
|
|
2146
|
+
}
|
|
2147
|
+
},
|
|
2148
|
+
setup(e) {
|
|
2149
|
+
const r = e, t = S(() => {
|
|
2150
|
+
if (typeof r.size == "number" && r.size > 0)
|
|
2151
|
+
return `${r.size}px`;
|
|
2152
|
+
if (typeof r.size == "string") {
|
|
2153
|
+
const n = String(r.size).replace(/px/gi, ""), i = Number(n);
|
|
2154
|
+
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2155
|
+
return `${i}px`;
|
|
2156
|
+
}
|
|
2157
|
+
return De;
|
|
2158
|
+
}), a = S(() => ({
|
|
2159
|
+
boxSizing: "border-box",
|
|
2160
|
+
color: r.color,
|
|
2161
|
+
display: r.display,
|
|
2162
|
+
height: t.value,
|
|
2163
|
+
lineHeight: "0",
|
|
2164
|
+
width: t.value
|
|
2165
|
+
}));
|
|
2166
|
+
return (n, i) => (k(), L(Se(e.as), {
|
|
2167
|
+
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2168
|
+
class: "kui-icon copy-icon",
|
|
2169
|
+
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
2170
|
+
style: pt(a.value)
|
|
2171
|
+
}, {
|
|
2172
|
+
default: u(() => [
|
|
2173
|
+
(k(), P("svg", {
|
|
2174
|
+
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2175
|
+
"data-testid": "kui-icon-svg-copy-icon",
|
|
2176
|
+
fill: "none",
|
|
2177
|
+
height: "100%",
|
|
2178
|
+
role: "img",
|
|
2179
|
+
viewBox: "0 0 24 24",
|
|
2180
|
+
width: "100%",
|
|
2181
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2182
|
+
}, [
|
|
2183
|
+
e.title ? (k(), P("title", pn, O(e.title), 1)) : Q("", !0),
|
|
2184
|
+
fn
|
|
2185
|
+
], 8, dn))
|
|
2186
|
+
]),
|
|
2187
|
+
_: 1
|
|
2188
|
+
}, 8, ["aria-hidden", "style"]));
|
|
2189
|
+
}
|
|
2190
|
+
}), mn = /* @__PURE__ */ cn(yn, [["__scopeId", "data-v-9971cc79"]]), gn = "16px", vn = { class: "kong-ui-copy-uuid" }, hn = ["onClick"], He = 15, bn = /* @__PURE__ */ X({
|
|
2083
2191
|
__name: "CopyUuid",
|
|
2084
2192
|
props: {
|
|
2085
2193
|
uuid: {
|
|
@@ -2122,75 +2230,74 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
2122
2230
|
}
|
|
2123
2231
|
},
|
|
2124
2232
|
emits: ["success", "error"],
|
|
2125
|
-
setup(e, { emit:
|
|
2126
|
-
const t = e, { t:
|
|
2127
|
-
}), i =
|
|
2233
|
+
setup(e, { emit: r }) {
|
|
2234
|
+
const t = e, { t: a } = xe("en-us", ln), n = t.notify || dt(sn, () => {
|
|
2235
|
+
}), i = S(() => t.idTooltip ? {
|
|
2128
2236
|
label: t.idTooltip,
|
|
2129
2237
|
positionFixed: !0,
|
|
2130
2238
|
placement: "bottomStart"
|
|
2131
2239
|
} : {
|
|
2132
2240
|
title: t.uuid
|
|
2133
|
-
}), o =
|
|
2241
|
+
}), o = S(() => !!(t.tooltip && t.successTooltip)), f = x(t.tooltip), d = S(() => t.tooltip ? {
|
|
2134
2242
|
label: f.value,
|
|
2135
2243
|
positionFixed: !0,
|
|
2136
2244
|
maxWidth: "500px",
|
|
2137
2245
|
placement: "bottomStart"
|
|
2138
|
-
} : {}), y =
|
|
2139
|
-
var
|
|
2140
|
-
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(
|
|
2141
|
-
}), l = (
|
|
2142
|
-
f.value =
|
|
2246
|
+
} : {}), y = S(() => {
|
|
2247
|
+
var w;
|
|
2248
|
+
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(w = t.uuid) == null ? void 0 : w.substring(0, 5)}` : t.uuid;
|
|
2249
|
+
}), l = (w) => {
|
|
2250
|
+
f.value = w, setTimeout(() => {
|
|
2143
2251
|
f.value = t.tooltip;
|
|
2144
2252
|
}, 1800);
|
|
2145
|
-
},
|
|
2253
|
+
}, g = (w) => {
|
|
2146
2254
|
var T, U;
|
|
2147
|
-
if (!
|
|
2255
|
+
if (!w(t.uuid)) {
|
|
2148
2256
|
typeof n == "function" && n({
|
|
2149
2257
|
type: "error",
|
|
2150
|
-
message:
|
|
2151
|
-
}), o.value ? l(
|
|
2258
|
+
message: a("message.fail")
|
|
2259
|
+
}), o.value ? l(a("message.fail")) : r("error", t.uuid);
|
|
2152
2260
|
return;
|
|
2153
2261
|
}
|
|
2154
|
-
const
|
|
2262
|
+
const v = ((T = t.uuid) == null ? void 0 : T.length) > He, c = t.format === "hidden" || t.format === "redacted" ? a("message.success.prefix") : `"${((U = t.uuid) == null ? void 0 : U.substring(0, He)) + (v ? "..." : "")}"`;
|
|
2155
2263
|
typeof n == "function" && n({
|
|
2156
2264
|
type: "success",
|
|
2157
|
-
message: `${
|
|
2158
|
-
}), o.value ? l(t.successTooltip) :
|
|
2265
|
+
message: `${c}${a("message.success.content")}`
|
|
2266
|
+
}), o.value ? l(t.successTooltip) : r("success", t.uuid);
|
|
2159
2267
|
};
|
|
2160
|
-
return (
|
|
2161
|
-
const U =
|
|
2162
|
-
return
|
|
2163
|
-
e.format !== "hidden" ? (
|
|
2164
|
-
default:
|
|
2165
|
-
|
|
2268
|
+
return (w, T) => {
|
|
2269
|
+
const U = K("KClipboardProvider");
|
|
2270
|
+
return k(), P("div", vn, [
|
|
2271
|
+
e.format !== "hidden" ? (k(), L(Se(e.idTooltip ? "KTooltip" : "div"), Oe({ key: 0 }, i.value, { "data-testid": "copy-id" }), {
|
|
2272
|
+
default: u(() => [
|
|
2273
|
+
F("div", {
|
|
2166
2274
|
class: he([
|
|
2167
2275
|
"uuid-container",
|
|
2168
2276
|
e.truncated ? "truncated-uuid" : null,
|
|
2169
2277
|
e.useMono ? "mono" : null
|
|
2170
2278
|
])
|
|
2171
|
-
},
|
|
2279
|
+
}, O(y.value), 3)
|
|
2172
2280
|
]),
|
|
2173
2281
|
_: 1
|
|
2174
2282
|
}, 16)) : Q("", !0),
|
|
2175
|
-
(
|
|
2176
|
-
default:
|
|
2177
|
-
I(
|
|
2178
|
-
default:
|
|
2179
|
-
|
|
2283
|
+
(k(), L(Se(e.tooltip ? "KTooltip" : "div"), Oe(d.value, { class: "uuid-icon-wrapper" }), {
|
|
2284
|
+
default: u(() => [
|
|
2285
|
+
I(U, null, {
|
|
2286
|
+
default: u(({ copyToClipboard: v }) => [
|
|
2287
|
+
F("span", {
|
|
2180
2288
|
"data-testid": "copy-to-clipboard",
|
|
2181
2289
|
role: "button",
|
|
2182
2290
|
tabindex: "0",
|
|
2183
|
-
onClick: ve((
|
|
2291
|
+
onClick: ve((c) => g(v), ["stop"])
|
|
2184
2292
|
}, [
|
|
2185
|
-
I(
|
|
2293
|
+
I(s(mn), {
|
|
2186
2294
|
class: "uuid-icon",
|
|
2187
2295
|
color: e.iconColor,
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
], 8, nn)
|
|
2296
|
+
decorative: !!e.tooltip,
|
|
2297
|
+
size: s(gn),
|
|
2298
|
+
title: s(a)("iconTitle")
|
|
2299
|
+
}, null, 8, ["color", "decorative", "size", "title"])
|
|
2300
|
+
], 8, hn)
|
|
2194
2301
|
]),
|
|
2195
2302
|
_: 1
|
|
2196
2303
|
})
|
|
@@ -2200,13 +2307,13 @@ const fr = ["onReset", "onSubmit"], yr = {
|
|
|
2200
2307
|
]);
|
|
2201
2308
|
};
|
|
2202
2309
|
}
|
|
2203
|
-
}),
|
|
2310
|
+
}), kn = (e, r) => {
|
|
2204
2311
|
const t = e.__vccOpts || e;
|
|
2205
|
-
for (const [
|
|
2206
|
-
t[
|
|
2312
|
+
for (const [a, n] of r)
|
|
2313
|
+
t[a] = n;
|
|
2207
2314
|
return t;
|
|
2208
|
-
},
|
|
2209
|
-
const
|
|
2315
|
+
}, wn = /* @__PURE__ */ kn(bn, [["__scopeId", "data-v-0c07874b"]]);
|
|
2316
|
+
const Sn = { class: "kong-ui-entities-snis-list" }, _n = { key: 1 }, In = { key: 1 }, Cn = /* @__PURE__ */ X({
|
|
2210
2317
|
__name: "SniList",
|
|
2211
2318
|
props: {
|
|
2212
2319
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2246,115 +2353,115 @@ const cn = { class: "kong-ui-entities-snis-list" }, un = { key: 1 }, dn = { key:
|
|
|
2246
2353
|
}
|
|
2247
2354
|
},
|
|
2248
2355
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
2249
|
-
setup(e, { emit:
|
|
2356
|
+
setup(e, { emit: r }) {
|
|
2250
2357
|
var se;
|
|
2251
|
-
const t = e, { i18n: { t:
|
|
2252
|
-
var
|
|
2253
|
-
|
|
2254
|
-
entity:
|
|
2358
|
+
const t = e, { i18n: { t: a } } = Ye.useI18n(), n = (_, R) => {
|
|
2359
|
+
var q;
|
|
2360
|
+
_.type === "error" ? r("copy:error", {
|
|
2361
|
+
entity: R,
|
|
2255
2362
|
field: "certificate.id",
|
|
2256
|
-
message:
|
|
2257
|
-
}) :
|
|
2258
|
-
entity:
|
|
2363
|
+
message: a("errors.copy")
|
|
2364
|
+
}) : r("copy:success", {
|
|
2365
|
+
entity: R,
|
|
2259
2366
|
field: "certificate.id",
|
|
2260
|
-
message:
|
|
2367
|
+
message: a("copy.success", { val: (q = R.certificate) == null ? void 0 : q.id })
|
|
2261
2368
|
});
|
|
2262
|
-
}, { axiosInstance: i } =
|
|
2369
|
+
}, { axiosInstance: i } = ot({
|
|
2263
2370
|
headers: (se = t.config) == null ? void 0 : se.requestHeaders
|
|
2264
|
-
}), o = x(1), f =
|
|
2265
|
-
name: { label:
|
|
2266
|
-
certificate: { label:
|
|
2267
|
-
tags: { label:
|
|
2268
|
-
}, y =
|
|
2371
|
+
}), o = x(1), f = S(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
2372
|
+
name: { label: a("snis.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
2373
|
+
certificate: { label: a("snis.list.table_headers.certificate_id"), sortable: !1 },
|
|
2374
|
+
tags: { label: a("snis.list.table_headers.tags"), sortable: !1 }
|
|
2375
|
+
}, y = d, l = (_) => ({
|
|
2269
2376
|
style: {
|
|
2270
|
-
maxWidth:
|
|
2377
|
+
maxWidth: _.headerKey === "name" ? "250px" : _.headerKey === "certificate" ? "350px" : null
|
|
2271
2378
|
}
|
|
2272
|
-
}),
|
|
2273
|
-
var
|
|
2274
|
-
let
|
|
2275
|
-
return t.config.app === "konnect" ?
|
|
2276
|
-
}),
|
|
2277
|
-
const
|
|
2278
|
-
if (
|
|
2379
|
+
}), g = S(() => {
|
|
2380
|
+
var R, q;
|
|
2381
|
+
let _ = `${t.config.apiBaseUrl}${de.list[t.config.app].all}`;
|
|
2382
|
+
return t.config.app === "konnect" ? _ = _.replace(/{controlPlaneId}/gi, ((R = t.config) == null ? void 0 : R.controlPlaneId) || "") : t.config.app === "kongManager" && (_ = _.replace(/\/{workspace}/gi, (q = t.config) != null && q.workspace ? `/${t.config.workspace}` : "")), _;
|
|
2383
|
+
}), w = x(""), T = S(() => {
|
|
2384
|
+
const _ = t.config.app === "konnect" || t.config.isExactMatch;
|
|
2385
|
+
if (_)
|
|
2279
2386
|
return {
|
|
2280
|
-
isExactMatch:
|
|
2281
|
-
placeholder:
|
|
2387
|
+
isExactMatch: _,
|
|
2388
|
+
placeholder: a("search.placeholder")
|
|
2282
2389
|
};
|
|
2283
|
-
const { name:
|
|
2390
|
+
const { name: R } = d;
|
|
2284
2391
|
return {
|
|
2285
|
-
isExactMatch:
|
|
2286
|
-
fields: { name:
|
|
2392
|
+
isExactMatch: _,
|
|
2393
|
+
fields: { name: R },
|
|
2287
2394
|
schema: t.config.filterSchema
|
|
2288
2395
|
};
|
|
2289
|
-
}), { fetcher: U, fetcherState:
|
|
2290
|
-
|
|
2291
|
-
},
|
|
2396
|
+
}), { fetcher: U, fetcherState: v } = rn(t.config, g.value), c = () => {
|
|
2397
|
+
w.value = "";
|
|
2398
|
+
}, h = () => {
|
|
2292
2399
|
o.value++;
|
|
2293
|
-
},
|
|
2400
|
+
}, C = x(""), p = x({
|
|
2294
2401
|
ctaPath: t.config.createRoute,
|
|
2295
2402
|
ctaText: void 0,
|
|
2296
|
-
message:
|
|
2297
|
-
title:
|
|
2298
|
-
}), b = (
|
|
2299
|
-
const
|
|
2300
|
-
if (!
|
|
2301
|
-
|
|
2302
|
-
entity:
|
|
2403
|
+
message: a("snis.list.empty_state.description"),
|
|
2404
|
+
title: a("snis.title")
|
|
2405
|
+
}), b = (_, R) => {
|
|
2406
|
+
const q = _.id;
|
|
2407
|
+
if (!R(q)) {
|
|
2408
|
+
r("copy:error", {
|
|
2409
|
+
entity: _,
|
|
2303
2410
|
field: "id",
|
|
2304
|
-
message:
|
|
2411
|
+
message: a("errors.copy")
|
|
2305
2412
|
});
|
|
2306
2413
|
return;
|
|
2307
2414
|
}
|
|
2308
|
-
|
|
2309
|
-
entity:
|
|
2415
|
+
r("copy:success", {
|
|
2416
|
+
entity: _,
|
|
2310
2417
|
field: "id",
|
|
2311
|
-
message:
|
|
2418
|
+
message: a("copy.success", { val: q })
|
|
2312
2419
|
});
|
|
2313
|
-
}, H = (
|
|
2314
|
-
const
|
|
2315
|
-
if (!
|
|
2316
|
-
|
|
2317
|
-
entity:
|
|
2318
|
-
message:
|
|
2420
|
+
}, H = (_, R) => {
|
|
2421
|
+
const q = JSON.stringify(_);
|
|
2422
|
+
if (!R(q)) {
|
|
2423
|
+
r("copy:error", {
|
|
2424
|
+
entity: _,
|
|
2425
|
+
message: a("errors.copy")
|
|
2319
2426
|
});
|
|
2320
2427
|
return;
|
|
2321
2428
|
}
|
|
2322
|
-
|
|
2323
|
-
entity:
|
|
2324
|
-
message:
|
|
2429
|
+
r("copy:success", {
|
|
2430
|
+
entity: _,
|
|
2431
|
+
message: a("copy.success_brief")
|
|
2325
2432
|
});
|
|
2326
|
-
},
|
|
2327
|
-
label:
|
|
2328
|
-
to: t.config.getEditRoute(
|
|
2329
|
-
}),
|
|
2330
|
-
|
|
2433
|
+
}, Y = (_) => ({
|
|
2434
|
+
label: a("actions.edit"),
|
|
2435
|
+
to: t.config.getEditRoute(_)
|
|
2436
|
+
}), E = x(void 0), j = x(!1), M = x(!1), B = x(""), $ = en(t.config, g.value), D = (_) => {
|
|
2437
|
+
E.value = _, j.value = !0;
|
|
2331
2438
|
}, ee = () => {
|
|
2332
|
-
|
|
2439
|
+
j.value = !1, E.value = void 0;
|
|
2333
2440
|
}, le = async () => {
|
|
2334
|
-
var
|
|
2335
|
-
if ((
|
|
2336
|
-
|
|
2441
|
+
var _, R, q;
|
|
2442
|
+
if ((_ = E.value) != null && _.id) {
|
|
2443
|
+
M.value = !0;
|
|
2337
2444
|
try {
|
|
2338
|
-
await i.delete(
|
|
2445
|
+
await i.delete($(E.value.id)), r("delete:success", E.value), M.value = !1, ee(), o.value++;
|
|
2339
2446
|
} catch (m) {
|
|
2340
|
-
|
|
2447
|
+
B.value = ((q = (R = m.response) == null ? void 0 : R.data) == null ? void 0 : q.message) || m.message || a("errors.delete"), r("error", m);
|
|
2341
2448
|
} finally {
|
|
2342
|
-
|
|
2449
|
+
M.value = !1;
|
|
2343
2450
|
}
|
|
2344
2451
|
}
|
|
2345
2452
|
};
|
|
2346
|
-
return te(
|
|
2347
|
-
if (
|
|
2348
|
-
|
|
2453
|
+
return te(v, (_) => {
|
|
2454
|
+
if (_.status === ne.Error) {
|
|
2455
|
+
C.value = a("errors.general"), r("error", _.error);
|
|
2349
2456
|
return;
|
|
2350
2457
|
}
|
|
2351
|
-
|
|
2352
|
-
}),
|
|
2353
|
-
await t.canCreate() && (p.value.title =
|
|
2354
|
-
}), (
|
|
2355
|
-
const
|
|
2356
|
-
return
|
|
2357
|
-
I(
|
|
2458
|
+
C.value = "";
|
|
2459
|
+
}), Ie(async () => {
|
|
2460
|
+
await t.canCreate() && (p.value.title = a("snis.list.empty_state.title"), p.value.ctaText = a("actions.create"));
|
|
2461
|
+
}), (_, R) => {
|
|
2462
|
+
const q = K("KButton"), m = K("KBadge"), A = K("KTruncate"), V = K("KDropdownItem"), re = K("KClipboardProvider");
|
|
2463
|
+
return k(), P("div", Sn, [
|
|
2464
|
+
I(s(Ea), {
|
|
2358
2465
|
"cache-identifier": e.cacheIdentifier,
|
|
2359
2466
|
"cell-attributes": l,
|
|
2360
2467
|
"disable-pagination-page-jump": "",
|
|
@@ -2362,36 +2469,36 @@ const cn = { class: "kong-ui-entities-snis-list" }, un = { key: 1 }, dn = { key:
|
|
|
2362
2469
|
"disable-sorting": f.value,
|
|
2363
2470
|
"empty-state-options": p.value,
|
|
2364
2471
|
"enable-entity-actions": "",
|
|
2365
|
-
"error-message":
|
|
2366
|
-
fetcher:
|
|
2472
|
+
"error-message": C.value,
|
|
2473
|
+
fetcher: s(U),
|
|
2367
2474
|
"fetcher-cache-key": o.value,
|
|
2368
2475
|
"pagination-type": "offset",
|
|
2369
2476
|
"preferences-storage-key": "kong-ui-entities-snis-list",
|
|
2370
|
-
query:
|
|
2371
|
-
"table-headers":
|
|
2372
|
-
onClearSearchInput:
|
|
2373
|
-
onSort:
|
|
2477
|
+
query: w.value,
|
|
2478
|
+
"table-headers": s(y),
|
|
2479
|
+
onClearSearchInput: c,
|
|
2480
|
+
onSort: h
|
|
2374
2481
|
}, {
|
|
2375
|
-
"toolbar-filter":
|
|
2376
|
-
I(
|
|
2377
|
-
modelValue:
|
|
2378
|
-
"onUpdate:modelValue":
|
|
2482
|
+
"toolbar-filter": u(() => [
|
|
2483
|
+
I(s(Wa), {
|
|
2484
|
+
modelValue: w.value,
|
|
2485
|
+
"onUpdate:modelValue": R[0] || (R[0] = (N) => w.value = N),
|
|
2379
2486
|
config: T.value
|
|
2380
2487
|
}, null, 8, ["modelValue", "config"])
|
|
2381
2488
|
]),
|
|
2382
|
-
"toolbar-button":
|
|
2383
|
-
I(
|
|
2489
|
+
"toolbar-button": u(() => [
|
|
2490
|
+
I(s(we), {
|
|
2384
2491
|
"auth-function": () => e.canCreate()
|
|
2385
2492
|
}, {
|
|
2386
|
-
default:
|
|
2387
|
-
I(
|
|
2493
|
+
default: u(() => [
|
|
2494
|
+
I(q, {
|
|
2388
2495
|
appearance: "primary",
|
|
2389
2496
|
"data-testid": "toolbar-add-sni",
|
|
2390
2497
|
icon: "plus",
|
|
2391
2498
|
to: e.config.createRoute
|
|
2392
2499
|
}, {
|
|
2393
|
-
default:
|
|
2394
|
-
W(
|
|
2500
|
+
default: u(() => [
|
|
2501
|
+
W(O(s(a)("snis.list.toolbar_actions.new")), 1)
|
|
2395
2502
|
]),
|
|
2396
2503
|
_: 1
|
|
2397
2504
|
}, 8, ["to"])
|
|
@@ -2399,88 +2506,88 @@ const cn = { class: "kong-ui-entities-snis-list" }, un = { key: 1 }, dn = { key:
|
|
|
2399
2506
|
_: 1
|
|
2400
2507
|
}, 8, ["auth-function"])
|
|
2401
2508
|
]),
|
|
2402
|
-
name:
|
|
2403
|
-
|
|
2509
|
+
name: u(({ rowValue: N }) => [
|
|
2510
|
+
F("b", null, O(N ?? "-"), 1)
|
|
2404
2511
|
]),
|
|
2405
|
-
certificate:
|
|
2406
|
-
|
|
2512
|
+
certificate: u(({ row: N }) => [
|
|
2513
|
+
N.certificate && N.certificate.id ? (k(), L(s(wn), {
|
|
2407
2514
|
key: 0,
|
|
2408
2515
|
class: "copy-certificate-uuid",
|
|
2409
2516
|
"data-testid": "copy-certificate-uuid",
|
|
2410
|
-
notify: (G) => n(G,
|
|
2517
|
+
notify: (G) => n(G, N),
|
|
2411
2518
|
truncated: !1,
|
|
2412
|
-
uuid:
|
|
2413
|
-
}, null, 8, ["notify", "uuid"])) : (
|
|
2519
|
+
uuid: N.certificate.id
|
|
2520
|
+
}, null, 8, ["notify", "uuid"])) : (k(), P("span", _n, "-"))
|
|
2414
2521
|
]),
|
|
2415
|
-
tags:
|
|
2416
|
-
|
|
2417
|
-
default:
|
|
2418
|
-
(
|
|
2522
|
+
tags: u(({ rowValue: N }) => [
|
|
2523
|
+
N != null && N.length ? (k(), L(A, { key: 0 }, {
|
|
2524
|
+
default: u(() => [
|
|
2525
|
+
(k(!0), P(We, null, Ce(N, (G) => (k(), L(m, {
|
|
2419
2526
|
key: G,
|
|
2420
|
-
onClick:
|
|
2527
|
+
onClick: R[1] || (R[1] = ve(() => {
|
|
2421
2528
|
}, ["stop"]))
|
|
2422
2529
|
}, {
|
|
2423
|
-
default:
|
|
2424
|
-
W(
|
|
2530
|
+
default: u(() => [
|
|
2531
|
+
W(O(G), 1)
|
|
2425
2532
|
]),
|
|
2426
2533
|
_: 2
|
|
2427
2534
|
}, 1024))), 128))
|
|
2428
2535
|
]),
|
|
2429
2536
|
_: 2
|
|
2430
|
-
}, 1024)) : (
|
|
2537
|
+
}, 1024)) : (k(), P("span", In, "-"))
|
|
2431
2538
|
]),
|
|
2432
|
-
actions:
|
|
2433
|
-
I(
|
|
2434
|
-
default:
|
|
2435
|
-
I(
|
|
2539
|
+
actions: u(({ row: N }) => [
|
|
2540
|
+
I(re, null, {
|
|
2541
|
+
default: u(({ copyToClipboard: G }) => [
|
|
2542
|
+
I(V, {
|
|
2436
2543
|
"data-testid": "action-entity-copy-id",
|
|
2437
|
-
onClick: (fe) => b(
|
|
2544
|
+
onClick: (fe) => b(N, G)
|
|
2438
2545
|
}, {
|
|
2439
|
-
default:
|
|
2440
|
-
W(
|
|
2546
|
+
default: u(() => [
|
|
2547
|
+
W(O(s(a)("actions.copy_id")), 1)
|
|
2441
2548
|
]),
|
|
2442
2549
|
_: 2
|
|
2443
2550
|
}, 1032, ["onClick"])
|
|
2444
2551
|
]),
|
|
2445
2552
|
_: 2
|
|
2446
2553
|
}, 1024),
|
|
2447
|
-
I(
|
|
2448
|
-
default:
|
|
2449
|
-
I(
|
|
2554
|
+
I(re, null, {
|
|
2555
|
+
default: u(({ copyToClipboard: G }) => [
|
|
2556
|
+
I(V, {
|
|
2450
2557
|
"data-testid": "action-entity-copy-json",
|
|
2451
|
-
onClick: (fe) => H(
|
|
2558
|
+
onClick: (fe) => H(N, G)
|
|
2452
2559
|
}, {
|
|
2453
|
-
default:
|
|
2454
|
-
W(
|
|
2560
|
+
default: u(() => [
|
|
2561
|
+
W(O(s(a)("actions.copy_json")), 1)
|
|
2455
2562
|
]),
|
|
2456
2563
|
_: 2
|
|
2457
2564
|
}, 1032, ["onClick"])
|
|
2458
2565
|
]),
|
|
2459
2566
|
_: 2
|
|
2460
2567
|
}, 1024),
|
|
2461
|
-
I(
|
|
2462
|
-
"auth-function": () => e.canEdit(
|
|
2568
|
+
I(s(we), {
|
|
2569
|
+
"auth-function": () => e.canEdit(N)
|
|
2463
2570
|
}, {
|
|
2464
|
-
default:
|
|
2465
|
-
I(
|
|
2571
|
+
default: u(() => [
|
|
2572
|
+
I(V, {
|
|
2466
2573
|
"data-testid": "action-entity-edit",
|
|
2467
|
-
item:
|
|
2574
|
+
item: Y(N.id)
|
|
2468
2575
|
}, null, 8, ["item"])
|
|
2469
2576
|
]),
|
|
2470
2577
|
_: 2
|
|
2471
2578
|
}, 1032, ["auth-function"]),
|
|
2472
|
-
I(
|
|
2473
|
-
"auth-function": () => e.canDelete(
|
|
2579
|
+
I(s(we), {
|
|
2580
|
+
"auth-function": () => e.canDelete(N)
|
|
2474
2581
|
}, {
|
|
2475
|
-
default:
|
|
2476
|
-
I(
|
|
2582
|
+
default: u(() => [
|
|
2583
|
+
I(V, {
|
|
2584
|
+
danger: "",
|
|
2477
2585
|
"data-testid": "action-entity-delete",
|
|
2478
2586
|
"has-divider": "",
|
|
2479
|
-
|
|
2480
|
-
onClick: (G) => V(E)
|
|
2587
|
+
onClick: (G) => D(N)
|
|
2481
2588
|
}, {
|
|
2482
|
-
default:
|
|
2483
|
-
W(
|
|
2589
|
+
default: u(() => [
|
|
2590
|
+
W(O(s(a)("actions.delete")), 1)
|
|
2484
2591
|
]),
|
|
2485
2592
|
_: 2
|
|
2486
2593
|
}, 1032, ["onClick"])
|
|
@@ -2490,15 +2597,15 @@ const cn = { class: "kong-ui-entities-snis-list" }, un = { key: 1 }, dn = { key:
|
|
|
2490
2597
|
]),
|
|
2491
2598
|
_: 1
|
|
2492
2599
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
2493
|
-
I(
|
|
2494
|
-
"action-pending":
|
|
2495
|
-
description:
|
|
2496
|
-
"entity-name":
|
|
2497
|
-
"entity-type":
|
|
2498
|
-
error:
|
|
2600
|
+
I(s(Fa), {
|
|
2601
|
+
"action-pending": M.value,
|
|
2602
|
+
description: s(a)("delete.description"),
|
|
2603
|
+
"entity-name": E.value && (E.value.name || E.value.id),
|
|
2604
|
+
"entity-type": s(Ge).SNI,
|
|
2605
|
+
error: B.value,
|
|
2499
2606
|
"need-confirm": !1,
|
|
2500
|
-
title:
|
|
2501
|
-
visible:
|
|
2607
|
+
title: s(a)("delete.title"),
|
|
2608
|
+
visible: j.value,
|
|
2502
2609
|
onCancel: ee,
|
|
2503
2610
|
onProceed: le
|
|
2504
2611
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
@@ -2506,16 +2613,16 @@ const cn = { class: "kong-ui-entities-snis-list" }, un = { key: 1 }, dn = { key:
|
|
|
2506
2613
|
};
|
|
2507
2614
|
}
|
|
2508
2615
|
});
|
|
2509
|
-
const
|
|
2616
|
+
const lt = (e, r) => {
|
|
2510
2617
|
const t = e.__vccOpts || e;
|
|
2511
|
-
for (const [
|
|
2512
|
-
t[
|
|
2618
|
+
for (const [a, n] of r)
|
|
2619
|
+
t[a] = n;
|
|
2513
2620
|
return t;
|
|
2514
|
-
},
|
|
2621
|
+
}, Vn = /* @__PURE__ */ lt(Cn, [["__scopeId", "data-v-23d67ab1"]]), xn = { class: "kong-ui-entities-snis-form" }, Tn = { "data-testid": "no-search-results" }, Nn = {
|
|
2515
2622
|
key: 2,
|
|
2516
2623
|
class: "invalid-certificate-message",
|
|
2517
2624
|
"data-testid": "invalid-certificate-message"
|
|
2518
|
-
},
|
|
2625
|
+
}, En = /* @__PURE__ */ X({
|
|
2519
2626
|
__name: "SniForm",
|
|
2520
2627
|
props: {
|
|
2521
2628
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2532,11 +2639,11 @@ const it = (e, a) => {
|
|
|
2532
2639
|
}
|
|
2533
2640
|
},
|
|
2534
2641
|
emits: ["update", "error", "loading"],
|
|
2535
|
-
setup(e, { emit:
|
|
2536
|
-
var
|
|
2537
|
-
const t = e,
|
|
2538
|
-
headers: (
|
|
2539
|
-
}), f =
|
|
2642
|
+
setup(e, { emit: r }) {
|
|
2643
|
+
var q;
|
|
2644
|
+
const t = e, a = Ze(), { i18n: { t: n } } = Ye.useI18n(), { getMessageFromError: i } = tn(), { axiosInstance: o } = ot({
|
|
2645
|
+
headers: (q = t.config) == null ? void 0 : q.requestHeaders
|
|
2646
|
+
}), f = S(() => de.form[t.config.app].edit), d = S(() => t.sniId ? ge.Edit : ge.Create), y = S(() => t.config.certificateId && d.value === ge.Create ? t.config.certificateId : ""), l = Fe({
|
|
2540
2647
|
fields: {
|
|
2541
2648
|
name: "",
|
|
2542
2649
|
tags: "",
|
|
@@ -2544,158 +2651,158 @@ const it = (e, a) => {
|
|
|
2544
2651
|
},
|
|
2545
2652
|
isReadonly: !1,
|
|
2546
2653
|
errorMessage: ""
|
|
2547
|
-
}),
|
|
2654
|
+
}), g = Fe({
|
|
2548
2655
|
name: "",
|
|
2549
2656
|
tags: "",
|
|
2550
2657
|
certificate_id: ""
|
|
2551
|
-
}),
|
|
2552
|
-
var
|
|
2553
|
-
l.fields.name = (m == null ? void 0 : m.name) || "", l.fields.tags = ((
|
|
2658
|
+
}), w = S(() => JSON.stringify(l.fields) !== JSON.stringify(g) && !!l.fields.name && !!(l.fields.certificate_id || y.value)), T = (m) => {
|
|
2659
|
+
var A, V;
|
|
2660
|
+
l.fields.name = (m == null ? void 0 : m.name) || "", l.fields.tags = ((A = m == null ? void 0 : m.tags) == null ? void 0 : A.join(", ")) || "", l.fields.certificate_id = ((V = m == null ? void 0 : m.certificate) == null ? void 0 : V.id) || "", Object.assign(g, l.fields);
|
|
2554
2661
|
}, U = () => {
|
|
2555
|
-
|
|
2556
|
-
},
|
|
2557
|
-
var
|
|
2662
|
+
a.push(t.config.cancelRoute);
|
|
2663
|
+
}, v = S(() => {
|
|
2664
|
+
var A, V;
|
|
2558
2665
|
let m = `${t.config.apiBaseUrl}${de.form[t.config.app].validate}`;
|
|
2559
|
-
return t.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((
|
|
2560
|
-
}),
|
|
2561
|
-
var
|
|
2562
|
-
let m = `${t.config.apiBaseUrl}${de.form[t.config.app][
|
|
2563
|
-
return t.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((
|
|
2564
|
-
}),
|
|
2565
|
-
var m,
|
|
2666
|
+
return t.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((A = t.config) == null ? void 0 : A.controlPlaneId) || "") : t.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (V = t.config) != null && V.workspace ? `/${t.config.workspace}` : "")), m = m.replace(/{id}/gi, t.sniId), m;
|
|
2667
|
+
}), c = S(() => {
|
|
2668
|
+
var A, V;
|
|
2669
|
+
let m = `${t.config.apiBaseUrl}${de.form[t.config.app][d.value]}`;
|
|
2670
|
+
return t.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((A = t.config) == null ? void 0 : A.controlPlaneId) || "") : t.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (V = t.config) != null && V.workspace ? `/${t.config.workspace}` : "")), m = m.replace(/{id}/gi, t.sniId), m;
|
|
2671
|
+
}), h = async () => {
|
|
2672
|
+
var m, A, V, re, N, G, fe, $e;
|
|
2566
2673
|
try {
|
|
2567
2674
|
l.isReadonly = !0;
|
|
2568
|
-
const
|
|
2675
|
+
const ae = {
|
|
2569
2676
|
name: l.fields.name,
|
|
2570
|
-
tags: (
|
|
2677
|
+
tags: (A = (m = l.fields.tags.split(",")) == null ? void 0 : m.map((be) => String(be || "").trim())) == null ? void 0 : A.filter((be) => be !== ""),
|
|
2571
2678
|
certificate: { id: y.value || l.fields.certificate_id }
|
|
2572
2679
|
};
|
|
2573
|
-
let
|
|
2574
|
-
await o.post(
|
|
2575
|
-
} catch (
|
|
2576
|
-
l.errorMessage = i(
|
|
2680
|
+
let J;
|
|
2681
|
+
await o.post(v.value, ae), d.value === "create" ? J = await o.post(c.value, ae) : d.value === "edit" && (J = ((V = t.config) == null ? void 0 : V.app) === "konnect" ? await o.put(c.value, ae) : await o.patch(c.value, ae)), l.fields.name = ((re = J == null ? void 0 : J.data) == null ? void 0 : re.name) || "", l.fields.tags = ((G = (N = J == null ? void 0 : J.data) == null ? void 0 : N.tags) == null ? void 0 : G.join(", ")) || "", l.fields.certificate_id = (($e = (fe = J == null ? void 0 : J.data) == null ? void 0 : fe.certificate) == null ? void 0 : $e.id) || "", Object.assign(g, l.fields), r("update", J == null ? void 0 : J.data);
|
|
2682
|
+
} catch (ae) {
|
|
2683
|
+
l.errorMessage = i(ae), r("error", ae);
|
|
2577
2684
|
} finally {
|
|
2578
2685
|
l.isReadonly = !1;
|
|
2579
2686
|
}
|
|
2580
2687
|
}, {
|
|
2581
|
-
debouncedQueryChange:
|
|
2688
|
+
debouncedQueryChange: C,
|
|
2582
2689
|
loading: p,
|
|
2583
2690
|
allRecords: b,
|
|
2584
2691
|
error: H,
|
|
2585
|
-
validationError:
|
|
2586
|
-
loadItems:
|
|
2587
|
-
results:
|
|
2588
|
-
} =
|
|
2589
|
-
|
|
2590
|
-
},
|
|
2591
|
-
label:
|
|
2592
|
-
value:
|
|
2593
|
-
selected: l.fields.certificate_id ===
|
|
2594
|
-
}))),
|
|
2692
|
+
validationError: Y,
|
|
2693
|
+
loadItems: E,
|
|
2694
|
+
results: j
|
|
2695
|
+
} = an(t.config, de.form[t.config.app].certificates), M = x(!0), B = (m) => {
|
|
2696
|
+
M.value = !m, C(m);
|
|
2697
|
+
}, $ = S(() => H.value ? n("errors.certificates.fetch") : ""), D = S(() => Y.value ? n("errors.certificates.invalid") : ""), ee = x(0), le = S(() => b.value === void 0), se = x(/* @__PURE__ */ new Set()), _ = S(() => Array.from(se.value).map((A) => ({
|
|
2698
|
+
label: A,
|
|
2699
|
+
value: A,
|
|
2700
|
+
selected: l.fields.certificate_id === A
|
|
2701
|
+
}))), R = (m) => {
|
|
2595
2702
|
se.value.clear();
|
|
2596
|
-
let
|
|
2597
|
-
for (
|
|
2598
|
-
se.value.add(
|
|
2703
|
+
let A;
|
|
2704
|
+
for (A of m)
|
|
2705
|
+
se.value.add(A.id);
|
|
2599
2706
|
};
|
|
2600
|
-
return te(
|
|
2601
|
-
|
|
2602
|
-
}, { immediate: !0, deep: !0 }), te(
|
|
2707
|
+
return te(j, (m) => {
|
|
2708
|
+
R(m);
|
|
2709
|
+
}, { immediate: !0, deep: !0 }), te(_, () => {
|
|
2603
2710
|
ee.value++;
|
|
2604
|
-
}, { immediate: !0, deep: !0 }),
|
|
2605
|
-
await
|
|
2606
|
-
}), (m,
|
|
2607
|
-
const
|
|
2608
|
-
return
|
|
2609
|
-
I(
|
|
2610
|
-
"can-submit":
|
|
2711
|
+
}, { immediate: !0, deep: !0 }), Ie(async () => {
|
|
2712
|
+
await E();
|
|
2713
|
+
}), (m, A) => {
|
|
2714
|
+
const V = K("KInput"), re = K("KSelect");
|
|
2715
|
+
return k(), P("div", xn, [
|
|
2716
|
+
I(s(wa), {
|
|
2717
|
+
"can-submit": w.value,
|
|
2611
2718
|
config: e.config,
|
|
2612
2719
|
"edit-id": e.sniId,
|
|
2613
|
-
"error-message": l.errorMessage ||
|
|
2720
|
+
"error-message": l.errorMessage || $.value,
|
|
2614
2721
|
"fetch-url": f.value,
|
|
2615
2722
|
"is-readonly": l.isReadonly,
|
|
2616
2723
|
onCancel: U,
|
|
2617
|
-
"onFetch:error":
|
|
2724
|
+
"onFetch:error": A[3] || (A[3] = (N) => m.$emit("error", N)),
|
|
2618
2725
|
"onFetch:success": T,
|
|
2619
|
-
onLoading:
|
|
2620
|
-
onSubmit:
|
|
2726
|
+
onLoading: A[4] || (A[4] = (N) => m.$emit("loading", N)),
|
|
2727
|
+
onSubmit: h
|
|
2621
2728
|
}, {
|
|
2622
|
-
default:
|
|
2623
|
-
I(
|
|
2624
|
-
description:
|
|
2625
|
-
title:
|
|
2729
|
+
default: u(() => [
|
|
2730
|
+
I(s(Le), {
|
|
2731
|
+
description: s(n)("form.sections.general.description"),
|
|
2732
|
+
title: s(n)("form.sections.general.title")
|
|
2626
2733
|
}, {
|
|
2627
|
-
default:
|
|
2628
|
-
I(
|
|
2734
|
+
default: u(() => [
|
|
2735
|
+
I(V, {
|
|
2629
2736
|
modelValue: l.fields.name,
|
|
2630
|
-
"onUpdate:modelValue":
|
|
2737
|
+
"onUpdate:modelValue": A[0] || (A[0] = (N) => l.fields.name = N),
|
|
2631
2738
|
modelModifiers: { trim: !0 },
|
|
2632
2739
|
autocomplete: "off",
|
|
2633
2740
|
"data-testid": "sni-form-name",
|
|
2634
|
-
label:
|
|
2635
|
-
placeholder:
|
|
2741
|
+
label: s(n)("form.fields.name.label"),
|
|
2742
|
+
placeholder: s(n)("form.fields.name.placeholder"),
|
|
2636
2743
|
readonly: l.isReadonly,
|
|
2637
2744
|
required: "",
|
|
2638
2745
|
type: "text"
|
|
2639
2746
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
2640
|
-
I(
|
|
2747
|
+
I(V, {
|
|
2641
2748
|
modelValue: l.fields.tags,
|
|
2642
|
-
"onUpdate:modelValue":
|
|
2749
|
+
"onUpdate:modelValue": A[1] || (A[1] = (N) => l.fields.tags = N),
|
|
2643
2750
|
modelModifiers: { trim: !0 },
|
|
2644
2751
|
autocomplete: "off",
|
|
2645
2752
|
"data-testid": "sni-form-tags",
|
|
2646
|
-
help:
|
|
2647
|
-
label:
|
|
2648
|
-
"label-attributes": {
|
|
2649
|
-
placeholder:
|
|
2753
|
+
help: s(n)("form.fields.tags.help"),
|
|
2754
|
+
label: s(n)("form.fields.tags.label"),
|
|
2755
|
+
"label-attributes": { info: s(n)("form.fields.tags.tooltip") },
|
|
2756
|
+
placeholder: s(n)("form.fields.tags.placeholder"),
|
|
2650
2757
|
readonly: l.isReadonly,
|
|
2651
2758
|
type: "text"
|
|
2652
2759
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
2653
2760
|
]),
|
|
2654
2761
|
_: 1
|
|
2655
2762
|
}, 8, ["description", "title"]),
|
|
2656
|
-
I(
|
|
2657
|
-
description:
|
|
2763
|
+
I(s(Le), {
|
|
2764
|
+
description: s(n)("form.sections.certificate.description"),
|
|
2658
2765
|
"has-divider": "",
|
|
2659
|
-
title:
|
|
2766
|
+
title: s(n)("form.sections.certificate.title")
|
|
2660
2767
|
}, {
|
|
2661
|
-
default:
|
|
2662
|
-
y.value ? (
|
|
2768
|
+
default: u(() => [
|
|
2769
|
+
y.value ? (k(), L(V, {
|
|
2663
2770
|
key: 0,
|
|
2664
2771
|
"data-testid": "sni-form-certificate-id",
|
|
2665
|
-
label:
|
|
2772
|
+
label: s(n)("form.fields.certificate_id.label"),
|
|
2666
2773
|
"model-value": y.value,
|
|
2667
2774
|
readonly: "",
|
|
2668
2775
|
required: "",
|
|
2669
2776
|
width: "100%"
|
|
2670
|
-
}, null, 8, ["label", "model-value"])) : (
|
|
2777
|
+
}, null, 8, ["label", "model-value"])) : (k(), L(re, {
|
|
2671
2778
|
key: 1,
|
|
2672
2779
|
modelValue: l.fields.certificate_id,
|
|
2673
|
-
"onUpdate:modelValue":
|
|
2780
|
+
"onUpdate:modelValue": A[2] || (A[2] = (N) => l.fields.certificate_id = N),
|
|
2674
2781
|
appearance: "select",
|
|
2675
2782
|
autosuggest: "",
|
|
2676
|
-
class: he({ "k-select-placeholder":
|
|
2783
|
+
class: he({ "k-select-placeholder": M.value }),
|
|
2677
2784
|
clearable: "",
|
|
2678
2785
|
"data-testid": "sni-form-certificate-id",
|
|
2679
|
-
"dropdown-footer-text": le.value ?
|
|
2786
|
+
"dropdown-footer-text": le.value ? s(n)("form.fields.certificate_id.footer") : void 0,
|
|
2680
2787
|
"enable-filtering": "",
|
|
2681
|
-
items:
|
|
2682
|
-
label:
|
|
2683
|
-
loading:
|
|
2684
|
-
placeholder:
|
|
2788
|
+
items: _.value,
|
|
2789
|
+
label: s(n)("form.fields.certificate_id.label"),
|
|
2790
|
+
loading: s(p),
|
|
2791
|
+
placeholder: s(n)("form.fields.certificate_id.placeholder"),
|
|
2685
2792
|
readonly: l.isReadonly,
|
|
2686
2793
|
required: "",
|
|
2687
2794
|
width: "100%",
|
|
2688
|
-
onQueryChange:
|
|
2795
|
+
onQueryChange: B
|
|
2689
2796
|
}, {
|
|
2690
|
-
loading:
|
|
2691
|
-
|
|
2797
|
+
loading: u(() => [
|
|
2798
|
+
F("div", null, O(s(n)("actions.loading")), 1)
|
|
2692
2799
|
]),
|
|
2693
|
-
empty:
|
|
2694
|
-
|
|
2800
|
+
empty: u(() => [
|
|
2801
|
+
F("div", Tn, O(s(n)("search.no_results")), 1)
|
|
2695
2802
|
]),
|
|
2696
2803
|
_: 1
|
|
2697
2804
|
}, 8, ["modelValue", "class", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"])),
|
|
2698
|
-
|
|
2805
|
+
D.value ? (k(), P("p", Nn, O(D.value), 1)) : Q("", !0)
|
|
2699
2806
|
]),
|
|
2700
2807
|
_: 1
|
|
2701
2808
|
}, 8, ["description", "title"])
|
|
@@ -2706,8 +2813,8 @@ const it = (e, a) => {
|
|
|
2706
2813
|
};
|
|
2707
2814
|
}
|
|
2708
2815
|
});
|
|
2709
|
-
const
|
|
2816
|
+
const qn = /* @__PURE__ */ lt(En, [["__scopeId", "data-v-576c2dac"]]);
|
|
2710
2817
|
export {
|
|
2711
|
-
|
|
2712
|
-
|
|
2818
|
+
qn as SniForm,
|
|
2819
|
+
Vn as SniList
|
|
2713
2820
|
};
|