@redocly/framework-plugin-apigee 0.1.0-next.0 → 0.1.0-next.1
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 +46 -0
- package/README.md +2 -2
- package/lib/.tsbuildinfo +1 -1
- package/lib/client/ApigeeTemplate.js +1 -1
- package/lib/client/Primitives.d.ts +26 -29
- package/lib/client/Primitives.js +155 -107
- package/lib/client/views/AdminView.js +14 -15
- package/lib/client/views/AppsView.d.ts +5 -1
- package/lib/client/views/AppsView.js +5 -1
- package/lib/client/views/Dialogs.d.ts +10 -1
- package/lib/client/views/Dialogs.js +9 -1
- package/lib/client/views/TeamsView.js +1 -1
- package/lib/constants.d.ts +1 -1
- package/lib/constants.js +1 -1
- package/lib/contract.d.ts +13 -0
- package/lib/plugin.d.ts +1 -1
- package/lib/plugin.js +1 -1
- package/lib/server/service.d.ts +5 -0
- package/lib/server/service.js +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as j}from"react/jsx-runtime";import{useCallback as C,useMemo as S}from"react";import{useLocation as U}from"react-router";import{Button as V}from"@redocly/theme/components/Button/Button";import{useThemeHooks as
|
|
1
|
+
import{jsx as e,jsxs as j}from"react/jsx-runtime";import{useCallback as C,useMemo as S}from"react";import{useLocation as U}from"react-router";import{Button as V}from"@redocly/theme/components/Button/Button";import{useThemeHooks as D}from"@redocly/theme/core/hooks";import{APIGEE_DEFAULT_TITLE as R}from"../constants.js";import{apigeeApi as T}from"./api.js";import{ApigeeContext as $}from"./context.js";import{useAsync as y}from"./hooks.js";import{EmptyState as O,Loading as B,Notice as v,Page as f,Tabs as M}from"./Primitives.js";import{AdminView as W}from"./views/AdminView.js";import{AppsView as F}from"./views/AppsView.js";import{TeamDetailView as G,TeamsView as H}from"./views/TeamsView.js";function N(n,m,l){var s;const r=l==="/"?"":l,i=(n.startsWith(r)?n.slice(r.length):n).split("/").filter(Boolean).map(decodeURIComponent);if(i[0]==="teams")return i[1]?{view:"team",teamId:i[1]}:{view:"teams"};if(i[0]==="admin")return{view:"admin"};if(i[0]){const o=(s=new URLSearchParams(m).get("team"))!==null&&s!==void 0?s:void 0;return{view:"apps",selection:Object.assign({appId:i[0]},o?{teamId:o}:{})}}return{view:"apps",selection:null}}function Y({page:n}){var m,l,s;const r=U(),{userData:d,loginUrl:i}=D().useUserMenu(),o=n.slug.length>1&&n.slug.endsWith("/")?n.slug.slice(0,-1):n.slug,h=typeof((m=n.metadata)===null||m===void 0?void 0:m.title)=="string"?n.metadata.title:R,t=S(()=>N(r.pathname,r.search,o),[r.pathname,r.search,o]),p=d?.isAuthenticated===!0,a=y(()=>T.meta(),p?"meta":"meta:anonymous"),c=y(()=>p?T.listTeams():Promise.resolve([]),p?"teams":"teams:anonymous"),u=C((L="",g)=>{const _=o==="/"?"":o,b=new URLSearchParams;for(const[E,k]of Object.entries(g??{}))k!==void 0&&b.set(E,k);const A=b.toString();return`${_}${L}${A?`?${A}`:""}`||"/"},[o]);if(!p)return e(f,{children:e(O,{icon:"lock",title:"Sign in to manage your apps",text:"Your apps and their API keys are tied to your portal account.",action:i?e(V,{variant:"primary",onClick:()=>window.location.assign(i),children:"Sign in"}):void 0})});if(a.loading&&!a.data)return e(f,{children:e(B,{label:"Loading\u2026"})});if(a.error||!a.data)return e(f,{children:e(v,{tone:"danger",children:(l=a.error)!==null&&l!==void 0?l:"Apigee is not available"})});const P={meta:a.data,basePath:o,title:h,link:u},w=(s=c.data)!==null&&s!==void 0?s:[],x=[{type:"link",label:h,link:u(),icon:"key",active:t.view==="apps"},...a.data.teamsEnabled?[{type:"link",label:"Teams",link:u("/teams"),icon:"user-group",active:t.view==="teams"}]:[],...a.data.approvals.canView?[{type:"link",label:"Approvals",link:u("/admin"),icon:"shield-check",active:t.view==="admin"}]:[]],I=t.view==="team"||t.view==="apps"&&t.selection!==null;return e($.Provider,{value:P,children:j(f,{"data-component-name":"Apigee/AppsPage","data-testid":"apigee-page",children:[I?null:e(M,{items:x}),c.error?e(v,{tone:"danger",children:c.error}):null,t.view==="apps"?e(F,{selection:t.selection,teams:w,products:a.data.apiProducts}):t.view==="teams"?a.data.teamsEnabled?e(H,{teams:w,onTeamsChanged:c.reload}):e(v,{tone:"warning",children:"Teams are disabled on this portal."}):t.view==="team"?e(G,{teamId:t.teamId,onTeamsChanged:c.reload}):a.data.approvals.canView?e(W,{}):e(v,{tone:"warning",children:"Only reviewers of an API product can open this page."})]})})}export{Y as default,N as parseRoute};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Breadcrumbs } from '@redocly/theme/components/Breadcrumbs/Breadcrumbs';
|
|
3
|
+
import type { NavigationTabItem } from '@redocly/theme/core/types';
|
|
3
4
|
import type { ApprovalStatus } from '../contract.js';
|
|
4
5
|
export declare const Page: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
5
6
|
export declare function PageHeader({ title, description, actions, }: {
|
|
@@ -10,16 +11,8 @@ export declare function PageHeader({ title, description, actions, }: {
|
|
|
10
11
|
export declare const SectionTitle: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>>> & string;
|
|
11
12
|
export declare const Section: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>>> & string;
|
|
12
13
|
export declare const SectionHeader: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
label: ReactNode;
|
|
16
|
-
to: string;
|
|
17
|
-
icon?: string;
|
|
18
|
-
count?: number;
|
|
19
|
-
};
|
|
20
|
-
export declare function Tabs({ items, active }: {
|
|
21
|
-
items: TabItem[];
|
|
22
|
-
active: string;
|
|
14
|
+
export declare function Tabs({ items }: {
|
|
15
|
+
items: NavigationTabItem[];
|
|
23
16
|
}): ReactElement;
|
|
24
17
|
export declare const TableWrap: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
25
18
|
export declare const Table: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>>> & string;
|
|
@@ -34,9 +27,12 @@ export declare function EmptyState({ icon, title, text, action, }: {
|
|
|
34
27
|
}): ReactElement;
|
|
35
28
|
export declare const Field: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>>> & string;
|
|
36
29
|
export declare const FieldLabel: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
|
|
30
|
+
/** The label of a field the form cannot be sent without; the input itself needs `required`. */
|
|
31
|
+
export declare function RequiredLabel({ children }: {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
}): ReactElement;
|
|
37
34
|
export declare const Input: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>>> & string;
|
|
38
35
|
export declare const Textarea: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, never>>> & string;
|
|
39
|
-
export declare const NativeSelect: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>>> & string;
|
|
40
36
|
export declare const CheckList: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
41
37
|
export declare const CheckItem: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "$checked"> & {
|
|
42
38
|
$checked?: boolean;
|
|
@@ -64,21 +60,22 @@ export declare function StatusTag({ status, label, }: {
|
|
|
64
60
|
export declare const Overview: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDListElement>, HTMLDListElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDListElement>, HTMLDListElement>, never>>> & string;
|
|
65
61
|
export declare const Stats: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
66
62
|
export declare const Stat: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
67
|
-
export declare
|
|
68
|
-
|
|
63
|
+
export declare function Loading({ label }: {
|
|
64
|
+
label: string;
|
|
65
|
+
}): ReactElement;
|
|
69
66
|
export declare const ListTitle: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
70
|
-
export declare const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}, "
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
67
|
+
export declare const PageBreadcrumbs: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<{
|
|
68
|
+
className?: string;
|
|
69
|
+
additionalBreadcrumbs?: import("@redocly/theme").BreadcrumbItem[];
|
|
70
|
+
}, never> & Partial<Pick<{
|
|
71
|
+
className?: string;
|
|
72
|
+
additionalBreadcrumbs?: import("@redocly/theme").BreadcrumbItem[];
|
|
73
|
+
}, never>>> & string & Omit<typeof Breadcrumbs, keyof import("react").Component<any, {}, any>>;
|
|
74
|
+
export declare const LinkList: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
75
|
+
export declare function LinkRow({ to, title, subtitle, tag, testId, }: {
|
|
76
|
+
to: string;
|
|
77
|
+
title: ReactNode;
|
|
78
|
+
subtitle?: ReactNode;
|
|
79
|
+
tag?: ReactNode;
|
|
80
|
+
testId?: string;
|
|
81
|
+
}): ReactElement;
|
package/lib/client/Primitives.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as
|
|
1
|
+
import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as m}from"react";import r from"styled-components";import{Admonition as h}from"@redocly/theme/components/Admonition/Admonition";import{Breadcrumbs as b}from"@redocly/theme/components/Breadcrumbs/Breadcrumbs";import{Button as f}from"@redocly/theme/components/Button/Button";import{Link as u}from"@redocly/theme/components/Link/Link";import{SpinnerLoader as y}from"@redocly/theme/components/Loaders/SpinnerLoader";import{NavigationTab as w}from"@redocly/theme/components/NavigationTabs/NavigationTab";import{Portal as k}from"@redocly/theme/components/Portal/Portal";import{Tag as z}from"@redocly/theme/components/Tag/Tag";import{breakpoints as T}from"@redocly/theme/core/utils/media-css";import{CDNIcon as l}from"@redocly/theme/icons/CDNIcon/CDNIcon";const lr=r.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
max-width: 1200px;
|
|
4
4
|
margin: 0 auto;
|
|
@@ -6,14 +6,14 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
6
6
|
font-size: var(--font-size-base);
|
|
7
7
|
line-height: var(--line-height-base);
|
|
8
8
|
color: var(--text-color-primary);
|
|
9
|
-
`,
|
|
9
|
+
`,L=r.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: flex-start;
|
|
12
12
|
justify-content: space-between;
|
|
13
13
|
flex-wrap: wrap;
|
|
14
14
|
gap: var(--spacing-base);
|
|
15
15
|
margin-bottom: var(--spacing-lg);
|
|
16
|
-
`,
|
|
16
|
+
`,S=r.h1`
|
|
17
17
|
margin: 0;
|
|
18
18
|
font-size: var(--font-size-xl);
|
|
19
19
|
line-height: var(--line-height-xl);
|
|
@@ -21,59 +21,48 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
21
21
|
display: flex;
|
|
22
22
|
align-items: center;
|
|
23
23
|
gap: var(--spacing-sm);
|
|
24
|
-
`,
|
|
24
|
+
`,j=r.p`
|
|
25
25
|
margin: var(--spacing-xxs) 0 0;
|
|
26
26
|
color: var(--text-color-description);
|
|
27
27
|
max-width: 720px;
|
|
28
|
-
`,
|
|
28
|
+
`,D=r.div`
|
|
29
29
|
display: flex;
|
|
30
30
|
align-items: center;
|
|
31
31
|
gap: var(--spacing-xs);
|
|
32
32
|
flex-wrap: wrap;
|
|
33
|
-
`;function
|
|
33
|
+
`;function cr({title:e,description:a,actions:i}){return t(L,{children:[t("div",{children:[o(S,{children:e}),a?o(j,{children:a}):null]}),i?o(D,{children:i}):null]})}const E=r.h2`
|
|
34
34
|
margin: 0 0 var(--spacing-sm);
|
|
35
35
|
font-size: var(--font-size-lg);
|
|
36
36
|
line-height: var(--line-height-lg);
|
|
37
37
|
font-weight: var(--font-weight-semibold);
|
|
38
|
-
`,
|
|
38
|
+
`,pr=r.section`
|
|
39
39
|
margin-top: var(--spacing-xl);
|
|
40
|
-
`,
|
|
40
|
+
`,gr=r.div`
|
|
41
41
|
display: flex;
|
|
42
42
|
align-items: center;
|
|
43
43
|
justify-content: space-between;
|
|
44
44
|
gap: var(--spacing-sm);
|
|
45
45
|
margin-bottom: var(--spacing-sm);
|
|
46
46
|
|
|
47
|
-
${
|
|
47
|
+
${E} {
|
|
48
48
|
margin: 0;
|
|
49
49
|
}
|
|
50
|
-
`,
|
|
51
|
-
|
|
52
|
-
gap: var(--spacing-xxs);
|
|
53
|
-
border-bottom: 1px solid var(--border-color-secondary);
|
|
50
|
+
`,R=r.nav`
|
|
51
|
+
border-bottom: var(--navigation-tabs-bottom-border);
|
|
54
52
|
margin-bottom: var(--spacing-lg);
|
|
55
|
-
|
|
56
|
-
display:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
text-decoration: none;
|
|
65
|
-
border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
|
|
66
|
-
|
|
67
|
-
&:hover {
|
|
68
|
-
color: var(--text-color-primary);
|
|
69
|
-
background: var(--layer-color-hover);
|
|
70
|
-
text-decoration: none;
|
|
71
|
-
}
|
|
72
|
-
`;function X({items:r,active:i}){return o(T,{"aria-label":"Sections",children:r.map(a=>t(S,{to:a.to,$active:a.key===i,"data-testid":`apigee-tab-${a.key}`,children:[a.icon?o(s,{name:a.icon,size:"16px"}):null,a.label,a.count!==void 0&&a.count>0?o(g,{color:"grey",children:a.count}):null]},a.key))})}const Y=e.div`
|
|
53
|
+
`,$=r.ul`
|
|
54
|
+
display: flex;
|
|
55
|
+
gap: var(--navigation-tabs-gap);
|
|
56
|
+
height: var(--navigation-tabs-height);
|
|
57
|
+
margin: 0 0 calc(-1 * var(--navigation-tabs-border-width));
|
|
58
|
+
padding: 0;
|
|
59
|
+
overflow-x: auto;
|
|
60
|
+
scrollbar-width: none;
|
|
61
|
+
`;function vr({items:e}){return o(R,{"aria-label":"Sections",children:o($,{children:e.map(a=>o(w,{tab:a},a.link))})})}const xr=r.div`
|
|
73
62
|
border: 1px solid var(--border-color-secondary);
|
|
74
63
|
border-radius: var(--border-radius-xl);
|
|
75
64
|
overflow-x: auto;
|
|
76
|
-
`,
|
|
65
|
+
`,mr=r.table`
|
|
77
66
|
width: 100%;
|
|
78
67
|
border-collapse: collapse;
|
|
79
68
|
font-size: var(--font-size-base);
|
|
@@ -102,28 +91,99 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
102
91
|
|
|
103
92
|
td.actions,
|
|
104
93
|
th.actions {
|
|
94
|
+
position: sticky;
|
|
95
|
+
right: 0;
|
|
105
96
|
text-align: right;
|
|
106
97
|
white-space: nowrap;
|
|
107
98
|
width: 1%;
|
|
99
|
+
background: var(--bg-color);
|
|
100
|
+
box-shadow: inset 1px 0 0 var(--border-color-secondary);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
tbody tr:hover td.actions {
|
|
104
|
+
background: linear-gradient(var(--layer-color-hover), var(--layer-color-hover)), var(--bg-color);
|
|
108
105
|
}
|
|
109
106
|
|
|
110
107
|
td.key {
|
|
111
108
|
min-width: 260px;
|
|
112
109
|
}
|
|
113
|
-
|
|
110
|
+
|
|
111
|
+
@media (max-width: ${T.small}) {
|
|
112
|
+
thead {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
tbody,
|
|
117
|
+
tr,
|
|
118
|
+
td {
|
|
119
|
+
display: block;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
tr {
|
|
123
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
124
|
+
border-bottom: 1px solid var(--border-color-secondary);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
tbody tr:last-child {
|
|
128
|
+
border-bottom: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
td,
|
|
132
|
+
td.actions,
|
|
133
|
+
td.key {
|
|
134
|
+
position: static;
|
|
135
|
+
width: auto;
|
|
136
|
+
min-width: 0;
|
|
137
|
+
padding: var(--spacing-xxs) 0;
|
|
138
|
+
border-bottom: none;
|
|
139
|
+
text-align: left;
|
|
140
|
+
white-space: normal;
|
|
141
|
+
background: none;
|
|
142
|
+
box-shadow: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
td[data-label]::before {
|
|
146
|
+
content: attr(data-label);
|
|
147
|
+
display: block;
|
|
148
|
+
font-size: var(--font-size-sm);
|
|
149
|
+
line-height: var(--line-height-sm);
|
|
150
|
+
color: var(--text-color-description);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
tbody tr:hover td,
|
|
154
|
+
tbody tr:hover td.actions {
|
|
155
|
+
background: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
td.actions:not(:empty) {
|
|
159
|
+
padding-top: var(--spacing-xs);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
tr {
|
|
163
|
+
position: relative;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
td.actions.menu {
|
|
167
|
+
position: absolute;
|
|
168
|
+
top: var(--spacing-xs);
|
|
169
|
+
right: var(--spacing-xs);
|
|
170
|
+
padding: 0;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
`,c=r.span`
|
|
114
174
|
color: var(--text-color-description);
|
|
115
175
|
font-size: var(--font-size-sm);
|
|
116
176
|
line-height: var(--line-height-sm);
|
|
117
|
-
`,
|
|
177
|
+
`,hr=r.code`
|
|
118
178
|
font-family: var(--font-family-monospaced);
|
|
119
179
|
font-size: var(--font-size-sm);
|
|
120
180
|
white-space: nowrap;
|
|
121
|
-
`,
|
|
181
|
+
`,br=r.div`
|
|
122
182
|
display: flex;
|
|
123
183
|
align-items: center;
|
|
124
184
|
gap: var(--spacing-xs);
|
|
125
185
|
flex-wrap: wrap;
|
|
126
|
-
`,
|
|
186
|
+
`,P=r.div`
|
|
127
187
|
display: flex;
|
|
128
188
|
flex-direction: column;
|
|
129
189
|
align-items: center;
|
|
@@ -132,7 +192,7 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
132
192
|
border: 1px dashed var(--border-color-primary);
|
|
133
193
|
border-radius: var(--border-radius-xl);
|
|
134
194
|
text-align: center;
|
|
135
|
-
`,
|
|
195
|
+
`,W=r.div`
|
|
136
196
|
width: 48px;
|
|
137
197
|
height: 48px;
|
|
138
198
|
display: grid;
|
|
@@ -140,18 +200,21 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
140
200
|
border: 1px solid var(--border-color-secondary);
|
|
141
201
|
border-radius: var(--border-radius-lg);
|
|
142
202
|
background: var(--layer-color);
|
|
143
|
-
`,
|
|
203
|
+
`,A=r.div`
|
|
144
204
|
font-weight: var(--font-weight-semibold);
|
|
145
|
-
`;function
|
|
205
|
+
`;function fr({icon:e,title:a,text:i,action:n}){return t(P,{"data-testid":"apigee-empty",children:[o(W,{children:o(l,{name:e,size:"24px"})}),o(A,{children:a}),i?o(c,{style:{maxWidth:420},children:i}):null,n]})}const ur=r.label`
|
|
146
206
|
display: flex;
|
|
147
207
|
flex-direction: column;
|
|
148
208
|
gap: var(--spacing-xxs);
|
|
149
209
|
font-size: var(--font-size-base);
|
|
150
|
-
`,
|
|
210
|
+
`,B=r.span`
|
|
151
211
|
font-weight: var(--font-weight-medium);
|
|
152
212
|
color: var(--text-color-secondary);
|
|
153
213
|
font-size: var(--font-size-sm);
|
|
154
|
-
`,
|
|
214
|
+
`,I=r.span`
|
|
215
|
+
margin-left: var(--spacing-xxs);
|
|
216
|
+
color: var(--schema-required-color);
|
|
217
|
+
`;function yr({children:e}){return t(B,{children:[e,o(I,{"aria-hidden":"true",children:"*"})]})}const p=`
|
|
155
218
|
width: 100%;
|
|
156
219
|
box-sizing: border-box;
|
|
157
220
|
padding: 5px var(--spacing-sm);
|
|
@@ -174,26 +237,24 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
174
237
|
&::placeholder {
|
|
175
238
|
color: var(--text-color-disabled);
|
|
176
239
|
}
|
|
177
|
-
`,
|
|
178
|
-
${
|
|
179
|
-
`,
|
|
180
|
-
${
|
|
240
|
+
`,wr=r.input`
|
|
241
|
+
${p}
|
|
242
|
+
`,kr=r.textarea`
|
|
243
|
+
${p}
|
|
181
244
|
min-height: 72px;
|
|
182
245
|
resize: vertical;
|
|
183
|
-
`,
|
|
184
|
-
${c}
|
|
185
|
-
`,dr=e.div`
|
|
246
|
+
`,zr=r.div`
|
|
186
247
|
display: flex;
|
|
187
248
|
flex-direction: column;
|
|
188
249
|
gap: var(--spacing-xs);
|
|
189
|
-
`,
|
|
250
|
+
`,Tr=r.label`
|
|
190
251
|
display: flex;
|
|
191
252
|
align-items: flex-start;
|
|
192
253
|
gap: var(--spacing-sm);
|
|
193
254
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
194
|
-
border: 1px solid ${({$checked:
|
|
255
|
+
border: 1px solid ${({$checked:e})=>e?"var(--input-border-color-hover)":"var(--border-color-secondary)"};
|
|
195
256
|
border-radius: var(--border-radius-lg);
|
|
196
|
-
background: ${({$checked:
|
|
257
|
+
background: ${({$checked:e})=>e?"var(--layer-color)":"transparent"};
|
|
197
258
|
cursor: pointer;
|
|
198
259
|
|
|
199
260
|
input {
|
|
@@ -205,12 +266,12 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
205
266
|
border-color: var(--input-border-color-hover);
|
|
206
267
|
background: var(--layer-color);
|
|
207
268
|
}
|
|
208
|
-
`,
|
|
269
|
+
`,Lr=r.span`
|
|
209
270
|
display: flex;
|
|
210
271
|
align-items: center;
|
|
211
272
|
gap: var(--spacing-xs);
|
|
212
273
|
font-weight: var(--font-weight-medium);
|
|
213
|
-
`,
|
|
274
|
+
`,C=r.div`
|
|
214
275
|
position: fixed;
|
|
215
276
|
inset: 0;
|
|
216
277
|
background: var(--bg-color-modal-overlay);
|
|
@@ -219,9 +280,9 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
219
280
|
align-items: center;
|
|
220
281
|
justify-content: center;
|
|
221
282
|
padding: var(--spacing-base);
|
|
222
|
-
`,
|
|
283
|
+
`,H=r.div`
|
|
223
284
|
width: 100%;
|
|
224
|
-
max-width: ${({$wide:
|
|
285
|
+
max-width: ${({$wide:e})=>e?"640px":"480px"};
|
|
225
286
|
max-height: calc(100vh - 64px);
|
|
226
287
|
display: flex;
|
|
227
288
|
flex-direction: column;
|
|
@@ -231,40 +292,32 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
231
292
|
box-shadow: var(--modal-box-shadow);
|
|
232
293
|
overflow: hidden;
|
|
233
294
|
font-family: var(--font-family-base);
|
|
234
|
-
`,
|
|
295
|
+
`,M=r.div`
|
|
235
296
|
display: flex;
|
|
236
297
|
align-items: center;
|
|
237
298
|
justify-content: space-between;
|
|
238
299
|
gap: var(--spacing-sm);
|
|
239
300
|
padding: var(--spacing-md) var(--spacing-lg) var(--spacing-sm);
|
|
240
|
-
`,
|
|
301
|
+
`,N=r.h2`
|
|
241
302
|
margin: 0;
|
|
242
303
|
font-size: var(--font-size-lg);
|
|
243
304
|
line-height: var(--line-height-lg);
|
|
244
305
|
font-weight: var(--font-weight-semibold);
|
|
245
|
-
`,
|
|
306
|
+
`,O=r.div`
|
|
246
307
|
display: flex;
|
|
247
308
|
flex-direction: column;
|
|
248
309
|
gap: var(--spacing-base);
|
|
249
310
|
padding: 0 var(--spacing-lg) var(--spacing-md);
|
|
250
311
|
overflow-y: auto;
|
|
251
|
-
`,
|
|
312
|
+
`,_=r.div`
|
|
252
313
|
display: flex;
|
|
253
314
|
justify-content: flex-end;
|
|
254
315
|
gap: var(--spacing-xs);
|
|
255
316
|
padding: var(--spacing-base) var(--spacing-lg);
|
|
256
317
|
border-top: 1px solid var(--border-color-secondary);
|
|
257
|
-
`;function
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
padding: var(--spacing-sm) var(--spacing-base);
|
|
261
|
-
border-radius: var(--border-radius-lg);
|
|
262
|
-
border: 1px solid
|
|
263
|
-
${({$tone:r})=>r==="danger"?"var(--color-error-border)":r==="warning"?"var(--color-warning-border)":r==="success"?"var(--color-success-border)":"var(--color-info-border)"};
|
|
264
|
-
background: ${({$tone:r})=>r==="danger"?"var(--color-error-bg)":r==="warning"?"var(--color-warning-bg)":r==="success"?"var(--color-success-bg)":"var(--color-info-bg)"};
|
|
265
|
-
color: var(--text-color-primary);
|
|
266
|
-
font-size: var(--font-size-base);
|
|
267
|
-
`;function gr({tone:r="info",children:i}){const a=r==="danger"?"circle-xmark":r==="warning"?"triangle-exclamation":r==="success"?"circle-check":"circle-info";return t(C,{$tone:r,role:r==="danger"?"alert":"status","data-testid":`apigee-notice-${r}`,children:[o(s,{name:a,size:"18px",style:{flexShrink:0,marginTop:2}}),o("div",{children:i})]})}const H={approved:"green",pending:"orange",revoked:"red"},N={approved:"Approved",pending:"Pending approval",revoked:"Revoked"};function vr({status:r,label:i}){return o(g,{color:H[r],children:i??N[r]})}const xr=e.dl`
|
|
318
|
+
`;function Sr({title:e,open:a,onClose:i,children:n,footer:d,wide:g,testId:v}){return m(()=>{if(!a)return;const s=x=>{x.key==="Escape"&&i()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a,i]),a?o(k,{children:o(C,{onMouseDown:s=>s.target===s.currentTarget&&i(),children:t(H,{role:"dialog","aria-modal":"true",$wide:g,"data-testid":v,children:[t(M,{children:[o(N,{children:e}),o(f,{variant:"text",size:"small",onClick:i,"aria-label":"Close",icon:o(l,{name:"xmark",size:"16px"})})]}),o(O,{children:n}),d?o(_,{children:d}):null]})})}):null}const q=r.div`
|
|
319
|
+
--admonition-margin: 0;
|
|
320
|
+
`;function jr({tone:e="info",children:a}){return o(q,{role:e==="danger"?"alert":"status","data-testid":`apigee-notice-${e}`,children:o(h,{type:e,children:a})})}const F={approved:"green",pending:"orange",revoked:"red"},U={approved:"Approved",pending:"Pending approval",revoked:"Revoked"};function Dr({status:e,label:a}){return o(z,{color:F[e],children:a??U[e]})}const Er=r.dl`
|
|
268
321
|
display: grid;
|
|
269
322
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
270
323
|
gap: var(--spacing-base);
|
|
@@ -297,12 +350,12 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
297
350
|
flex-wrap: wrap;
|
|
298
351
|
overflow-wrap: anywhere;
|
|
299
352
|
}
|
|
300
|
-
`,
|
|
353
|
+
`,Rr=r.div`
|
|
301
354
|
display: flex;
|
|
302
355
|
gap: var(--spacing-base);
|
|
303
356
|
flex-wrap: wrap;
|
|
304
357
|
margin-bottom: var(--spacing-lg);
|
|
305
|
-
|
|
358
|
+
`,$r=r.div`
|
|
306
359
|
flex: 1 1 160px;
|
|
307
360
|
padding: var(--spacing-base) var(--spacing-md);
|
|
308
361
|
border: 1px solid var(--border-color-secondary);
|
|
@@ -315,20 +368,11 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
315
368
|
line-height: var(--line-height-xl);
|
|
316
369
|
font-weight: var(--font-weight-semibold);
|
|
317
370
|
}
|
|
318
|
-
`,
|
|
371
|
+
`,K=r.div`
|
|
372
|
+
display: flex;
|
|
373
|
+
justify-content: center;
|
|
319
374
|
padding: var(--spacing-xl);
|
|
320
|
-
|
|
321
|
-
color: var(--text-color-description);
|
|
322
|
-
`,hr=e.div`
|
|
323
|
-
display: grid;
|
|
324
|
-
grid-template-columns: 280px minmax(0, 1fr);
|
|
325
|
-
gap: var(--spacing-xl);
|
|
326
|
-
align-items: start;
|
|
327
|
-
|
|
328
|
-
@media (max-width: 960px) {
|
|
329
|
-
grid-template-columns: 1fr;
|
|
330
|
-
}
|
|
331
|
-
`,ur=e.div`
|
|
375
|
+
`;function Pr({label:e}){return o(K,{role:"status","aria-label":e,children:o(y,{color:"var(--text-color-description)",size:"24px"})})}const Wr=r.div`
|
|
332
376
|
display: flex;
|
|
333
377
|
align-items: center;
|
|
334
378
|
justify-content: space-between;
|
|
@@ -336,37 +380,41 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
336
380
|
font-size: var(--font-size-sm);
|
|
337
381
|
font-weight: var(--font-weight-medium);
|
|
338
382
|
color: var(--text-color-secondary);
|
|
339
|
-
`,
|
|
383
|
+
`,Ar=r(b)`
|
|
384
|
+
margin-bottom: var(--spacing-sm);
|
|
385
|
+
`,Br=r.div`
|
|
386
|
+
border: 1px solid var(--border-color-secondary);
|
|
387
|
+
border-radius: var(--border-radius-xl);
|
|
388
|
+
overflow: hidden;
|
|
389
|
+
`,G=r(u)`
|
|
340
390
|
display: flex;
|
|
341
391
|
align-items: center;
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
border-radius: var(--border-radius-lg);
|
|
392
|
+
gap: var(--spacing-sm);
|
|
393
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
394
|
+
border-bottom: 1px solid var(--border-color-secondary);
|
|
346
395
|
color: var(--text-color-primary);
|
|
347
396
|
text-decoration: none;
|
|
348
|
-
|
|
349
|
-
|
|
397
|
+
|
|
398
|
+
&:last-child {
|
|
399
|
+
border-bottom: none;
|
|
400
|
+
}
|
|
350
401
|
|
|
351
402
|
&:hover {
|
|
352
403
|
background: var(--layer-color-hover);
|
|
404
|
+
color: var(--text-color-primary);
|
|
353
405
|
text-decoration: none;
|
|
354
406
|
}
|
|
355
|
-
`,
|
|
356
|
-
width: 8px;
|
|
357
|
-
height: 8px;
|
|
358
|
-
border-radius: 50%;
|
|
359
|
-
flex-shrink: 0;
|
|
360
|
-
background: ${({$color:r})=>r==="green"?"var(--color-success-base)":r==="orange"?"var(--color-warning-base)":r==="red"?"var(--color-error-base)":"var(--text-color-disabled)"};
|
|
361
|
-
`,zr=e.nav`
|
|
407
|
+
`,J=r.span`
|
|
362
408
|
display: flex;
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
font-size: var(--font-size-sm);
|
|
367
|
-
color: var(--text-color-description);
|
|
409
|
+
flex-direction: column;
|
|
410
|
+
flex: 1;
|
|
411
|
+
min-width: 0;
|
|
368
412
|
|
|
369
|
-
|
|
370
|
-
|
|
413
|
+
> * {
|
|
414
|
+
overflow: hidden;
|
|
415
|
+
text-overflow: ellipsis;
|
|
416
|
+
white-space: nowrap;
|
|
371
417
|
}
|
|
372
|
-
|
|
418
|
+
`,Q=r.span`
|
|
419
|
+
font-weight: var(--font-weight-medium);
|
|
420
|
+
`;function Ir({to:e,title:a,subtitle:i,tag:n,testId:d}){return t(G,{to:e,"data-testid":d,children:[t(J,{children:[o(Q,{children:a}),i?o(c,{children:i}):null]}),n,o(l,{name:"chevron-right",size:"14px"})]})}export{Tr as CheckItem,Lr as CheckItemTitle,zr as CheckList,Sr as Dialog,fr as EmptyState,ur as Field,B as FieldLabel,wr as Input,Br as LinkList,Ir as LinkRow,Wr as ListTitle,Pr as Loading,hr as Mono,c as Muted,jr as Notice,Er as Overview,lr as Page,Ar as PageBreadcrumbs,cr as PageHeader,yr as RequiredLabel,br as Row,pr as Section,gr as SectionHeader,E as SectionTitle,$r as Stat,Rr as Stats,Dr as StatusTag,mr as Table,xr as TableWrap,vr as Tabs,kr as Textarea};
|