@arcgis/coding-components
Version:
ArcGIS Coding Components
39 lines (36 loc) • 1.16 kB
TypeScript
import type { JsxNode } from "@arcgis/lumina";
import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor/customElement.js";
import type { Icon as Icon } from "@esri/calcite-components/components/calcite-icon";
/** @internal */
export type IBaseCustomPanel = {
/** Unique ID */
id: string;
name: string;
location: "sidebar";
renderer: ({ closePanel, insertText, closed, editorRef, }: {
closePanel: (e: Event) => void;
insertText: (text: string) => void;
closed: boolean;
editorRef: ArcgisArcadeEditor;
}) => JsxNode;
};
/** @internal */
export type ICustomSidePanel = IBaseCustomPanel
& {
/** Calcite icon */
icon: Icon["icon"];
/** Optional description */
description?: string;
/**
* Optional flag to indicate that the user is providing custom flow items
*
* @deprecated - this is not used in the codebase and will be removed in the future.
*/
useFlows?: boolean;
/** Optional flag to tell the editor if the panel is enabled, defaults to true */
enabled?: boolean;
/** location */
location: "sidebar";
};
/** @internal */
export type ICustomPanel = ICustomSidePanel;