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