@scalar/api-client 2.0.12 → 2.0.13
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/CHANGELOG.md +11 -0
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +38 -27
- package/dist/Modal/api-client-modal.d.ts +2 -1
- package/dist/Modal/api-client-modal.d.ts.map +1 -1
- package/dist/Modal/api-client-modal.js +49 -40
- package/dist/components/ActionModal/ActionModalFolder.vue.js +37 -35
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +42 -42
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts +1 -14
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +50 -55
- package/dist/components/Sidebar/Sidebar.vue.js +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -9
- package/dist/libs/index.d.ts +1 -0
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +10 -8
- package/dist/libs/local-storage.d.ts +9 -0
- package/dist/libs/local-storage.d.ts.map +1 -0
- package/dist/libs/local-storage.js +36 -0
- package/dist/router.d.ts +2 -2
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +13 -13
- package/dist/store/workspace.d.ts +511 -269
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +213 -157
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +93 -91
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +25 -25
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +56 -56
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +11 -11
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";AA6YA,wBAKG"}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { defineComponent as D, computed as h, resolveComponent as U,
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarDropdown as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as D, computed as h, resolveComponent as U, unref as s, openBlock as u, createBlock as k, withCtx as a, createElementBlock as S, Fragment as A, renderList as L, createElementVNode as d, normalizeClass as R, createVNode as i, toDisplayString as f, withModifiers as j } from "vue";
|
|
2
|
+
import { useWorkspace as E } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarDropdown as I, ScalarDropdownItem as g, ScalarIcon as C, ScalarDropdownDivider as M } from "@scalar/components";
|
|
4
|
+
const N = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, O = { class: "flex items-center justify-center h-4 w-4" }, V = /* @__PURE__ */ d("span", null, "Add Server", -1), F = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "flex whitespace-nowrap items-center font-code lg:text-sm text-xs"
|
|
7
7
|
}, H = /* @__PURE__ */ D({
|
|
8
8
|
__name: "AddressBarServer",
|
|
9
|
-
props: {
|
|
10
|
-
workspace: {}
|
|
11
|
-
},
|
|
12
9
|
setup(W) {
|
|
13
|
-
const { activeCollection: l, servers:
|
|
10
|
+
const { activeCollection: l, isReadOnly: y, servers: x, collectionMutators: b } = E(), p = h(
|
|
14
11
|
() => {
|
|
15
12
|
var e, t;
|
|
16
13
|
return (t = (e = l.value) == null ? void 0 : e.spec.serverUids) == null ? void 0 : t.map((n) => ({
|
|
17
14
|
id: n,
|
|
18
|
-
label:
|
|
15
|
+
label: x[n].url
|
|
19
16
|
}));
|
|
20
17
|
}
|
|
21
18
|
), z = (e) => {
|
|
@@ -27,82 +24,80 @@ const E = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, I = { cl
|
|
|
27
24
|
}, B = (e) => {
|
|
28
25
|
var t;
|
|
29
26
|
return ((t = l.value) == null ? void 0 : t.selectedServerUid) === e;
|
|
30
|
-
},
|
|
27
|
+
}, m = h(() => {
|
|
31
28
|
var c;
|
|
32
|
-
const e =
|
|
33
|
-
return t == null ? void 0 : t.replace(n, (
|
|
34
|
-
var
|
|
35
|
-
const o = (
|
|
36
|
-
return (o == null ? void 0 : o.value) || (o == null ? void 0 : o.default) || ((
|
|
29
|
+
const e = x[((c = l.value) == null ? void 0 : c.selectedServerUid) ?? ""], t = e == null ? void 0 : e.url, n = /{\s*([\w.-]+)\s*}/g;
|
|
30
|
+
return t == null ? void 0 : t.replace(n, (r, v) => {
|
|
31
|
+
var _, w;
|
|
32
|
+
const o = (_ = e == null ? void 0 : e.variables) == null ? void 0 : _[v];
|
|
33
|
+
return (o == null ? void 0 : o.value) || (o == null ? void 0 : o.default) || ((w = o == null ? void 0 : o.enum) == null ? void 0 : w[0]) || r;
|
|
37
34
|
});
|
|
38
35
|
});
|
|
39
36
|
return (e, t) => {
|
|
40
37
|
var c;
|
|
41
38
|
const n = U("RouterLink");
|
|
42
|
-
return p.value && !
|
|
39
|
+
return p.value && !s(y) ? (u(), k(s(I), {
|
|
43
40
|
key: 0,
|
|
44
41
|
options: p.value,
|
|
45
42
|
resize: "",
|
|
46
43
|
teleport: "#scalar-client",
|
|
47
|
-
value: (c =
|
|
44
|
+
value: (c = s(l)) == null ? void 0 : c.selectedServerUid
|
|
48
45
|
}, {
|
|
49
|
-
items:
|
|
50
|
-
(
|
|
51
|
-
key:
|
|
46
|
+
items: a(() => [
|
|
47
|
+
(u(!0), S(A, null, L(p.value, (r) => (u(), k(s(g), {
|
|
48
|
+
key: r.id,
|
|
52
49
|
class: "flex !gap-1.5 group font-code text-xxs whitespace-nowrap text-ellipsis overflow-hidden",
|
|
53
|
-
value:
|
|
54
|
-
onClick: (
|
|
50
|
+
value: r.id,
|
|
51
|
+
onClick: (v) => z(r.id)
|
|
55
52
|
}, {
|
|
56
|
-
default:
|
|
57
|
-
|
|
58
|
-
class:
|
|
53
|
+
default: a(() => [
|
|
54
|
+
d("div", {
|
|
55
|
+
class: R([
|
|
59
56
|
"flex size-4 items-center justify-center rounded-full p-[3px] group-hover:shadow-border",
|
|
60
|
-
B(
|
|
57
|
+
B(r.id) ? "bg-blue text-b-1" : "text-transparent"
|
|
61
58
|
])
|
|
62
59
|
}, [
|
|
63
|
-
|
|
60
|
+
i(s(C), {
|
|
64
61
|
class: "relative top-[0.5px] size-2.5 stroke-[1.75]",
|
|
65
62
|
icon: "Checkmark"
|
|
66
63
|
})
|
|
67
64
|
], 2),
|
|
68
|
-
|
|
65
|
+
d("span", N, f(r.label), 1)
|
|
69
66
|
]),
|
|
70
67
|
_: 2
|
|
71
68
|
}, 1032, ["value", "onClick"]))), 128)),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
})
|
|
86
|
-
]),
|
|
87
|
-
M
|
|
69
|
+
i(s(M)),
|
|
70
|
+
i(s(g), null, {
|
|
71
|
+
default: a(() => [
|
|
72
|
+
i(n, {
|
|
73
|
+
class: "font-code text-xxs flex items-center gap-1.5",
|
|
74
|
+
to: "/servers"
|
|
75
|
+
}, {
|
|
76
|
+
default: a(() => [
|
|
77
|
+
d("div", O, [
|
|
78
|
+
i(s(C), {
|
|
79
|
+
class: "h-2.5",
|
|
80
|
+
icon: "Add"
|
|
81
|
+
})
|
|
88
82
|
]),
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
V
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
})
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
})
|
|
95
90
|
]),
|
|
96
|
-
default:
|
|
97
|
-
|
|
91
|
+
default: a(() => [
|
|
92
|
+
d("button", {
|
|
98
93
|
class: "font-code lg:text-sm text-xs whitespace-nowrap border border-b-3 border-solid rounded px-1.5 text-c-2 z-[1]",
|
|
99
94
|
type: "button",
|
|
100
|
-
onClick: t[0] || (t[0] =
|
|
95
|
+
onClick: t[0] || (t[0] = j(() => {
|
|
101
96
|
}, ["stop"]))
|
|
102
|
-
}, f(
|
|
97
|
+
}, f(m.value), 1)
|
|
103
98
|
]),
|
|
104
99
|
_: 1
|
|
105
|
-
}, 8, ["options", "value"])) : (
|
|
100
|
+
}, 8, ["options", "value"])) : (u(), S("div", F, f(m.value), 1));
|
|
106
101
|
};
|
|
107
102
|
}
|
|
108
103
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
1
|
+
import { defineComponent as l, openBlock as s, createElementBlock as o, unref as c, createElementVNode as r, renderSlot as t, createCommentVNode as i } from "vue";
|
|
2
|
+
import { useWorkspace as a } from "../../store/workspace.js";
|
|
3
3
|
const d = { class: "w-sidebar relative flex flex-col border-r bg-b-1" }, m = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "xl:min-h-header py-2.5 flex items-center border-b px-4 text-sm"
|
|
6
|
-
}, _ = { class: "font-medium m-0 text-sm" }, p = { class: "custom-scroll sidebar-height" }, x = /* @__PURE__ */
|
|
6
|
+
}, _ = { class: "font-medium m-0 text-sm" }, p = { class: "custom-scroll sidebar-height" }, x = /* @__PURE__ */ l({
|
|
7
7
|
__name: "Sidebar",
|
|
8
8
|
setup(f) {
|
|
9
|
-
const {
|
|
9
|
+
const { isReadOnly: n } = a();
|
|
10
10
|
return (e, h) => (s(), o("aside", d, [
|
|
11
|
-
|
|
11
|
+
c(n) ? i("", !0) : (s(), o("div", m, [
|
|
12
12
|
r("h2", _, [
|
|
13
13
|
t(e.$slots, "title")
|
|
14
14
|
])
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as ScalarClient } from './App.vue.js';
|
|
2
2
|
export * from './Modal/index.js';
|
|
3
3
|
export { useWorkspace } from './store/workspace.js';
|
|
4
|
-
export {
|
|
4
|
+
export { modalRouter } from './router.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,WAAW,CAAA;AACnD,cAAc,SAAS,CAAA;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,WAAW,CAAA;AACnD,cAAc,SAAS,CAAA;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as t } from "./App.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { useWorkspace as l } from "./store/workspace.js";
|
|
4
|
-
import {
|
|
5
|
-
import { default as
|
|
6
|
-
import { createScalarApiClient as
|
|
4
|
+
import { modalRouter as f } from "./router.js";
|
|
5
|
+
import { default as i } from "./Modal/ApiClientModal.vue.js";
|
|
6
|
+
import { createScalarApiClient as c } from "./Modal/api-client-modal.js";
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
f as
|
|
12
|
-
s as createScalarApiClient,
|
|
8
|
+
i as ApiClientModal,
|
|
9
|
+
t as ScalarClient,
|
|
10
|
+
c as createScalarApiClient,
|
|
11
|
+
f as modalRouter,
|
|
13
12
|
l as useWorkspace
|
|
14
13
|
};
|
package/dist/libs/index.d.ts
CHANGED
package/dist/libs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/libs/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { formatBytes as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { formatBytes as r, formatMs as t } from "./formatters.js";
|
|
2
|
+
import { loadAllResources as m } from "./local-storage.js";
|
|
3
|
+
import { syncPathParamsFromURL as a } from "./pathParams.js";
|
|
4
|
+
import { sendRequest as p } from "./sendRequest.js";
|
|
5
|
+
import { executeRequestBus as R } from "./eventBusses/executeRequestBus.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
R as executeRequestBus,
|
|
8
|
+
r as formatBytes,
|
|
8
9
|
t as formatMs,
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
m as loadAllResources,
|
|
11
|
+
p as sendRequest,
|
|
12
|
+
a as syncPathParamsFromURL
|
|
11
13
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { useWorkspace } from '../store/workspace.js';
|
|
2
|
+
/**
|
|
3
|
+
* Loads all resources from localStorage into mutators on app start
|
|
4
|
+
* We use the raw mutator.add here instead of the custom ones because we do NOT want any side effects
|
|
5
|
+
*
|
|
6
|
+
* Currently not working for workspace
|
|
7
|
+
*/
|
|
8
|
+
export declare const loadAllResources: (mutators: ReturnType<typeof useWorkspace>, workspaceUid?: string) => void;
|
|
9
|
+
//# sourceMappingURL=local-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../src/libs/local-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAcrD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aACjB,UAAU,CAAC,OAAO,YAAY,CAAC,gCAoE1C,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LS_KEYS as e } from "@scalar/object-utils/mutator-record";
|
|
2
|
+
const h = (t, o = "default") => {
|
|
3
|
+
const {
|
|
4
|
+
collectionMutators: s,
|
|
5
|
+
cookieMutators: a,
|
|
6
|
+
environmentMutators: r,
|
|
7
|
+
folderMutators: c,
|
|
8
|
+
requestExampleMutators: l,
|
|
9
|
+
requestMutators: E,
|
|
10
|
+
serverMutators: u,
|
|
11
|
+
securitySchemeMutators: S,
|
|
12
|
+
workspaceMutators: O
|
|
13
|
+
} = t;
|
|
14
|
+
Object.values(
|
|
15
|
+
JSON.parse(localStorage.getItem(e.COLLECTION) || "{}")
|
|
16
|
+
).forEach(s.rawAdd), Object.values(
|
|
17
|
+
JSON.parse(localStorage.getItem(e.COOKIE) || "{}")
|
|
18
|
+
).forEach(a.add), Object.values(
|
|
19
|
+
JSON.parse(localStorage.getItem(e.ENVIRONMENT) || "{}")
|
|
20
|
+
).forEach(r.add), Object.values(
|
|
21
|
+
JSON.parse(localStorage.getItem(e.FOLDER) || "{}")
|
|
22
|
+
).forEach(c.rawAdd), Object.values(
|
|
23
|
+
JSON.parse(localStorage.getItem(e.REQUEST_EXAMPLE) || "{}")
|
|
24
|
+
).forEach(l.rawAdd), Object.values(
|
|
25
|
+
JSON.parse(localStorage.getItem(e.REQUEST) || "{}")
|
|
26
|
+
).forEach(E.rawAdd), Object.values(
|
|
27
|
+
JSON.parse(localStorage.getItem(e.SERVER) || "{}")
|
|
28
|
+
).forEach(u.rawAdd), Object.values(
|
|
29
|
+
JSON.parse(localStorage.getItem(e.SECURITY_SCHEME) || "{}")
|
|
30
|
+
).forEach(S.add), Object.values(
|
|
31
|
+
JSON.parse(localStorage.getItem(e.WORKSPACE + o) || "{}")
|
|
32
|
+
).forEach(O.add);
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
h as loadAllResources
|
|
36
|
+
};
|
package/dist/router.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare enum PathId {
|
|
|
8
8
|
Server = "server"
|
|
9
9
|
}
|
|
10
10
|
/** Routes required by the client modal */
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const modalRoutes: ({
|
|
12
12
|
path: string;
|
|
13
13
|
redirect: string;
|
|
14
14
|
component?: undefined;
|
|
@@ -19,7 +19,7 @@ export declare const clientRoutes: ({
|
|
|
19
19
|
})[];
|
|
20
20
|
export declare const router: import("vue-router").Router;
|
|
21
21
|
/** Creates the in memory client router */
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const modalRouter: import("vue-router").Router;
|
|
23
23
|
export declare const activeRouterParams: import("vue").ComputedRef<{
|
|
24
24
|
collection: string;
|
|
25
25
|
environment: string;
|
package/dist/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAGA,oBAAY,MAAM;IAChB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;CAClB;AAED,0CAA0C;AAC1C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAGA,oBAAY,MAAM;IAChB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;CAClB;AAED,0CAA0C;AAC1C,eAAO,MAAM,WAAW;;;;;;;;IAcvB,CAAA;AAyDD,eAAO,MAAM,MAAM,6BAGjB,CAAA;AAEF,0CAA0C;AAC1C,eAAO,MAAM,WAAW,6BAGtB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;EAyB7B,CAAA;AAEF,gGAAgG;AAChG,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,QAmBtC"}
|
package/dist/router.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { createRouter as c, createWebHistory as l, createMemoryHistory as
|
|
1
|
+
import { computed as m } from "vue";
|
|
2
|
+
import { createRouter as c, createWebHistory as l, createMemoryHistory as i } from "vue-router";
|
|
3
3
|
var u = /* @__PURE__ */ ((e) => (e.Request = "request", e.Example = "example", e.Cookies = "cookies", e.Collection = "collection", e.Schema = "schema", e.Environment = "environment", e.Server = "server", e))(u || {});
|
|
4
4
|
const s = [
|
|
5
5
|
{ path: "/", redirect: "/request/default" },
|
|
@@ -71,10 +71,10 @@ const s = [
|
|
|
71
71
|
], t = c({
|
|
72
72
|
history: l(),
|
|
73
73
|
routes: p
|
|
74
|
-
}),
|
|
75
|
-
history:
|
|
74
|
+
}), n = c({
|
|
75
|
+
history: i(),
|
|
76
76
|
routes: s
|
|
77
|
-
}),
|
|
77
|
+
}), d = m(() => {
|
|
78
78
|
const e = {
|
|
79
79
|
collection: "default",
|
|
80
80
|
environment: "default",
|
|
@@ -83,15 +83,15 @@ const s = [
|
|
|
83
83
|
schema: "default",
|
|
84
84
|
cookies: "default",
|
|
85
85
|
server: "default"
|
|
86
|
-
}, o =
|
|
86
|
+
}, o = n.currentRoute.value.matched.length ? n.currentRoute.value : t.currentRoute.value;
|
|
87
87
|
return o && Object.values(u).forEach((r) => {
|
|
88
88
|
o.params[r] && (e[r] = o.params[r]);
|
|
89
89
|
}), e;
|
|
90
90
|
});
|
|
91
|
-
function
|
|
92
|
-
var r,
|
|
91
|
+
function f(e, o) {
|
|
92
|
+
var r, a;
|
|
93
93
|
t.currentRoute.value && // If the item is missing then we know the UID is no longer in use and redirect to the default
|
|
94
|
-
!o && ((r = t.currentRoute.value) != null && r.params[e]) && ((
|
|
94
|
+
!o && ((r = t.currentRoute.value) != null && r.params[e]) && ((a = t.currentRoute.value) == null ? void 0 : a.params[e]) !== "default" && // We only redirect if the key is missing for the matching route
|
|
95
95
|
t.currentRoute.value.path.includes(e) && t.push({
|
|
96
96
|
params: {
|
|
97
97
|
...t.currentRoute.value.params,
|
|
@@ -101,9 +101,9 @@ function d(e, o) {
|
|
|
101
101
|
}
|
|
102
102
|
export {
|
|
103
103
|
u as PathId,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
d as activeRouterParams,
|
|
105
|
+
f as fallbackMissingParams,
|
|
106
|
+
n as modalRouter,
|
|
107
|
+
s as modalRoutes,
|
|
108
108
|
t as router
|
|
109
109
|
};
|