@arcgis/coding-components
Version:
Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.
183 lines (182 loc) • 6.25 kB
TypeScript
import { JsxNode } from '@arcgis/lumina';
import { temporaryStrings as TempStrings } from '../../addons/arcade-coding-assistant/temporary-strings';
import { Ref } from 'lit/directives/ref.js';
import { Context, FeedbackState } from './types';
declare const strings: (value: {
arcadeassistant: string;
beta: string;
expressionapplied: string;
askaquestion: string;
enteraprompt: string;
myprompt: string;
assistantresponse: string;
providefeedback: string;
experiencehelps: string;
submitfeedback: string;
suggestionsdisclaimer: string;
expandyourfeedback: string;
profilenotcompatible: string;
addtoeditor: string;
experiencehelpful: string;
describeexperience: string;
reviewcodedisclaimer: string;
besteffort: string;
askanotherquestion: string;
promptexample: string;
smartsuggestion: string;
legaldisclaimer: string;
ask: string;
askagain: string;
disclaimercomment: string;
feedback: string;
erroroccurred: string;
recentprompts: string;
generatingresponse: string;
promptlist: string;
historylist: string;
aigenerated: string;
seeterms: string;
copied: string;
introducing: string;
capabilities: string;
aiassistants: string;
useofassistant: string;
opensettings: string;
settings: string;
new: string;
learnmore: string;
}) => {
arcadeassistant: string;
beta: string;
expressionapplied: string;
askaquestion: string;
enteraprompt: string;
myprompt: string;
assistantresponse: string;
providefeedback: string;
experiencehelps: string;
submitfeedback: string;
suggestionsdisclaimer: string;
expandyourfeedback: string;
profilenotcompatible: string;
addtoeditor: string;
experiencehelpful: string;
describeexperience: string;
reviewcodedisclaimer: string;
besteffort: string;
askanotherquestion: string;
promptexample: string;
smartsuggestion: string;
legaldisclaimer: string;
ask: string;
askagain: string;
disclaimercomment: string;
feedback: string;
erroroccurred: string;
recentprompts: string;
generatingresponse: string;
promptlist: string;
historylist: string;
aigenerated: string;
seeterms: string;
copied: string;
introducing: string;
capabilities: string;
aiassistants: string;
useofassistant: string;
opensettings: string;
settings: string;
new: string;
learnmore: string;
};
export declare function AboutDisplay({ messages }: {
messages: Partial<ReturnType<typeof strings>>;
}): JsxNode;
export declare function DisclaimerDisplay({ popoverContent }: {
popoverContent: JsxNode;
}): JsxNode;
export declare function ErrorDisplay({ errorMessage, slot }: {
errorMessage: JsxNode | string;
slot?: string;
}): JsxNode;
export declare function ConfirmationDisplay({ active, setActive, messages, }: {
active: boolean;
setActive: (e: boolean) => void;
messages: Partial<ReturnType<typeof strings>>;
}): JsxNode;
export declare function ContextDisplay({ context, messages, }: {
context?: Context;
messages: Partial<ReturnType<typeof strings>> & typeof TempStrings;
}): JsxNode;
export declare function SubmissionDisplay({ isDisabled, isReadOnly, setQuestion, setIsViewingResult, textAreaRef, question, errorMessage, setErrorMessage, submitQuestion, messages, mode, context, }: {
isDisabled: boolean;
isReadOnly: boolean;
setQuestion: (e: string) => void;
setIsViewingResult: (e: boolean) => void;
textAreaRef: Ref<HTMLCalciteTextAreaElement>;
question: string;
errorMessage?: string;
setErrorMessage: (e: string) => void;
submitQuestion: () => Promise<void>;
messages: Partial<ReturnType<typeof strings>> & typeof TempStrings;
mode: "prompt" | "refine";
context?: Context;
}): JsxNode;
export declare function FeedbackSheetDisplay({ setOpen, messages, feedback, setFeedback, onSubmit, }: {
setOpen: (open: boolean) => void;
messages: Partial<ReturnType<typeof strings>> & typeof TempStrings;
feedback: FeedbackState;
setFeedback: (feedback: FeedbackState) => void;
onSubmit: () => void;
}): JsxNode;
export declare function InfoDisplay({ assistantsEnabled, messages, slot, assistantHelpUrl, helpTopicUrl, }: {
assistantsEnabled: boolean;
assistantHelpUrl: string;
helpTopicUrl: string;
messages: Partial<ReturnType<typeof strings>> & typeof TempStrings;
slot?: HTMLCalciteBlockElement["slot"];
}): JsxNode;
export declare function SplashDisplay({ messages, onProceed, onExit, helpTopicUrl, }: {
messages: Partial<ReturnType<typeof strings>> & typeof TempStrings;
onProceed: () => void;
onExit: (e: Event) => void;
helpTopicUrl: string;
}): JsxNode;
export declare function PromptSuggestionsDisplay({ messages, suggestions, onSuggestionClick, }: {
suggestions: string[];
onSuggestionClick: (value: string) => void;
messages: Partial<ReturnType<typeof strings>> & typeof TempStrings;
}): JsxNode;
export interface ResponseDisplayCardChip {
label: string;
icon?: string;
tooltip?: string;
scale?: "l" | "m" | "s";
appearance?: "outline-fill" | "outline" | "solid";
/** need a unique id for each convo for tooltip reference-ids */
conversationId: string;
}
export interface ResponseDisplayCard {
priorPrompt: string;
code: string;
message?: string;
chips?: ResponseDisplayCardChip[];
onAddToEditor: (insertMode: "add" | "replace") => void;
onThumbsUp: () => void;
onThumbsDown: () => void;
conversationId: string;
}
export declare function ResponseDisplay({ hidden, expanded, messages, cards, heading, collapsible, showEffectsIcon, onCopyCode, standalone, }: {
hidden?: boolean;
expanded?: boolean;
heading?: string;
messages: Partial<ReturnType<typeof strings>> & typeof TempStrings;
cards: ResponseDisplayCard[];
showEffectsIcon?: boolean;
collapsible?: boolean;
editorInsertMode?: "add" | "replace";
setEditorInsertMode?: (mode: "add" | "replace") => void;
onCopyCode: (code: string) => Promise<void>;
standalone?: boolean;
}): JsxNode;
export {};