/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import React from 'react'; import type { AvailableAction, CollectionFieldRecord, RoleResourceAction } from './types'; type TFunction = (key: string, options?: Record) => string; export declare function normalizeActions(value?: RoleResourceAction[]): Record; export declare function applyActionScope(actionMap: Record, actionName: string, scope: unknown, collectionFields: CollectionFieldRecord[]): { [x: string]: RoleResourceAction | { scope: unknown; name: string; fields?: string[]; scopeId?: string | number; } | { scope: unknown; name: string; fields: string[]; }; }; export interface StrategyActionsEditorProps { value?: string[]; onChange?: (value: string[]) => void; availableActions: AvailableAction[]; t: TFunction; } export declare function StrategyActionsEditor(props: StrategyActionsEditorProps): React.JSX.Element; export interface RoleResourceActionsEditorProps { value?: RoleResourceAction[]; onChange?: (value: RoleResourceAction[]) => void; availableActions: AvailableAction[]; collectionFields: CollectionFieldRecord[]; renderScopeSelect: (props: { value: unknown; onChange: (value: unknown) => void; action: AvailableAction; }) => React.ReactNode; t: TFunction; } export declare function RoleResourceActionsEditor(props: RoleResourceActionsEditorProps): React.JSX.Element; export {};