@platform-mesh/portal-ui-lib 0.66.0 → 0.67.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-mesh-portal-ui-lib-models.mjs","sources":["../../projects/lib/models/constants/constants.ts","../../projects/lib/models/models/resource.ts","../../projects/lib/models/models/ui-definition.ts","../../projects/lib/models/platform-mesh-portal-ui-lib-models.ts"],"sourcesContent":["export const ALL_NAMESPACE = '-all-';\nexport const kcpRootOrgsPath = 'root:orgs';\n","import { PlatformMeshFieldDefinition, UIDefinition } from './ui-definition';\nimport { GenericResource } from '@openmfp/ngx';\nimport { Condition, ObjectMeta } from 'kubernetes-types/meta/v1';\n\nexport interface ResourceStatus {\n conditions: Condition[];\n}\n\nexport interface ResourceSpec extends Record<string, any> {\n type: string;\n description?: string;\n displayName?: string;\n}\n\nexport interface ResourceMeta extends ObjectMeta {\n name: string;\n}\n\nexport interface Resource extends GenericResource {\n metadata: ResourceMeta;\n spec?: ResourceSpec;\n status?: ResourceStatus;\n __typename?: string;\n data?: Record<string, any>;\n ready?: boolean;\n isAvailable?: boolean;\n accessibleName?: string;\n}\n\nexport interface PermissionsDefinition {\n group: string;\n resource: string;\n entityActions: string[];\n resourceActions: string[];\n entityContextKey: string;\n}\n\nexport interface ResourceDefinition {\n apiGroup?: string;\n version: string;\n entityCollection: string;\n entity: string;\n name?: string;\n scope?: KubernetesScope;\n namespace?: string;\n readyCondition?: PlatformMeshFieldDefinition;\n /**\n * Keep resources usable while their ready condition is false. Resources that\n * are pending deletion remain unavailable.\n */\n availableWhenNotReady?: boolean;\n ui?: UIDefinition;\n permissionsDefinition?: PermissionsDefinition;\n}\n\nexport const ResourceOperationTypeMap = {\n ADDED: 'ADDED',\n MODIFIED: 'MODIFIED',\n DELETED: 'DELETED',\n} as const;\n\nexport type ResourceOperationType =\n (typeof ResourceOperationTypeMap)[keyof typeof ResourceOperationTypeMap];\n\nexport interface ResourceSubscriptionResult {\n type: ResourceOperationType;\n object: Resource;\n}\n\nexport interface ResourcePagination {\n limit: number | undefined;\n continue: string | undefined;\n}\n\nexport interface ResourceListResult {\n resourceVersion: string;\n items: Resource[];\n continue: string | undefined;\n remainingItemCount?: number;\n}\n\nexport type KubernetesScope = 'Cluster' | 'Namespaced';\n","import {\n ButtonSettings,\n FieldFilterDefinition,\n FormFieldDefinition,\n TableFieldDefinition,\n} from '@openmfp/ngx';\n\nexport type {\n ButtonSettings,\n CssRule,\n GenericResource,\n ModalSettings,\n PropertyField,\n TransformType,\n UiSettings,\n ResourceFieldButtonClickEvent,\n} from '@openmfp/ngx';\n\nexport type PlatformMeshFieldDefinition = TableFieldDefinition &\n Omit<FormFieldDefinition, 'name' | 'label'> & {\n label?: string;\n dynamicValuesDefinition?: {\n operation: string;\n gqlQuery: string;\n gqlQueryVariables?: Record<string, string>;\n value: string;\n key: string;\n };\n };\n\nexport const DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION =\n 'download-kubeconfig-from-secret-ref';\n\n/**\n * `ButtonSettings` plus the extra data the kubeconfig download needs. Used\n * inside `UiView.actions[].uiSettings.buttonSettings`.\n */\nexport interface DownloadKubeconfigFromSecretRefButtonSettings extends ButtonSettings {\n action: typeof DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION;\n /** Resource property holding the referenced Secret name. */\n resourceProperty: string;\n /** Secret `data` key to download; defaults to `kubeconfig`. */\n dataKey?: string;\n /** Download filename; defaults to `kubeconfig.yaml`. */\n filename?: string;\n /**\n * Resource property holding the Secret namespace; falls back to the\n * resource's own namespace, then the node context namespace.\n */\n namespaceProperty?: string;\n}\n\nexport interface UiView {\n actions?: PlatformMeshFieldDefinition[];\n fields?: PlatformMeshFieldDefinition[];\n resourceDescription?: PlatformMeshFieldDefinition;\n resourceTitle?: PlatformMeshFieldDefinition;\n backgroundImageUrl?: string;\n}\n\nexport interface UIDefinition {\n logoUrl?: string;\n listView?: ListView;\n createView?: UiView;\n detailView?: DetailView;\n}\n\nexport interface ListView extends UiView {\n filters?: FieldFilterDefinition[];\n baselineFilters?: FieldFilterDefinition[];\n}\n\nexport interface DetailView extends UiView {\n showDownloadKubeconfig?: boolean;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,aAAa,GAAG;AACtB,MAAM,eAAe,GAAG;;ACsDxB,MAAM,wBAAwB,GAAG;AACtC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,OAAO,EAAE,SAAS;;;AC5Bb,MAAM,0CAA0C,GACrD;;AC/BF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"platform-mesh-portal-ui-lib-models.mjs","sources":["../../projects/lib/models/constants/constants.ts","../../projects/lib/models/models/resource.ts","../../projects/lib/models/models/ui-definition.ts","../../projects/lib/models/platform-mesh-portal-ui-lib-models.ts"],"sourcesContent":["export const ALL_NAMESPACE = '-all-';\nexport const kcpRootOrgsPath = 'root:orgs';\n","import { PlatformMeshFieldDefinition, UIDefinition } from './ui-definition';\nimport { GenericResource } from '@openmfp/ngx';\nimport { Condition, ObjectMeta } from 'kubernetes-types/meta/v1';\n\nexport interface ResourceStatus {\n conditions: Condition[];\n}\n\nexport interface ResourceSpec extends Record<string, any> {\n type: string;\n description?: string;\n displayName?: string;\n}\n\nexport interface ResourceMeta extends ObjectMeta {\n name: string;\n}\n\nexport interface Resource extends GenericResource {\n metadata: ResourceMeta;\n spec?: ResourceSpec;\n status?: ResourceStatus;\n __typename?: string;\n data?: Record<string, any>;\n ready?: boolean;\n isAvailable?: boolean;\n accessibleName?: string;\n}\n\nexport interface PermissionsDefinition {\n group: string;\n resource: string;\n entityActions: string[];\n resourceActions: string[];\n entityContextKey: string;\n}\n\nexport interface ResourceDefinition {\n apiGroup?: string;\n version: string;\n entityCollection: string;\n entity: string;\n name?: string;\n scope?: KubernetesScope;\n namespace?: string;\n readyCondition?: PlatformMeshFieldDefinition;\n /**\n * Keep resources usable while their ready condition is false. Resources that\n * are pending deletion remain unavailable.\n */\n availableWhenNotReady?: boolean;\n ui?: UIDefinition;\n permissionsDefinition?: PermissionsDefinition;\n}\n\nexport const ResourceOperationTypeMap = {\n ADDED: 'ADDED',\n MODIFIED: 'MODIFIED',\n DELETED: 'DELETED',\n} as const;\n\nexport type ResourceOperationType =\n (typeof ResourceOperationTypeMap)[keyof typeof ResourceOperationTypeMap];\n\nexport interface ResourceSubscriptionResult {\n type: ResourceOperationType;\n object: Resource;\n}\n\nexport interface ResourcePagination {\n limit: number | undefined;\n continue: string | undefined;\n}\n\nexport interface ResourceListResult {\n resourceVersion: string;\n items: Resource[];\n continue: string | undefined;\n remainingItemCount?: number;\n}\n\nexport type KubernetesScope = 'Cluster' | 'Namespaced';\n","import {\n ButtonSettings,\n FieldFilterDefinition,\n FormFieldDefinition,\n TableFieldDefinition,\n} from '@openmfp/ngx';\n\nexport type {\n ButtonSettings,\n CssRule,\n GenericResource,\n ModalSettings,\n PropertyField,\n TransformType,\n UiSettings,\n ResourceFieldButtonClickEvent,\n} from '@openmfp/ngx';\n\nexport type PlatformMeshFieldDefinition = TableFieldDefinition &\n Omit<FormFieldDefinition, 'name' | 'label'> & {\n label?: string;\n dynamicValuesDefinition?: {\n operation: string;\n gqlQuery: string;\n gqlQueryVariables?: Record<string, string>;\n value: string;\n key: string;\n };\n };\n\nexport const DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION =\n 'download-kubeconfig-from-secret-ref';\n\n/**\n * `ButtonSettings` plus the extra data the kubeconfig download needs. Used\n * inside `UiView.actions[].uiSettings.buttonSettings`.\n */\nexport interface DownloadKubeconfigFromSecretRefButtonSettings extends ButtonSettings {\n action: typeof DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION;\n /** Resource property holding the referenced Secret name. */\n resourceProperty: string;\n /** Secret `data` key to download; defaults to `kubeconfig`. */\n dataKey?: string;\n /** Download filename; defaults to `kubeconfig.yaml`. */\n filename?: string;\n /**\n * Resource property holding the Secret namespace; falls back to the\n * resource's own namespace, then the node context namespace.\n */\n namespaceProperty?: string;\n}\n\nexport interface UiView {\n actions?: PlatformMeshFieldDefinition[];\n fields?: PlatformMeshFieldDefinition[];\n resourceDescription?: PlatformMeshFieldDefinition;\n resourceTitle?: PlatformMeshFieldDefinition;\n backgroundImageUrl?: string;\n}\n\nexport interface UIDefinition {\n logoUrl?: string;\n listView?: ListView;\n createView?: UiView;\n detailView?: DetailView;\n}\n\nexport interface ListView extends UiView {\n filters?: FieldFilterDefinition[];\n baselineFilters?: FieldFilterDefinition[];\n /**\n * Absolute path a row click navigates to, with `{resource.<dot.path>}` and\n * `{context.<dot.path>}` placeholders resolved against the clicked row and the\n * current Luigi context respectively — e.g.\n * `\"/workspaces/{context.org}/components/{resource.metadata.name}\"`.\n * When set, overrides the default relative navigation to the row's detail\n * view, so a flat list can link into an entity-scoped path.\n */\n resourceURL?: string;\n}\n\nexport interface DetailView extends UiView {\n showDownloadKubeconfig?: boolean;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,aAAa,GAAG;AACtB,MAAM,eAAe,GAAG;;ACsDxB,MAAM,wBAAwB,GAAG;AACtC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,OAAO,EAAE,SAAS;;;AC5Bb,MAAM,0CAA0C,GACrD;;AC/BF;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -145,6 +145,15 @@ interface UIDefinition {
|
|
|
145
145
|
interface ListView extends UiView {
|
|
146
146
|
filters?: FieldFilterDefinition[];
|
|
147
147
|
baselineFilters?: FieldFilterDefinition[];
|
|
148
|
+
/**
|
|
149
|
+
* Absolute path a row click navigates to, with `{resource.<dot.path>}` and
|
|
150
|
+
* `{context.<dot.path>}` placeholders resolved against the clicked row and the
|
|
151
|
+
* current Luigi context respectively — e.g.
|
|
152
|
+
* `"/workspaces/{context.org}/components/{resource.metadata.name}"`.
|
|
153
|
+
* When set, overrides the default relative navigation to the row's detail
|
|
154
|
+
* view, so a flat list can link into an entity-scoped path.
|
|
155
|
+
*/
|
|
156
|
+
resourceURL?: string;
|
|
148
157
|
}
|
|
149
158
|
interface DetailView extends UiView {
|
|
150
159
|
showDownloadKubeconfig?: boolean;
|