UNPKG

@progress/kendo-vue-buttons

Version:
59 lines (58 loc) 1.77 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { ButtonProps } from '../../Button'; import { SmartPasteFormField } from './SmartPasteFormField'; /** * Represents the request data passed in the SmartPasteClickEvent. */ export interface SmartPasteRequestData { /** * The clipboard content. */ content: string; /** * The extracted form fields configuration. */ formFields: SmartPasteFormField[]; } /** * Represents the response object used to populate form fields. */ export interface SmartPasteResponse { /** * A record of field names to their values to populate. */ fieldValues: Record<string, any>; } /** * Represents the click event of the SmartPasteButton. */ export interface SmartPasteClickEvent { /** * The original DOM event. */ event: Event; /** * The request data containing clipboard content and form fields. */ requestData: SmartPasteRequestData; /** * A callback function to set the response with field values to populate. */ setResponse: (response: SmartPasteResponse) => void; } /** * Represents the props of the SmartPasteButton component. */ export interface SmartPasteButtonProps extends ButtonProps { /** * Configures the form fields for smart paste. * When provided, the extracted form configuration is merged with these custom fields. */ formFields?: SmartPasteFormField[]; }