UNPKG

@arcgis/coding-components

Version:
58 lines (51 loc) 3.55 kB
/// <reference types="../index.d.ts" /> import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor/customElement.js"; import type { ArcgisCodeEditor } from "../components/arcgis-code-editor/customElement.js"; import type { CodeEditorShell } from "../components/arcgis-code-editor-shell/customElement.js"; import type { ArcgisCodeViewer } from "../components/arcgis-code-viewer/customElement.js"; import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor/customElement.js"; import type { ArcgisSqlLayerEditor } from "../components/arcgis-sql-layer-editor/customElement.js"; import { HTMLAttributes } from "preact"; import type { EventHandler } from "@arcgis/lumina"; interface PreactArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, "arcadeAssistant" | "customPanels" | "disableAssistant" | "editorOptions" | "enableDebugger" | "externalExecutor" | "hideDocumentationActions" | "hideSideBar" | "messageOverrides" | "openedSidePanel" | "profile" | "script" | "sideActionBarExpanded" | "snippets" | "suggestions" | "testData">>, HTMLAttributes<ArcgisArcadeEditor> { onarcgisDiagnosticsChange?: EventHandler<ArcgisArcadeEditor["arcgisDiagnosticsChange"]>; onarcgisScriptChange?: EventHandler<ArcgisArcadeEditor["arcgisScriptChange"]>; } interface PreactArcgisCodeEditor extends Partial<Pick<ArcgisCodeEditor, "editorOptions" | "language" | "modelId" | "value">>, HTMLAttributes<ArcgisCodeEditor> { onarcgisSelectionChange?: EventHandler<ArcgisCodeEditor["arcgisSelectionChange"]>; onarcgisValueChange?: EventHandler<ArcgisCodeEditor["arcgisValueChange"]>; } interface PreactArcgisCodeEditorShell extends HTMLAttributes<CodeEditorShell> { } interface PreactArcgisCodeViewer extends Partial<Pick<ArcgisCodeViewer, "language" | "lineNumbers" | "round">>, HTMLAttributes<ArcgisCodeViewer> { } interface PreactArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpressionEditor, "hideDescriptionsInFieldsPanel" | "hideSideBar" | "messageOverrides" | "profile" | "script">>, HTMLAttributes<ArcgisSqlExpressionEditor> { onarcgisDiagnosticsChange?: EventHandler<ArcgisSqlExpressionEditor["arcgisDiagnosticsChange"]>; onarcgisScriptChange?: EventHandler<ArcgisSqlExpressionEditor["arcgisScriptChange"]>; } interface PreactArcgisSqlLayerEditor extends Partial<Pick<ArcgisSqlLayerEditor, "editorOptions" | "hideSideBar" | "messageOverrides" | "openedSidePanel" | "profile" | "script">>, HTMLAttributes<ArcgisSqlLayerEditor> { onarcgisDiagnosticsChange?: EventHandler<ArcgisSqlLayerEditor["arcgisDiagnosticsChange"]>; onarcgisScriptChange?: EventHandler<ArcgisSqlLayerEditor["arcgisScriptChange"]>; } declare module 'preact' { namespace createElement.JSX { interface IntrinsicElements { "arcgis-arcade-editor": PreactArcgisArcadeEditor; "arcgis-code-editor": PreactArcgisCodeEditor; "arcgis-code-editor-shell": PreactArcgisCodeEditorShell; "arcgis-code-viewer": PreactArcgisCodeViewer; "arcgis-sql-expression-editor": PreactArcgisSqlExpressionEditor; "arcgis-sql-layer-editor": PreactArcgisSqlLayerEditor; } } namespace h.JSX { interface IntrinsicElements { "arcgis-arcade-editor": PreactArcgisArcadeEditor; "arcgis-code-editor": PreactArcgisCodeEditor; "arcgis-code-editor-shell": PreactArcgisCodeEditorShell; "arcgis-code-viewer": PreactArcgisCodeViewer; "arcgis-sql-expression-editor": PreactArcgisSqlExpressionEditor; "arcgis-sql-layer-editor": PreactArcgisSqlLayerEditor; } } }