@platform-mesh/portal-ui-lib 0.72.1 → 0.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/platform-mesh-portal-ui-wc.js +787 -776
- package/fesm2022/platform-mesh-portal-ui-lib-models.mjs +8 -14
- package/fesm2022/platform-mesh-portal-ui-lib-models.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib-portal-options.mjs +1945 -1444
- package/fesm2022/platform-mesh-portal-ui-lib-portal-options.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib-services.mjs +986 -960
- package/fesm2022/platform-mesh-portal-ui-lib-services.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib-utils.mjs +180 -264
- package/fesm2022/platform-mesh-portal-ui-lib-utils.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib.mjs +2 -9
- package/fesm2022/platform-mesh-portal-ui-lib.mjs.map +1 -1
- package/package.json +6 -5
- package/types/platform-mesh-portal-ui-lib-models.d.ts +177 -187
- package/types/platform-mesh-portal-ui-lib-portal-options.d.ts +117 -128
- package/types/platform-mesh-portal-ui-lib-services.d.ts +239 -253
- package/types/platform-mesh-portal-ui-lib-utils.d.ts +38 -51
- package/types/platform-mesh-portal-ui-lib.d.ts +1 -3
|
@@ -1,47 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
clientId: string;
|
|
27
|
-
/** Secret of a client that is not public; absent for a public client. */
|
|
28
|
-
clientSecret?: string | null;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
/** Scopes to request besides openid; empty leaves the choice to the client. */
|
|
32
|
-
scopes?: string[] | null;
|
|
33
|
-
/** PEM bundle to verify the issuer with; empty for a publicly trusted certificate. */
|
|
34
|
-
ca?: string | null;
|
|
1
|
+
import { ButtonSettings, ButtonSettings as ButtonSettings$1, CssRule, FieldFilterDefinition, FormFieldDefinition, GenericResource, GenericResource as GenericResource$2, ModalSettings, PropertyField, ResourceFieldButtonClickEvent, TableFieldDefinition, TransformType, UiSettings } from "@openmfp/ngx";
|
|
2
|
+
import { Condition, ObjectMeta } from "kubernetes-types/meta/v1";
|
|
3
|
+
export declare const ALL_NAMESPACE = "-all-";
|
|
4
|
+
export declare const kcpRootOrgsPath = "root:orgs";
|
|
5
|
+
export interface AccountInfo {
|
|
6
|
+
metadata: ObjectMeta;
|
|
7
|
+
spec: {
|
|
8
|
+
account: {
|
|
9
|
+
originClusterId: string;
|
|
10
|
+
};
|
|
11
|
+
clusterInfo: {
|
|
12
|
+
ca: string;
|
|
13
|
+
};
|
|
14
|
+
organization: {
|
|
15
|
+
originClusterId: string;
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
/** Absent until an identity provider is set up for the organization. */
|
|
19
|
+
oidc?: {
|
|
20
|
+
issuerUrl: string;
|
|
21
|
+
clients: {
|
|
22
|
+
kubectl?: {
|
|
23
|
+
clientId: string;
|
|
24
|
+
/** Secret of a client that is not public; absent for a public client. */
|
|
25
|
+
clientSecret?: string | null;
|
|
35
26
|
};
|
|
27
|
+
};
|
|
28
|
+
/** Scopes to request besides openid; empty leaves the choice to the client. */
|
|
29
|
+
scopes?: string[] | null;
|
|
30
|
+
/** PEM bundle to verify the issuer with; empty for a publicly trusted certificate. */
|
|
31
|
+
ca?: string | null;
|
|
36
32
|
};
|
|
33
|
+
};
|
|
37
34
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
35
|
+
export interface LogicalCluster {
|
|
36
|
+
status: {
|
|
37
|
+
phase: string;
|
|
38
|
+
};
|
|
43
39
|
}
|
|
44
|
-
|
|
45
40
|
/**
|
|
46
41
|
* Action performed inside a modal, reported back on close.
|
|
47
42
|
*
|
|
@@ -49,14 +44,14 @@ interface LogicalCluster {
|
|
|
49
44
|
* `'delete'`). Consumers pass the action through `goBackContext` so the host
|
|
50
45
|
* (e.g. a table) can react accordingly.
|
|
51
46
|
*/
|
|
52
|
-
type ModalResultAction = 'create' | 'navigate' | 'loadTableData';
|
|
47
|
+
export type ModalResultAction = 'create' | 'navigate' | 'loadTableData';
|
|
53
48
|
/**
|
|
54
49
|
* How the modal was closed.
|
|
55
50
|
*
|
|
56
51
|
* - `'submit'` — the user completed the modal; `action`/`resource` are honored.
|
|
57
52
|
* - `'cancelled'` — the modal was dismissed; the host performs no action.
|
|
58
53
|
*/
|
|
59
|
-
type ModalResultStatus = 'submit' | 'cancelled';
|
|
54
|
+
export type ModalResultStatus = 'submit' | 'cancelled';
|
|
60
55
|
/**
|
|
61
56
|
* Context passed to `LuigiClient.linkManager().goBack(context)` when a modal
|
|
62
57
|
* opened via `openAsModal` (button action `'openInModal'`) is closed. The
|
|
@@ -75,13 +70,13 @@ type ModalResultStatus = 'submit' | 'cancelled';
|
|
|
75
70
|
*
|
|
76
71
|
* @typeParam T - Type of the affected resource.
|
|
77
72
|
*/
|
|
78
|
-
interface ModalResultContext<T = unknown> {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
73
|
+
export interface ModalResultContext<T = unknown> {
|
|
74
|
+
/** How the modal was closed. Treated as `'cancelled'` when omitted. */
|
|
75
|
+
status?: ModalResultStatus;
|
|
76
|
+
/** Action performed inside the modal (applied only when `status` is `'submit'`). */
|
|
77
|
+
action?: ModalResultAction;
|
|
78
|
+
/** Resource affected by the action (e.g. the created resource). May be undefined. */
|
|
79
|
+
resource?: T;
|
|
85
80
|
}
|
|
86
81
|
/**
|
|
87
82
|
* Value the `openAsModal` promise resolves with. Luigi wraps the
|
|
@@ -93,147 +88,142 @@ interface ModalResultContext<T = unknown> {
|
|
|
93
88
|
*
|
|
94
89
|
* @typeParam T - Type of the affected resource.
|
|
95
90
|
*/
|
|
96
|
-
interface ModalResult<T = unknown> {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
key: string;
|
|
118
|
-
};
|
|
91
|
+
export interface ModalResult<T = unknown> {
|
|
92
|
+
/** The `goBackContext` provided when closing the modal. */
|
|
93
|
+
data?: ModalResultContext<T>;
|
|
94
|
+
}
|
|
95
|
+
export interface Permission {
|
|
96
|
+
actions: string[];
|
|
97
|
+
resource: string;
|
|
98
|
+
}
|
|
99
|
+
export interface InstancePermission extends Permission {
|
|
100
|
+
namespace?: string;
|
|
101
|
+
name?: string;
|
|
102
|
+
}
|
|
103
|
+
export type PlatformMeshFieldDefinition = TableFieldDefinition & Omit<FormFieldDefinition, 'name' | 'label'> & {
|
|
104
|
+
label?: string;
|
|
105
|
+
dynamicValuesDefinition?: {
|
|
106
|
+
operation: string;
|
|
107
|
+
gqlQuery: string;
|
|
108
|
+
gqlQueryVariables?: Record<string, string>;
|
|
109
|
+
value: string;
|
|
110
|
+
key: string;
|
|
111
|
+
};
|
|
119
112
|
};
|
|
120
|
-
declare const DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION = "download-kubeconfig-from-secret-ref";
|
|
113
|
+
export declare const DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION = "download-kubeconfig-from-secret-ref";
|
|
121
114
|
/**
|
|
122
115
|
* `ButtonSettings` plus the extra data the kubeconfig download needs. Used
|
|
123
116
|
* inside `UiView.actions[].uiSettings.buttonSettings`.
|
|
124
117
|
*/
|
|
125
|
-
interface DownloadKubeconfigFromSecretRefButtonSettings extends ButtonSettings {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
interface UiView {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
interface UIDefinition {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
interface ListView extends UiView {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
interface DetailView extends UiView {
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
readonly DELETED: "DELETED";
|
|
118
|
+
export interface DownloadKubeconfigFromSecretRefButtonSettings extends ButtonSettings$1 {
|
|
119
|
+
action: typeof DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION;
|
|
120
|
+
/** Resource property holding the referenced Secret name. */
|
|
121
|
+
resourceProperty: string;
|
|
122
|
+
/** Secret `data` key to download; defaults to `kubeconfig`. */
|
|
123
|
+
dataKey?: string;
|
|
124
|
+
/** Download filename; defaults to `kubeconfig.yaml`. */
|
|
125
|
+
filename?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Resource property holding the Secret namespace; falls back to the
|
|
128
|
+
* resource's own namespace, then the node context namespace.
|
|
129
|
+
*/
|
|
130
|
+
namespaceProperty?: string;
|
|
131
|
+
}
|
|
132
|
+
export interface UiView {
|
|
133
|
+
actions?: PlatformMeshFieldDefinition[];
|
|
134
|
+
fields?: PlatformMeshFieldDefinition[];
|
|
135
|
+
resourceDescription?: PlatformMeshFieldDefinition;
|
|
136
|
+
resourceTitle?: PlatformMeshFieldDefinition;
|
|
137
|
+
backgroundImageUrl?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface UIDefinition {
|
|
140
|
+
logoUrl?: string;
|
|
141
|
+
listView?: ListView;
|
|
142
|
+
createView?: UiView;
|
|
143
|
+
detailView?: DetailView;
|
|
144
|
+
}
|
|
145
|
+
export interface ListView extends UiView {
|
|
146
|
+
/** Horizontal overflow behavior for list and search tables. Defaults to Scroll. */
|
|
147
|
+
overflowMode?: 'Scroll' | 'Popin';
|
|
148
|
+
filters?: FieldFilterDefinition[];
|
|
149
|
+
baselineFilters?: FieldFilterDefinition[];
|
|
150
|
+
/**
|
|
151
|
+
* Absolute path a row click navigates to, with `{resource.<dot.path>}` and
|
|
152
|
+
* `{context.<dot.path>}` placeholders resolved against the clicked row and the
|
|
153
|
+
* current Luigi context respectively — e.g.
|
|
154
|
+
* `"/workspaces/{context.org}/components/{resource.metadata.name}"`.
|
|
155
|
+
* When set, overrides the default relative navigation to the row's detail
|
|
156
|
+
* view, so a flat list can link into an entity-scoped path.
|
|
157
|
+
*/
|
|
158
|
+
resourceURL?: string;
|
|
159
|
+
}
|
|
160
|
+
export interface DetailView extends UiView {
|
|
161
|
+
showDownloadKubeconfig?: boolean;
|
|
162
|
+
}
|
|
163
|
+
export interface ResourceStatus {
|
|
164
|
+
conditions: Condition[];
|
|
165
|
+
}
|
|
166
|
+
export interface ResourceSpec extends Record<string, any> {
|
|
167
|
+
type: string;
|
|
168
|
+
description?: string;
|
|
169
|
+
displayName?: string;
|
|
170
|
+
}
|
|
171
|
+
export interface ResourceMeta extends ObjectMeta {
|
|
172
|
+
name: string;
|
|
173
|
+
}
|
|
174
|
+
export interface Resource extends GenericResource$2 {
|
|
175
|
+
metadata: ResourceMeta;
|
|
176
|
+
spec?: ResourceSpec;
|
|
177
|
+
status?: ResourceStatus;
|
|
178
|
+
__typename?: string;
|
|
179
|
+
data?: Record<string, any>;
|
|
180
|
+
ready?: boolean;
|
|
181
|
+
isAvailable?: boolean;
|
|
182
|
+
accessibleName?: string;
|
|
183
|
+
}
|
|
184
|
+
export interface PermissionsDefinition {
|
|
185
|
+
group: string;
|
|
186
|
+
resource: string;
|
|
187
|
+
entityActions: string[];
|
|
188
|
+
resourceActions: string[];
|
|
189
|
+
entityContextKey: string;
|
|
190
|
+
}
|
|
191
|
+
export interface ResourceDefinition {
|
|
192
|
+
apiGroup?: string;
|
|
193
|
+
version: string;
|
|
194
|
+
entityCollection: string;
|
|
195
|
+
entity: string;
|
|
196
|
+
name?: string;
|
|
197
|
+
scope?: KubernetesScope;
|
|
198
|
+
namespace?: string;
|
|
199
|
+
readyCondition?: PlatformMeshFieldDefinition;
|
|
200
|
+
/**
|
|
201
|
+
* Keep resources usable while their ready condition is false. Resources that
|
|
202
|
+
* are pending deletion remain unavailable.
|
|
203
|
+
*/
|
|
204
|
+
availableWhenNotReady?: boolean;
|
|
205
|
+
ui?: UIDefinition;
|
|
206
|
+
permissionsDefinition?: PermissionsDefinition;
|
|
207
|
+
}
|
|
208
|
+
export declare const ResourceOperationTypeMap: {
|
|
209
|
+
readonly ADDED: "ADDED";
|
|
210
|
+
readonly MODIFIED: "MODIFIED";
|
|
211
|
+
readonly DELETED: "DELETED";
|
|
220
212
|
};
|
|
221
|
-
type ResourceOperationType = (typeof ResourceOperationTypeMap)[keyof typeof ResourceOperationTypeMap];
|
|
222
|
-
interface ResourceSubscriptionResult {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
226
|
-
interface ResourcePagination {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
interface ResourceListResult {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
type KubernetesScope = 'Cluster' | 'Namespaced';
|
|
237
|
-
|
|
238
|
-
export { ALL_NAMESPACE, DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION, ResourceOperationTypeMap, kcpRootOrgsPath };
|
|
239
|
-
export type { AccountInfo, DetailView, DownloadKubeconfigFromSecretRefButtonSettings, InstancePermission, KubernetesScope, ListView, LogicalCluster, ModalResult, ModalResultAction, ModalResultContext, ModalResultStatus, Permission, PermissionsDefinition, PlatformMeshFieldDefinition, Resource, ResourceDefinition, ResourceListResult, ResourceMeta, ResourceOperationType, ResourcePagination, ResourceSpec, ResourceStatus, ResourceSubscriptionResult, UIDefinition, UiView };
|
|
213
|
+
export type ResourceOperationType = (typeof ResourceOperationTypeMap)[keyof typeof ResourceOperationTypeMap];
|
|
214
|
+
export interface ResourceSubscriptionResult {
|
|
215
|
+
type: ResourceOperationType;
|
|
216
|
+
object: Resource;
|
|
217
|
+
}
|
|
218
|
+
export interface ResourcePagination {
|
|
219
|
+
limit: number | undefined;
|
|
220
|
+
continue: string | undefined;
|
|
221
|
+
}
|
|
222
|
+
export interface ResourceListResult {
|
|
223
|
+
resourceVersion: string;
|
|
224
|
+
items: Resource[];
|
|
225
|
+
continue: string | undefined;
|
|
226
|
+
remainingItemCount?: number;
|
|
227
|
+
}
|
|
228
|
+
export type KubernetesScope = 'Cluster' | 'Namespaced';
|
|
229
|
+
export { type ButtonSettings, type CssRule, GenericResource, type ModalSettings, type PropertyField, type ResourceFieldButtonClickEvent, type TransformType, type UiSettings };
|