mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
feat: split row_actions into remove_action and overflow_actions for URL plugins
This commit is contained in:
@@ -159,7 +159,8 @@ export type Effects = {
|
||||
register(options: { tableAction: ActionId }): Promise<null>
|
||||
exportUrl(options: {
|
||||
hostnameInfo: PluginHostnameInfo
|
||||
rowActions: ActionId[]
|
||||
removeAction: ActionId | null
|
||||
overflowActions: ActionId[]
|
||||
}): Promise<null>
|
||||
clearUrls(options: { except: PluginHostnameInfo[] }): Promise<null>
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ export type HostnameMetadata =
|
||||
| {
|
||||
kind: 'plugin'
|
||||
packageId: PackageId
|
||||
rowActions: Array<ActionId>
|
||||
removeAction: ActionId | null
|
||||
overflowActions: Array<ActionId>
|
||||
info: unknown
|
||||
}
|
||||
|
||||
@@ -4,5 +4,6 @@ import type { PluginHostnameInfo } from './PluginHostnameInfo'
|
||||
|
||||
export type UrlPluginExportUrlParams = {
|
||||
hostnameInfo: PluginHostnameInfo
|
||||
rowActions: Array<ActionId>
|
||||
removeAction: ActionId | null
|
||||
overflowActions: Array<ActionId>
|
||||
}
|
||||
|
||||
@@ -765,7 +765,15 @@ export class StartSdk<Manifest extends T.SDKManifest> {
|
||||
effects: T.Effects,
|
||||
options: {
|
||||
hostnameInfo: T.PluginHostnameInfo
|
||||
rowActions: ActionInfo<
|
||||
removeAction: ActionInfo<
|
||||
T.ActionId,
|
||||
{
|
||||
urlPluginMetadata: T.PluginHostnameInfo & {
|
||||
interfaceId: T.ServiceInterfaceId
|
||||
}
|
||||
}
|
||||
> | null
|
||||
overflowActions: ActionInfo<
|
||||
T.ActionId,
|
||||
{
|
||||
urlPluginMetadata: T.PluginHostnameInfo & {
|
||||
@@ -777,7 +785,8 @@ export class StartSdk<Manifest extends T.SDKManifest> {
|
||||
) =>
|
||||
effects.plugin.url.exportUrl({
|
||||
hostnameInfo: options.hostnameInfo,
|
||||
rowActions: options.rowActions.map((a) => a.id),
|
||||
removeAction: options.removeAction?.id ?? null,
|
||||
overflowActions: options.overflowActions.map((a) => a.id),
|
||||
}),
|
||||
setupExportedUrls, // similar to setupInterfaces
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user