@arcgis/coding-components
Version:
Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.
42 lines (41 loc) • 1.59 kB
TypeScript
import { ICustomPanel } from '../../utils/custom-panel';
interface ArcgisGlobal {
import: (module: string) => Promise<unknown>;
forceESM?: boolean;
}
declare global {
var $arcgis: ArcgisGlobal | undefined;
}
/**
* Preview version of the Arcade Assistant. The application using this addon must also import the arcade-coding-assistant
* component from the '@arcgis/coding-components' package.
*
* Please note that this is a preview version and thus availability, design, and functionality may change in the future.
* @param portalUrl The base URL of the organization.
* @param profileId The Arcade profile name.
* @param feedbackServiceUrl The feedback service url.
* @param appVersion The version of the application. e.g. "AGO_2025R2". This is used for feedback logging.
* @returns A promise that resolves to a custom panel object.
* @example
* ```tsx
* import { useArcadeAssistant } from "@arcgis/coding-components";
*
* const arcadeAssistantPanel = await useArcadeAssistant({
* portalUrl: "https://www.arcgis.com",
* profileId: "popup",
* feedbackServiceUrl: "someFeatureServiceUrl",
* });
*
* // Register the custom panel with the arcade editor
*
* const arcadeEditor = document.querySelector("arcgis-arcade-editor");
* arcadeEditor.customPanels = [customPanel];
*/
export declare function useArcadeAssistant({ portalUrl, profileId, feedbackServiceUrl, appVersion, panelName, }: {
portalUrl: string;
profileId: string;
feedbackServiceUrl: string;
appVersion: string;
panelName: string;
}): Promise<ICustomPanel>;
export {};