@arcgis/coding-components
Version:
Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.
37 lines (33 loc) • 2.17 kB
TypeScript
/// <reference types="../index.d.ts" />
import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor";
import type { ArcgisCodeEditor } from "../components/arcgis-code-editor";
import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor";
import { JSX as PreactJsx } from "preact";
import type { EventHandler } from "@arcgis/lumina";
interface PreactArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'customPanels' | 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, PreactJsx.HTMLAttributes<HTMLArcgisArcadeEditorElement> {
onarcgisDiagnosticsChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisDiagnosticsChange"]>;
onarcgisScriptChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisScriptChange"]>;
}
interface PreactArcgisCodeEditor extends Partial<Pick<ArcgisCodeEditor, 'editorOptions' | 'language' | 'modelId' | 'value'>>, PreactJsx.HTMLAttributes<HTMLArcgisCodeEditorElement> {
onarcgisSelectionChange?: EventHandler<HTMLArcgisCodeEditorElement["arcgisSelectionChange"]>;
onarcgisValueChange?: EventHandler<HTMLArcgisCodeEditorElement["arcgisValueChange"]>;
}
interface PreactArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpressionEditor, 'hideSideBar' | 'profile' | 'script'>>, PreactJsx.HTMLAttributes<HTMLArcgisSqlExpressionEditorElement> {
onarcgisScriptChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisScriptChange"]>;
}
declare module 'preact' {
namespace createElement.JSX {
interface IntrinsicElements extends PreactJsx.IntrinsicElements {
"arcgis-arcade-editor": PreactArcgisArcadeEditor;
"arcgis-code-editor": PreactArcgisCodeEditor;
"arcgis-sql-expression-editor": PreactArcgisSqlExpressionEditor;
}
}
namespace h.JSX {
interface IntrinsicElements extends PreactJsx.IntrinsicElements {
"arcgis-arcade-editor": PreactArcgisArcadeEditor;
"arcgis-code-editor": PreactArcgisCodeEditor;
"arcgis-sql-expression-editor": PreactArcgisSqlExpressionEditor;
}
}
}