@arcgis/coding-components 5.1.0-next.13 → 5.1.0-next.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{JGASZMML.js → BVH2QXVK.js} +1 -1
- package/dist/cdn/DZ6A65Y5.js +60 -0
- package/dist/cdn/{VD5UOV5M.js → F75C3HE6.js} +1 -1
- package/dist/cdn/{CEX6Z6XG.js → FWVG6H2C.js} +1 -1
- package/dist/cdn/HPVGJHBT.js +4 -0
- package/dist/cdn/{YBTWB6XC.js → HZ5MCXUU.js} +1 -1
- package/dist/cdn/{V2SLLOQ5.js → JRXT6REI.js} +1 -1
- package/dist/cdn/{5XIHWLQI.js → KTJPAA4C.js} +1 -1
- package/dist/cdn/{JQTEKTO5.js → OSU57IUK.js} +1 -1
- package/dist/cdn/{S5RUOHYM.js → SXHJ77MK.js} +1 -1
- package/dist/cdn/{2TB2LHRA.js → THYQLG3F.js} +1 -1
- package/dist/cdn/{44MLHT3A.js → XTNBVMHY.js} +1 -1
- package/dist/cdn/{H75CMJQP.js → YLUPZ4JE.js} +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/language-defaults-base.js +9 -9
- package/dist/chunks/markdown.js +409 -388
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +352 -302
- package/dist/components/arcgis-arcade-editor/customElement.js +11 -11
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/dist/utils/arcade-assistant/types.d.ts +2 -0
- package/dist/utils/arcade-executor.d.ts +1 -1
- package/package.json +5 -5
- package/dist/cdn/2ORJ3A7K.js +0 -4
- package/dist/cdn/AQEEMLO5.js +0 -60
- /package/dist/cdn/{HVHTW7TF.js → 7LS3R4TH.js} +0 -0
package/dist/docs/docs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"timestamp":"2026-02-12T04:42:14","compiler":{"name":"@arcgis/lumina-compiler","version":"5.1.0-next.13","typescriptVersion":"5.9.3"},"components":[{"filePath":"src/components/arcade-editor/arcade-editor.tsx","tag":"arcgis-arcade-editor","overview":"","readme":"","usage":{},"docs":"[**Arcade**](https://developers.arcgis.com/arcade/) is a portable, and lightweight expression language used to create custom content throughout the [ArcGIS system](https://www.esri.com/en-us/arcgis/products/index).\nLike other expression languages, it can perform mathematical calculations, format text, and evaluate logical statements.\nIt also supports multi-statement expressions, variables, and flow control statements. Arcade is unique when compared to other expression and scripting languages due to its inclusion of [feature](https://developers.arcgis.com/arcade/guide/types/#feature) and [geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) data types.\n\nMap Viewer (MV) was the first ArcGIS Online product to incorporate the new Arcade editor after [the editor's introduction in the November 2022 ArcGIS Online release](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/introducing-the-new-arcade-editor-in-arcgis-online/).\nThis was possible thanks to the Arcade editor component, which enabled MV to implement its own Arcade expression builder.\nYou can now also find the editor in ArcGIS Dashboards, ArcGIS Field Maps, and ArcGIS Velocity.\n\nYou can easily get your own dedicated Arcade expression builder with the **Arcade editor** component, which includes:\n\n- An easy to use [layout](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#the-new-layout)\n- An optional minimal layout if you, for example, decide to manually exclude things such as test data, padding, line numbers, and the sidebar\n- A way to execute Arcade expressions in a configurable code editor\n- [Suggestions and code completion](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#suggestions-and-code-completion)\n- [WCAG 2.0 compliant code colorization / syntax highlighting](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/accessibility-and-arcade-working-in-color/)\n- Built-in [keyboard shortcuts](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#keyboard-shortcuts)\n- In-editor help for finding information about profile variables relevant to your profile, documentation for constants and functions, a link to the official Arcade documentation, and, in some case, suggestions.\n- Support for many [languages and directionality](https://developers.arcgis.com/javascript/latest/localization/)","docsTags":[{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[{"name":"arcadeAssistant","type":"ArcadeAssistantConfig | undefined","complexType":{"original":"ArcadeAssistantConfig | undefined","resolved":"ArcadeAssistantConfig | undefined","references":{"ArcadeAssistantConfig":{"location":"local","path":"utils/arcade-assistant/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"enables and configures the arcade assistant","docsTags":[{"name":"internal"}],"values":[],"optional":true,"required":false},{"name":"customPanels","type":"ICustomPanel[] | undefined","complexType":{"original":"ICustomPanel[] | undefined","resolved":"ICustomPanel[] | undefined","references":{"ICustomPanel":{"location":"local","path":"utils/custom-panel","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Custom panels to be displayed in the side panel.\nWill be placed below the default panels but above the help panel.","docsTags":[{"name":"internal"}],"values":[],"optional":true,"required":false},{"name":"editorOptions","type":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","complexType":{"original":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","resolved":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","references":{"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Options to update on the editor.\nFor example:\n```json\n{\n \"fontSize\": 18\n}\n```\n\nTo get the full list of available options, see the Monaco Editor options [documentation](https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor_editor_api.editor.IEditorOptions.html) for more details.","docsTags":[],"values":[],"optional":true,"required":false},{"name":"hideDocumentationActions","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"hide-documentation-actions","reflectToAttr":false,"docs":"If true, it will hide the documentation action in the side panel","docsTags":[],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false},{"name":"hideSideBar","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"hide-side-bar","reflectToAttr":false,"docs":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","docsTags":[],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false},{"name":"openedSidePanel","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"opened-side-panel","reflectToAttr":true,"docs":"The name of the opened side panel. 'none' means 'no panel opened'.","docsTags":[],"default":"\"none\"","values":[{"type":"string"}],"optional":true,"required":false},{"name":"profile","type":"IEditorProfileDefinition | IPredefinedProfile | undefined","complexType":{"original":"IEditorProfileDefinition | IPredefinedProfile | undefined","resolved":"IEditorProfileDefinition | IPredefinedProfile | undefined","references":{"IEditorProfileDefinition":{"location":"local","path":"components/types","id":"notImplemented"},"IPredefinedProfile":{"location":"local","path":"components/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"The profile contains metadata used by the editor for editing context and help.\nExample:\n```\n {\n bundles: [\"core\", \"dataAccess\", \"geometry\", \"portal-access\"],\n variables: [\n {\n name: \"$feature\",\n description: \"The feature passed to the script during execution.\",\n definition: aFeatureLayerInstance\n }\n ]\n }\n```","docsTags":[],"values":[],"optional":true,"required":false},{"name":"script","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"script","reflectToAttr":false,"docs":"The arcade script. Use this property to define or update the script.","docsTags":[],"default":"\"\"","values":[{"type":"string"}],"optional":true,"required":false},{"name":"sideActionBarExpanded","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"side-action-bar-expanded","reflectToAttr":true,"docs":"If true, the side action bar will be expanded","docsTags":[],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false},{"name":"snippets","type":"ApiSnippet[] | undefined","complexType":{"original":"ApiSnippet[] | undefined","resolved":"ApiSnippet[] | undefined","references":{"ApiSnippet":{"location":"import","path":"@arcgis/languages-api-utils","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Collection of snippets","docsTags":[],"values":[],"optional":true,"required":false},{"name":"suggestions","type":"IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined","complexType":{"original":"IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined","resolved":"IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined","references":{"IEditorCodeSuggestion":{"location":"local","path":"components/types","id":"notImplemented"},"IEditorCodeSuggestionGroup":{"location":"local","path":"components/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Collection of suggestions","docsTags":[],"values":[],"optional":true,"required":false},{"name":"testData","type":"IEditorTestContext | undefined","complexType":{"original":"IEditorTestContext | undefined","resolved":"IEditorTestContext | undefined","references":{"IEditorTestContext":{"location":"local","path":"components/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Test data used to execute the script in the editor. If undefined the execute script UX will be hidden.","docsTags":[],"values":[],"optional":true,"required":false}],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst arcgisArcadeEditor = document.querySelector(\"arcgis-arcade-editor\");\ndocument.body.append(arcgisArcadeEditor);\nawait arcgisArcadeEditor.componentOnReady();\nconsole.log(\"arcgis-arcade-editor is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]},{"name":"getTestResult","returns":{"type":"Promise<ArcadeResult>","docs":""},"complexType":{"signature":"(): Promise<ArcadeResult>","parameters":[],"return":"Promise<ArcadeResult>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"},"ArcadeResult":{"location":"local","path":"utils/arcade-executor","id":"notImplemented"}}},"signature":"getTestResult(): Promise<ArcadeResult>","parameters":[],"docs":"Returns the Arcade result for the script for the provided test data.","docsTags":[{"name":"internal"}]},{"name":"setFocus","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(): Promise<void>","parameters":[],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"setFocus(): Promise<void>","parameters":[],"docs":"Set the focus on the element.","docsTags":[]}],"events":[{"event":"arcgisDiagnosticsChange","detail":"Diagnostic[]","bubbles":false,"complexType":{"original":"Diagnostic[]","resolved":"Diagnostic[]","references":{"Diagnostic":{"location":"import","path":"@arcgis/arcade-languageservice","id":"notImplemented"}}},"cancelable":true,"composed":true,"docs":"Emitted when the diagnostics collection has changed.","docsTags":[]},{"event":"arcgisScriptChange","detail":"string","bubbles":false,"complexType":{"original":"string","resolved":"string","references":{}},"cancelable":true,"composed":true,"docs":"Emitted when the script string has changed.","docsTags":[]}],"styles":[],"slots":[],"parts":[],"listeners":[]},{"filePath":"src/components/code-editor/code-editor.tsx","tag":"arcgis-code-editor","overview":"","readme":"","usage":{},"docs":"","docsTags":[{"name":"internal"},{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[{"name":"editorInstance","type":"Editor.IStandaloneCodeEditor | undefined","complexType":{"original":"Editor.IStandaloneCodeEditor | undefined","resolved":"Editor.IStandaloneCodeEditor | undefined","references":{"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"The instance of the Monaco Editor after the component has been rendered.\nTo determine when a component is rendered, you can use componentOnReady() method.\nThe method returns a Promise that resolves after the component rendered for the first time.","docsTags":[{"name":"readonly","text":""}],"values":[],"optional":true,"required":false},{"name":"editorOptions","type":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","complexType":{"original":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","resolved":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","references":{"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Options to update on the editor.\nFor example:\n```json\n{\n \"fontSize\": 18\n}\n```\n\nTo get the full list of options set on the editor, use the editorInstance property and see Monaco Editor options documentation for more details.","docsTags":[],"values":[],"optional":true,"required":false},{"name":"language","type":"string | undefined","complexType":{"original":"string | undefined","resolved":"string | undefined","references":{}},"mutable":true,"attr":"language","reflectToAttr":false,"docs":"The language for the editor.\nCurrently supported language: arcade, arcgis-sql-expression, json, css, html, javascript, typescript, and text.","docsTags":[],"values":[{"type":"string"}],"optional":true,"required":false},{"name":"modelId","type":"`${string}-${string}-${string}-${string}-${string}`","complexType":{"original":"`${string}-${string}-${string}-${string}-${string}`","resolved":"`${string}-${string}-${string}-${string}-${string}`","references":{}},"mutable":true,"attr":"model-id","reflectToAttr":false,"docs":"A unique identifier for the model.\nThe unique identifier is sometimes used by language defaults to store model metadata.\nFor example, with arcade, the model id is used to store the arcade profile and other metadata.\nThe unique identifier is especially useful when there are multiple editors on the same page.","docsTags":[],"values":[{"type":"string"}],"optional":true,"required":false},{"name":"value","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"value","reflectToAttr":false,"docs":"The initial value for the editor.\nThe value is the script, code, css, json, etc.","docsTags":[],"default":"\"\"","values":[{"type":"string"}],"optional":true,"required":false}],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst arcgisCodeEditor = document.querySelector(\"arcgis-code-editor\");\ndocument.body.append(arcgisCodeEditor);\nawait arcgisCodeEditor.componentOnReady();\nconsole.log(\"arcgis-code-editor is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]},{"name":"insertSnippet","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(text: string | null | undefined): Promise<void>","parameters":[{"name":"text","type":"string | null | undefined","docs":"The string snippet to insert"}],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"insertSnippet(text: string | null | undefined): Promise<void>","parameters":[{"name":"text","type":"string | null | undefined","docs":"The string snippet to insert"}],"docs":"Inserts a snippet at the current position in the editor.","docsTags":[]},{"name":"insertText","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(text: string | null | undefined): Promise<void>","parameters":[{"name":"text","type":"string | null | undefined","docs":"The string to insert"}],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"insertText(text: string | null | undefined): Promise<void>","parameters":[{"name":"text","type":"string | null | undefined","docs":"The string to insert"}],"docs":"Inserts a text at the current position in the editor.","docsTags":[]},{"name":"setFocus","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(): Promise<void>","parameters":[],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"setFocus(): Promise<void>","parameters":[],"docs":"Sets the focus on the editor.","docsTags":[]}],"events":[{"event":"arcgisSelectionChange","detail":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","bubbles":false,"complexType":{"original":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","resolved":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","references":{"Selection":{"location":"import","path":"monaco-editor","id":"notImplemented"},"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"cancelable":true,"composed":true,"docs":"Emitted when the selection has changed.","docsTags":[]},{"event":"arcgisValueChange","detail":"string","bubbles":false,"complexType":{"original":"string","resolved":"string","references":{}},"cancelable":true,"composed":true,"docs":"Emitted when the value has changed (script, code, css, json, etc.)","docsTags":[]}],"styles":[],"slots":[],"parts":[],"listeners":[]},{"filePath":"src/components/code-editor-shell/code-editor-shell.tsx","tag":"arcgis-code-editor-shell","overview":"","readme":"","usage":{},"docs":"A layout component for code editors that provides slots for an editor, results panel, side panel, and action bars.","docsTags":[{"name":"internal"},{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst codeEditorShell = document.querySelector(\"arcgis-code-editor-shell\");\ndocument.body.append(codeEditorShell);\nawait codeEditorShell.componentOnReady();\nconsole.log(\"arcgis-code-editor-shell is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]}],"events":[],"styles":[{"name":"--arcgis-coding-components-border","annotation":"prop","docs":"The border style for the editor shell *"},{"name":"--arcgis-coding-components-background-color","annotation":"prop","docs":"The background color for the editor shell *"},{"name":"--arcgis-coding-components-side-action-bar-max-w","annotation":"prop","docs":"The max width for the side action bar *"},{"name":"--arcgis-coding-components-code-editor-side-panel-w","annotation":"prop","docs":"The width for the code editor side panel *"},{"name":"--arcgis-coding-components-code-editor-side-panel-max-w","annotation":"prop","docs":"The max width for the code editor side panel *"},{"name":"--arcgis-coding-components-code-editor-results-panel-max-h","annotation":"prop","docs":"The max height for the code editor results panel *"},{"name":"--arcgis-coding-components-code-editor-results-panel-h","annotation":"prop","docs":"The default height for the code editor results panel (preferred over min-h). *"}],"slots":[{"name":"top-action-bar","docs":"A slot for placing a top action bar above the editor area."},{"name":"editor","docs":"A slot for placing the main code editor component."},{"name":"results-panel","docs":"A slot for placing a results panel below the code editor."},{"name":"side-panel","docs":"A slot for placing a side panel next to the code editor area."},{"name":"side-action-bar","docs":"A slot for placing a side action bar next to the side panel."}],"parts":[],"listeners":[]},{"filePath":"src/components/code-viewer/code-viewer.tsx","tag":"arcgis-code-viewer","overview":"","readme":"","usage":{},"docs":"A code viewer component for displaying code snippets.\nSupports syntax highlighting for various programming languages, include arcade and arcgis-sql-expression.","docsTags":[{"name":"example","text":"```tsx\n<arcgis-code-viewer language=\"javascript\">\nfunction greet() {\n console.log(\"Hello, World!\");\n}\n</arcgis-code-viewer>\n```"},{"name":"example","text":"HTML snippets (preserve markup)\n```tsx\n<arcgis-code-viewer language=\"html\">\n <template>\n <div class=\"greeting\"><span>Hello</span> World!</div>\n </template>\n</arcgis-code-viewer>\n```\nWhen `language=\"html\"`, the component will attempt to preserve your original markup instead of reducing it\nto plain text. For safety and to prevent the markup from rendering in-page, wrap the snippet in a `<template>`.\nIf no `<template>` is provided, the component falls back to concatenating the `outerHTML` of element nodes and the\nraw text of text nodes. Script contents are treated as inert string data; they are never executed."},{"name":"internal"},{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[{"name":"language","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"language","reflectToAttr":false,"docs":"The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.","docsTags":[],"default":"\"arcade\"","values":[{"type":"string"}],"optional":true,"required":false},{"name":"round","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"round","reflectToAttr":true,"docs":"When `true`, adds a round style to the component.","docsTags":[],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false}],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst arcgisCodeViewer = document.querySelector(\"arcgis-code-viewer\");\ndocument.body.append(arcgisCodeViewer);\nawait arcgisCodeViewer.componentOnReady();\nconsole.log(\"arcgis-code-viewer is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]}],"events":[],"styles":[],"slots":[],"parts":[],"listeners":[]},{"filePath":"src/components/sql-expression-editor/sql-expression-editor.tsx","tag":"arcgis-sql-expression-editor","overview":"","readme":"","usage":{},"docs":"The SQL Expression Editor provides a familiar code editor experience for writing your own SQL expressions.\nIt supports syntax highlighting, code completion, and validation, allowing users to write SQL expressions using the\n[standardized SQL functions](https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm) supported by ArcGIS.","docsTags":[{"name":"internal"},{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[{"name":"hideSideBar","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"hide-side-bar","reflectToAttr":false,"docs":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","docsTags":[{"name":"example","text":"```html\n <arcgis-sql-expression-editor hideSideBar></arcgis-sql-expression-editor>\n```"}],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false},{"name":"profile","type":"IPredefinedProfile | undefined","complexType":{"original":"IPredefinedProfile | undefined","resolved":"IPredefinedProfile | undefined","references":{"IPredefinedProfile":{"location":"local","path":"components/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"The profile to use for the editor. The profile defines the variables and functions that are available to the editor.","docsTags":[{"name":"example","text":"```jsx\n<arcgis-sql-expression-editor profile={id: \"field-calculation\", definitions: { $layer: layer }}></arcgis-sql-expression-editor>\n```"}],"values":[],"optional":true,"required":false},{"name":"script","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"script","reflectToAttr":false,"docs":"The sql expression script. Use this property to define or update the script.","docsTags":[{"name":"example","text":"```html\n<arcgis-sql-expression-editor script=\"CAST(2.45 AS INTEGER)\"></arcgis-sql-expression-editor>\n```"}],"default":"\"\"","values":[{"type":"string"}],"optional":true,"required":false}],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst arcgisSqlExpressionEditor = document.querySelector(\"arcgis-sql-expression-editor\");\ndocument.body.append(arcgisSqlExpressionEditor);\nawait arcgisSqlExpressionEditor.componentOnReady();\nconsole.log(\"arcgis-sql-expression-editor is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]},{"name":"setFocus","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(): Promise<void>","parameters":[],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"setFocus(): Promise<void>","parameters":[],"docs":"Set the focus on the element.","docsTags":[]}],"events":[{"event":"arcgisDiagnosticsChange","detail":"editor.IMarkerData[]","bubbles":false,"complexType":{"original":"editor.IMarkerData[]","resolved":"editor.IMarkerData[]","references":{"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"cancelable":true,"composed":true,"docs":"Emitted when the diagnostics collection has changed.","docsTags":[]},{"event":"arcgisScriptChange","detail":"string","bubbles":false,"complexType":{"original":"string","resolved":"string","references":{}},"cancelable":true,"composed":true,"docs":"Emitted when the script string has changed.","docsTags":[]}],"styles":[],"slots":[],"parts":[],"listeners":[]}],"typeLibrary":{}}
|
|
1
|
+
{"timestamp":"2026-02-13T04:45:43","compiler":{"name":"@arcgis/lumina-compiler","version":"5.1.0-next.14","typescriptVersion":"5.9.3"},"components":[{"filePath":"src/components/arcade-editor/arcade-editor.tsx","tag":"arcgis-arcade-editor","overview":"","readme":"","usage":{},"docs":"[**Arcade**](https://developers.arcgis.com/arcade/) is a portable, and lightweight expression language used to create custom content throughout the [ArcGIS system](https://www.esri.com/en-us/arcgis/products/index).\nLike other expression languages, it can perform mathematical calculations, format text, and evaluate logical statements.\nIt also supports multi-statement expressions, variables, and flow control statements. Arcade is unique when compared to other expression and scripting languages due to its inclusion of [feature](https://developers.arcgis.com/arcade/guide/types/#feature) and [geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) data types.\n\nMap Viewer (MV) was the first ArcGIS Online product to incorporate the new Arcade editor after [the editor's introduction in the November 2022 ArcGIS Online release](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/introducing-the-new-arcade-editor-in-arcgis-online/).\nThis was possible thanks to the Arcade editor component, which enabled MV to implement its own Arcade expression builder.\nYou can now also find the editor in ArcGIS Dashboards, ArcGIS Field Maps, and ArcGIS Velocity.\n\nYou can easily get your own dedicated Arcade expression builder with the **Arcade editor** component, which includes:\n\n- An easy to use [layout](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#the-new-layout)\n- An optional minimal layout if you, for example, decide to manually exclude things such as test data, padding, line numbers, and the sidebar\n- A way to execute Arcade expressions in a configurable code editor\n- [Suggestions and code completion](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#suggestions-and-code-completion)\n- [WCAG 2.0 compliant code colorization / syntax highlighting](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/accessibility-and-arcade-working-in-color/)\n- Built-in [keyboard shortcuts](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#keyboard-shortcuts)\n- In-editor help for finding information about profile variables relevant to your profile, documentation for constants and functions, a link to the official Arcade documentation, and, in some case, suggestions.\n- Support for many [languages and directionality](https://developers.arcgis.com/javascript/latest/localization/)","docsTags":[{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[{"name":"arcadeAssistant","type":"ArcadeAssistantConfig | undefined","complexType":{"original":"ArcadeAssistantConfig | undefined","resolved":"ArcadeAssistantConfig | undefined","references":{"ArcadeAssistantConfig":{"location":"local","path":"utils/arcade-assistant/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"enables and configures the arcade assistant","docsTags":[{"name":"internal"}],"values":[],"optional":true,"required":false},{"name":"customPanels","type":"ICustomPanel[] | undefined","complexType":{"original":"ICustomPanel[] | undefined","resolved":"ICustomPanel[] | undefined","references":{"ICustomPanel":{"location":"local","path":"utils/custom-panel","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Custom panels to be displayed in the side panel.\nWill be placed below the default panels but above the help panel.","docsTags":[{"name":"internal"}],"values":[],"optional":true,"required":false},{"name":"editorOptions","type":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","complexType":{"original":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","resolved":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","references":{"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Options to update on the editor.\nFor example:\n```json\n{\n \"fontSize\": 18\n}\n```\n\nTo get the full list of available options, see the Monaco Editor options [documentation](https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor_editor_api.editor.IEditorOptions.html) for more details.","docsTags":[],"values":[],"optional":true,"required":false},{"name":"hideDocumentationActions","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"hide-documentation-actions","reflectToAttr":false,"docs":"If true, it will hide the documentation action in the side panel","docsTags":[],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false},{"name":"hideSideBar","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"hide-side-bar","reflectToAttr":false,"docs":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","docsTags":[],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false},{"name":"openedSidePanel","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"opened-side-panel","reflectToAttr":true,"docs":"The name of the opened side panel. 'none' means 'no panel opened'.","docsTags":[],"default":"\"none\"","values":[{"type":"string"}],"optional":true,"required":false},{"name":"profile","type":"IEditorProfileDefinition | IPredefinedProfile | undefined","complexType":{"original":"IEditorProfileDefinition | IPredefinedProfile | undefined","resolved":"IEditorProfileDefinition | IPredefinedProfile | undefined","references":{"IEditorProfileDefinition":{"location":"local","path":"components/types","id":"notImplemented"},"IPredefinedProfile":{"location":"local","path":"components/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"The profile contains metadata used by the editor for editing context and help.\nExample:\n```\n {\n bundles: [\"core\", \"dataAccess\", \"geometry\", \"portal-access\"],\n variables: [\n {\n name: \"$feature\",\n description: \"The feature passed to the script during execution.\",\n definition: aFeatureLayerInstance\n }\n ]\n }\n```","docsTags":[],"values":[],"optional":true,"required":false},{"name":"script","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"script","reflectToAttr":false,"docs":"The arcade script. Use this property to define or update the script.","docsTags":[],"default":"\"\"","values":[{"type":"string"}],"optional":true,"required":false},{"name":"sideActionBarExpanded","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"side-action-bar-expanded","reflectToAttr":true,"docs":"If true, the side action bar will be expanded","docsTags":[],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false},{"name":"snippets","type":"ApiSnippet[] | undefined","complexType":{"original":"ApiSnippet[] | undefined","resolved":"ApiSnippet[] | undefined","references":{"ApiSnippet":{"location":"import","path":"@arcgis/languages-api-utils","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Collection of snippets","docsTags":[],"values":[],"optional":true,"required":false},{"name":"suggestions","type":"IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined","complexType":{"original":"IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined","resolved":"IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined","references":{"IEditorCodeSuggestion":{"location":"local","path":"components/types","id":"notImplemented"},"IEditorCodeSuggestionGroup":{"location":"local","path":"components/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Collection of suggestions","docsTags":[],"values":[],"optional":true,"required":false},{"name":"testData","type":"IEditorTestContext | undefined","complexType":{"original":"IEditorTestContext | undefined","resolved":"IEditorTestContext | undefined","references":{"IEditorTestContext":{"location":"local","path":"components/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Test data used to execute the script in the editor. If undefined the execute script UX will be hidden.","docsTags":[],"values":[],"optional":true,"required":false}],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst arcgisArcadeEditor = document.querySelector(\"arcgis-arcade-editor\");\ndocument.body.append(arcgisArcadeEditor);\nawait arcgisArcadeEditor.componentOnReady();\nconsole.log(\"arcgis-arcade-editor is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]},{"name":"getTestResult","returns":{"type":"Promise<ArcadeResult>","docs":""},"complexType":{"signature":"(): Promise<ArcadeResult>","parameters":[],"return":"Promise<ArcadeResult>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"},"ArcadeResult":{"location":"local","path":"utils/arcade-executor","id":"notImplemented"}}},"signature":"getTestResult(): Promise<ArcadeResult>","parameters":[],"docs":"Returns the Arcade result for the script for the provided test data.","docsTags":[{"name":"internal"}]},{"name":"setFocus","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(): Promise<void>","parameters":[],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"setFocus(): Promise<void>","parameters":[],"docs":"Set the focus on the element.","docsTags":[]}],"events":[{"event":"arcgisDiagnosticsChange","detail":"Diagnostic[]","bubbles":false,"complexType":{"original":"Diagnostic[]","resolved":"Diagnostic[]","references":{"Diagnostic":{"location":"import","path":"@arcgis/arcade-languageservice","id":"notImplemented"}}},"cancelable":true,"composed":true,"docs":"Emitted when the diagnostics collection has changed.","docsTags":[]},{"event":"arcgisScriptChange","detail":"string","bubbles":false,"complexType":{"original":"string","resolved":"string","references":{}},"cancelable":true,"composed":true,"docs":"Emitted when the script string has changed.","docsTags":[]}],"styles":[],"slots":[],"parts":[],"listeners":[]},{"filePath":"src/components/code-editor/code-editor.tsx","tag":"arcgis-code-editor","overview":"","readme":"","usage":{},"docs":"","docsTags":[{"name":"internal"},{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[{"name":"editorInstance","type":"Editor.IStandaloneCodeEditor | undefined","complexType":{"original":"Editor.IStandaloneCodeEditor | undefined","resolved":"Editor.IStandaloneCodeEditor | undefined","references":{"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"The instance of the Monaco Editor after the component has been rendered.\nTo determine when a component is rendered, you can use componentOnReady() method.\nThe method returns a Promise that resolves after the component rendered for the first time.","docsTags":[{"name":"readonly","text":""}],"values":[],"optional":true,"required":false},{"name":"editorOptions","type":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","complexType":{"original":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","resolved":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined","references":{"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"Options to update on the editor.\nFor example:\n```json\n{\n \"fontSize\": 18\n}\n```\n\nTo get the full list of options set on the editor, use the editorInstance property and see Monaco Editor options documentation for more details.","docsTags":[],"values":[],"optional":true,"required":false},{"name":"language","type":"string | undefined","complexType":{"original":"string | undefined","resolved":"string | undefined","references":{}},"mutable":true,"attr":"language","reflectToAttr":false,"docs":"The language for the editor.\nCurrently supported language: arcade, arcgis-sql-expression, json, css, html, javascript, typescript, and text.","docsTags":[],"values":[{"type":"string"}],"optional":true,"required":false},{"name":"modelId","type":"`${string}-${string}-${string}-${string}-${string}`","complexType":{"original":"`${string}-${string}-${string}-${string}-${string}`","resolved":"`${string}-${string}-${string}-${string}-${string}`","references":{}},"mutable":true,"attr":"model-id","reflectToAttr":false,"docs":"A unique identifier for the model.\nThe unique identifier is sometimes used by language defaults to store model metadata.\nFor example, with arcade, the model id is used to store the arcade profile and other metadata.\nThe unique identifier is especially useful when there are multiple editors on the same page.","docsTags":[],"values":[{"type":"string"}],"optional":true,"required":false},{"name":"value","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"value","reflectToAttr":false,"docs":"The initial value for the editor.\nThe value is the script, code, css, json, etc.","docsTags":[],"default":"\"\"","values":[{"type":"string"}],"optional":true,"required":false}],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst arcgisCodeEditor = document.querySelector(\"arcgis-code-editor\");\ndocument.body.append(arcgisCodeEditor);\nawait arcgisCodeEditor.componentOnReady();\nconsole.log(\"arcgis-code-editor is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]},{"name":"insertSnippet","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(text: string | null | undefined): Promise<void>","parameters":[{"name":"text","type":"string | null | undefined","docs":"The string snippet to insert"}],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"insertSnippet(text: string | null | undefined): Promise<void>","parameters":[{"name":"text","type":"string | null | undefined","docs":"The string snippet to insert"}],"docs":"Inserts a snippet at the current position in the editor.","docsTags":[]},{"name":"insertText","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(text: string | null | undefined): Promise<void>","parameters":[{"name":"text","type":"string | null | undefined","docs":"The string to insert"}],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"insertText(text: string | null | undefined): Promise<void>","parameters":[{"name":"text","type":"string | null | undefined","docs":"The string to insert"}],"docs":"Inserts a text at the current position in the editor.","docsTags":[]},{"name":"setFocus","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(): Promise<void>","parameters":[],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"setFocus(): Promise<void>","parameters":[],"docs":"Sets the focus on the editor.","docsTags":[]}],"events":[{"event":"arcgisSelectionChange","detail":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","bubbles":false,"complexType":{"original":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","resolved":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","references":{"Selection":{"location":"import","path":"monaco-editor","id":"notImplemented"},"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"cancelable":true,"composed":true,"docs":"Emitted when the selection has changed.","docsTags":[]},{"event":"arcgisValueChange","detail":"string","bubbles":false,"complexType":{"original":"string","resolved":"string","references":{}},"cancelable":true,"composed":true,"docs":"Emitted when the value has changed (script, code, css, json, etc.)","docsTags":[]}],"styles":[],"slots":[],"parts":[],"listeners":[]},{"filePath":"src/components/code-editor-shell/code-editor-shell.tsx","tag":"arcgis-code-editor-shell","overview":"","readme":"","usage":{},"docs":"A layout component for code editors that provides slots for an editor, results panel, side panel, and action bars.","docsTags":[{"name":"internal"},{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst codeEditorShell = document.querySelector(\"arcgis-code-editor-shell\");\ndocument.body.append(codeEditorShell);\nawait codeEditorShell.componentOnReady();\nconsole.log(\"arcgis-code-editor-shell is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]}],"events":[],"styles":[{"name":"--arcgis-coding-components-border","annotation":"prop","docs":"The border style for the editor shell *"},{"name":"--arcgis-coding-components-background-color","annotation":"prop","docs":"The background color for the editor shell *"},{"name":"--arcgis-coding-components-side-action-bar-max-w","annotation":"prop","docs":"The max width for the side action bar *"},{"name":"--arcgis-coding-components-code-editor-side-panel-w","annotation":"prop","docs":"The width for the code editor side panel *"},{"name":"--arcgis-coding-components-code-editor-side-panel-max-w","annotation":"prop","docs":"The max width for the code editor side panel *"},{"name":"--arcgis-coding-components-code-editor-results-panel-max-h","annotation":"prop","docs":"The max height for the code editor results panel *"},{"name":"--arcgis-coding-components-code-editor-results-panel-h","annotation":"prop","docs":"The default height for the code editor results panel (preferred over min-h). *"}],"slots":[{"name":"top-action-bar","docs":"A slot for placing a top action bar above the editor area."},{"name":"editor","docs":"A slot for placing the main code editor component."},{"name":"results-panel","docs":"A slot for placing a results panel below the code editor."},{"name":"side-panel","docs":"A slot for placing a side panel next to the code editor area."},{"name":"side-action-bar","docs":"A slot for placing a side action bar next to the side panel."}],"parts":[],"listeners":[]},{"filePath":"src/components/code-viewer/code-viewer.tsx","tag":"arcgis-code-viewer","overview":"","readme":"","usage":{},"docs":"A code viewer component for displaying code snippets.\nSupports syntax highlighting for various programming languages, include arcade and arcgis-sql-expression.","docsTags":[{"name":"example","text":"```tsx\n<arcgis-code-viewer language=\"javascript\">\nfunction greet() {\n console.log(\"Hello, World!\");\n}\n</arcgis-code-viewer>\n```"},{"name":"example","text":"HTML snippets (preserve markup)\n```tsx\n<arcgis-code-viewer language=\"html\">\n <template>\n <div class=\"greeting\"><span>Hello</span> World!</div>\n </template>\n</arcgis-code-viewer>\n```\nWhen `language=\"html\"`, the component will attempt to preserve your original markup instead of reducing it\nto plain text. For safety and to prevent the markup from rendering in-page, wrap the snippet in a `<template>`.\nIf no `<template>` is provided, the component falls back to concatenating the `outerHTML` of element nodes and the\nraw text of text nodes. Script contents are treated as inert string data; they are never executed."},{"name":"internal"},{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[{"name":"language","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"language","reflectToAttr":false,"docs":"The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.","docsTags":[],"default":"\"arcade\"","values":[{"type":"string"}],"optional":true,"required":false},{"name":"round","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"round","reflectToAttr":true,"docs":"When `true`, adds a round style to the component.","docsTags":[],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false}],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst arcgisCodeViewer = document.querySelector(\"arcgis-code-viewer\");\ndocument.body.append(arcgisCodeViewer);\nawait arcgisCodeViewer.componentOnReady();\nconsole.log(\"arcgis-code-viewer is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]}],"events":[],"styles":[],"slots":[],"parts":[],"listeners":[]},{"filePath":"src/components/sql-expression-editor/sql-expression-editor.tsx","tag":"arcgis-sql-expression-editor","overview":"","readme":"","usage":{},"docs":"The SQL Expression Editor provides a familiar code editor experience for writing your own SQL expressions.\nIt supports syntax highlighting, code completion, and validation, allowing users to write SQL expressions using the\n[standardized SQL functions](https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm) supported by ArcGIS.","docsTags":[{"name":"internal"},{"name":"superclass","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}],"encapsulation":"shadow","dependents":[],"dependencies":[],"dependencyGraph":{},"props":[{"name":"hideSideBar","type":"boolean","complexType":{"original":"boolean","resolved":"boolean","references":{}},"mutable":true,"attr":"hide-side-bar","reflectToAttr":false,"docs":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","docsTags":[{"name":"example","text":"```html\n <arcgis-sql-expression-editor hideSideBar></arcgis-sql-expression-editor>\n```"}],"default":"false","values":[{"type":"boolean"}],"optional":true,"required":false},{"name":"profile","type":"IPredefinedProfile | undefined","complexType":{"original":"IPredefinedProfile | undefined","resolved":"IPredefinedProfile | undefined","references":{"IPredefinedProfile":{"location":"local","path":"components/types","id":"notImplemented"}}},"mutable":true,"reflectToAttr":false,"docs":"The profile to use for the editor. The profile defines the variables and functions that are available to the editor.","docsTags":[{"name":"example","text":"```jsx\n<arcgis-sql-expression-editor profile={id: \"field-calculation\", definitions: { $layer: layer }}></arcgis-sql-expression-editor>\n```"}],"values":[],"optional":true,"required":false},{"name":"script","type":"string","complexType":{"original":"string","resolved":"string","references":{}},"mutable":true,"attr":"script","reflectToAttr":false,"docs":"The sql expression script. Use this property to define or update the script.","docsTags":[{"name":"example","text":"```html\n<arcgis-sql-expression-editor script=\"CAST(2.45 AS INTEGER)\"></arcgis-sql-expression-editor>\n```"}],"default":"\"\"","values":[{"type":"string"}],"optional":true,"required":false}],"methods":[{"name":"componentOnReady","returns":{"type":"Promise<this>","docs":""},"complexType":{"signature":"(): Promise<this>","parameters":[],"return":"Promise<this>","references":{"Promise":{"location":"import","path":"typescript/lib/lib.es5.d.ts","id":"notImplemented"}}},"signature":"componentOnReady(): Promise<this>","parameters":[],"docs":"Creates a promise that resolves once the component is fully loaded.","docsTags":[{"name":"example","text":"```js\nconst arcgisSqlExpressionEditor = document.querySelector(\"arcgis-sql-expression-editor\");\ndocument.body.append(arcgisSqlExpressionEditor);\nawait arcgisSqlExpressionEditor.componentOnReady();\nconsole.log(\"arcgis-sql-expression-editor is ready to go!\");\n```"},{"name":"inheritedFrom","text":"{\"name\":\"PublicLitElement\",\"module\":\"PublicLitElement\",\"package\":\"@arcgis/lumina\"}"}]},{"name":"setFocus","returns":{"type":"Promise<void>","docs":""},"complexType":{"signature":"(): Promise<void>","parameters":[],"return":"Promise<void>","references":{"Promise":{"location":"global","path":"global:","id":"notImplemented"}}},"signature":"setFocus(): Promise<void>","parameters":[],"docs":"Set the focus on the element.","docsTags":[]}],"events":[{"event":"arcgisDiagnosticsChange","detail":"editor.IMarkerData[]","bubbles":false,"complexType":{"original":"editor.IMarkerData[]","resolved":"editor.IMarkerData[]","references":{"editor":{"location":"import","path":"monaco-editor","id":"notImplemented"}}},"cancelable":true,"composed":true,"docs":"Emitted when the diagnostics collection has changed.","docsTags":[]},{"event":"arcgisScriptChange","detail":"string","bubbles":false,"complexType":{"original":"string","resolved":"string","references":{}},"cancelable":true,"composed":true,"docs":"Emitted when the script string has changed.","docsTags":[]}],"styles":[],"slots":[],"parts":[],"listeners":[]}],"typeLibrary":{}}
|
package/dist/docs/web-types.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json","name":"@arcgis/coding-components","version":"5.1.0-next.13","description-markup":"markdown","contributions":{"html":{"elements":[{"name":"arcgis-arcade-editor","description":"[**Arcade**](https://developers.arcgis.com/arcade/) is a portable, and lightweight expression language used to create custom content throughout the [ArcGIS system](https://www.esri.com/en-us/arcgis/products/index).\nLike other expression languages, it can perform mathematical calculations, format text, and evaluate logical statements.\nIt also supports multi-statement expressions, variables, and flow control statements. Arcade is unique when compared to other expression and scripting languages due to its inclusion of [feature](https://developers.arcgis.com/arcade/guide/types/#feature) and [geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) data types.\n\nMap Viewer (MV) was the first ArcGIS Online product to incorporate the new Arcade editor after [the editor's introduction in the November 2022 ArcGIS Online release](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/introducing-the-new-arcade-editor-in-arcgis-online/).\nThis was possible thanks to the Arcade editor component, which enabled MV to implement its own Arcade expression builder.\nYou can now also find the editor in ArcGIS Dashboards, ArcGIS Field Maps, and ArcGIS Velocity.\n\nYou can easily get your own dedicated Arcade expression builder with the **Arcade editor** component, which includes:\n\n- An easy to use [layout](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#the-new-layout)\n- An optional minimal layout if you, for example, decide to manually exclude things such as test data, padding, line numbers, and the sidebar\n- A way to execute Arcade expressions in a configurable code editor\n- [Suggestions and code completion](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#suggestions-and-code-completion)\n- [WCAG 2.0 compliant code colorization / syntax highlighting](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/accessibility-and-arcade-working-in-color/)\n- Built-in [keyboard shortcuts](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#keyboard-shortcuts)\n- In-editor help for finding information about profile variables relevant to your profile, documentation for constants and functions, a link to the official Arcade documentation, and, in some case, suggestions.\n- Support for many [languages and directionality](https://developers.arcgis.com/javascript/latest/localization/)\n--\n\n### Events\n- **arcgisDiagnosticsChange** - Emitted when the diagnostics collection has changed.\n- **arcgisScriptChange** - Emitted when the script string has changed.\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.\n- `getTestResult(): Promise<ArcadeResult>` - Returns the Arcade result for the script for the provided test data.\n- `setFocus(): Promise<void>` - Set the focus on the element.","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-arcade-editor/","attributes":[{"name":"hide-documentation-actions","description":"If true, it will hide the documentation action in the side panel","default":"false","value":{"type":"boolean"}},{"name":"hide-side-bar","description":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","default":"false","value":{"type":"boolean"}},{"name":"opened-side-panel","description":"The name of the opened side panel. 'none' means 'no panel opened'.","default":"\"none\"","value":{"type":"string"}},{"name":"script","description":"The arcade script. Use this property to define or update the script.","default":"\"\"","value":{"type":"string"}},{"name":"side-action-bar-expanded","description":"If true, the side action bar will be expanded","default":"false","value":{"type":"boolean"}}],"events":[{"name":"arcgisDiagnosticsChange","type":"Diagnostic[]","description":"Emitted when the diagnostics collection has changed."},{"name":"arcgisScriptChange","type":"string","description":"Emitted when the script string has changed."}],"js":{"properties":[{"name":"arcadeAssistant","description":"enables and configures the arcade assistant","type":"ArcadeAssistantConfig | undefined"},{"name":"customPanels","description":"Custom panels to be displayed in the side panel.\nWill be placed below the default panels but above the help panel.","type":"ICustomPanel[] | undefined"},{"name":"editorOptions","description":"Options to update on the editor.\nFor example:\n```json\n{\n \"fontSize\": 18\n}\n```\n\nTo get the full list of available options, see the Monaco Editor options [documentation](https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor_editor_api.editor.IEditorOptions.html) for more details.","type":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined"},{"name":"hideDocumentationActions","description":"If true, it will hide the documentation action in the side panel","type":"boolean"},{"name":"hideSideBar","description":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","type":"boolean"},{"name":"openedSidePanel","description":"The name of the opened side panel. 'none' means 'no panel opened'.","type":"string"},{"name":"profile","description":"The profile contains metadata used by the editor for editing context and help.\nExample:\n```\n {\n bundles: [\"core\", \"dataAccess\", \"geometry\", \"portal-access\"],\n variables: [\n {\n name: \"$feature\",\n description: \"The feature passed to the script during execution.\",\n definition: aFeatureLayerInstance\n }\n ]\n }\n```","type":"IEditorProfileDefinition | IPredefinedProfile | undefined"},{"name":"script","description":"The arcade script. Use this property to define or update the script.","type":"string"},{"name":"sideActionBarExpanded","description":"If true, the side action bar will be expanded","type":"boolean"},{"name":"snippets","description":"Collection of snippets","type":"ApiSnippet[] | undefined"},{"name":"suggestions","description":"Collection of suggestions","type":"IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined"},{"name":"testData","description":"Test data used to execute the script in the editor. If undefined the execute script UX will be hidden.","type":"IEditorTestContext | undefined"}],"events":[{"name":"arcgisDiagnosticsChange","type":"Diagnostic[]","description":"Emitted when the diagnostics collection has changed."},{"name":"arcgisScriptChange","type":"string","description":"Emitted when the script string has changed."}]}},{"name":"arcgis-code-editor","description":"### Events\n- **arcgisSelectionChange** - Emitted when the selection has changed.\n- **arcgisValueChange** - Emitted when the value has changed (script, code, css, json, etc.)\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.\n- `insertSnippet(text: string | null | undefined): Promise<void>` - Inserts a snippet at the current position in the editor.\n- `insertText(text: string | null | undefined): Promise<void>` - Inserts a text at the current position in the editor.\n- `setFocus(): Promise<void>` - Sets the focus on the editor.","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-code-editor/","attributes":[{"name":"language","description":"The language for the editor.\nCurrently supported language: arcade, arcgis-sql-expression, json, css, html, javascript, typescript, and text.","value":{"type":"string"}},{"name":"model-id","description":"A unique identifier for the model.\nThe unique identifier is sometimes used by language defaults to store model metadata.\nFor example, with arcade, the model id is used to store the arcade profile and other metadata.\nThe unique identifier is especially useful when there are multiple editors on the same page.","value":{"type":"string"}},{"name":"value","description":"The initial value for the editor.\nThe value is the script, code, css, json, etc.","default":"\"\"","value":{"type":"string"}}],"events":[{"name":"arcgisSelectionChange","type":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","description":"Emitted when the selection has changed."},{"name":"arcgisValueChange","type":"string","description":"Emitted when the value has changed (script, code, css, json, etc.)"}],"js":{"properties":[{"name":"editorInstance","description":"The instance of the Monaco Editor after the component has been rendered.\nTo determine when a component is rendered, you can use componentOnReady() method.\nThe method returns a Promise that resolves after the component rendered for the first time.","type":"Editor.IStandaloneCodeEditor | undefined"},{"name":"editorOptions","description":"Options to update on the editor.\nFor example:\n```json\n{\n \"fontSize\": 18\n}\n```\n\nTo get the full list of options set on the editor, use the editorInstance property and see Monaco Editor options documentation for more details.","type":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined"},{"name":"language","description":"The language for the editor.\nCurrently supported language: arcade, arcgis-sql-expression, json, css, html, javascript, typescript, and text.","type":"string | undefined"},{"name":"modelId","description":"A unique identifier for the model.\nThe unique identifier is sometimes used by language defaults to store model metadata.\nFor example, with arcade, the model id is used to store the arcade profile and other metadata.\nThe unique identifier is especially useful when there are multiple editors on the same page.","type":"`${string}-${string}-${string}-${string}-${string}`"},{"name":"value","description":"The initial value for the editor.\nThe value is the script, code, css, json, etc.","type":"string"}],"events":[{"name":"arcgisSelectionChange","type":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","description":"Emitted when the selection has changed."},{"name":"arcgisValueChange","type":"string","description":"Emitted when the value has changed (script, code, css, json, etc.)"}]}},{"name":"arcgis-code-editor-shell","description":"A layout component for code editors that provides slots for an editor, results panel, side panel, and action bars.\n--\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.\n\n### Slots\n- **top-action-bar** - A slot for placing a top action bar above the editor area.\n- **editor** - A slot for placing the main code editor component.\n- **results-panel** - A slot for placing a results panel below the code editor.\n- **side-panel** - A slot for placing a side panel next to the code editor area.\n- **side-action-bar** - A slot for placing a side action bar next to the side panel.\n\n### CSS Properties\n- **--arcgis-coding-components-border** - The border style for the editor shell * \n- **--arcgis-coding-components-background-color** - The background color for the editor shell * \n- **--arcgis-coding-components-side-action-bar-max-w** - The max width for the side action bar * \n- **--arcgis-coding-components-code-editor-side-panel-w** - The width for the code editor side panel * \n- **--arcgis-coding-components-code-editor-side-panel-max-w** - The max width for the code editor side panel * \n- **--arcgis-coding-components-code-editor-results-panel-max-h** - The max height for the code editor results panel * \n- **--arcgis-coding-components-code-editor-results-panel-h** - The default height for the code editor results panel (preferred over min-h). * ","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-code-editor-shell/","attributes":[],"slots":[{"name":"top-action-bar","description":"A slot for placing a top action bar above the editor area."},{"name":"editor","description":"A slot for placing the main code editor component."},{"name":"results-panel","description":"A slot for placing a results panel below the code editor."},{"name":"side-panel","description":"A slot for placing a side panel next to the code editor area."},{"name":"side-action-bar","description":"A slot for placing a side action bar next to the side panel."}],"events":[],"js":{"properties":[],"events":[]}},{"name":"arcgis-code-viewer","description":"A code viewer component for displaying code snippets.\nSupports syntax highlighting for various programming languages, include arcade and arcgis-sql-expression.\n--\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-code-viewer/","attributes":[{"name":"language","description":"The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.","default":"\"arcade\"","value":{"type":"string"}},{"name":"round","description":"When `true`, adds a round style to the component.","default":"false","value":{"type":"boolean"}}],"events":[],"js":{"properties":[{"name":"language","description":"The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.","type":"string"},{"name":"round","description":"When `true`, adds a round style to the component.","type":"boolean"}],"events":[]}},{"name":"arcgis-sql-expression-editor","description":"The SQL Expression Editor provides a familiar code editor experience for writing your own SQL expressions.\nIt supports syntax highlighting, code completion, and validation, allowing users to write SQL expressions using the\n[standardized SQL functions](https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm) supported by ArcGIS.\n--\n\n### Events\n- **arcgisDiagnosticsChange** - Emitted when the diagnostics collection has changed.\n- **arcgisScriptChange** - Emitted when the script string has changed.\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.\n- `setFocus(): Promise<void>` - Set the focus on the element.","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-sql-expression-editor/","attributes":[{"name":"hide-side-bar","description":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","default":"false","value":{"type":"boolean"}},{"name":"script","description":"The sql expression script. Use this property to define or update the script.","default":"\"\"","value":{"type":"string"}}],"events":[{"name":"arcgisDiagnosticsChange","type":"editor.IMarkerData[]","description":"Emitted when the diagnostics collection has changed."},{"name":"arcgisScriptChange","type":"string","description":"Emitted when the script string has changed."}],"js":{"properties":[{"name":"hideSideBar","description":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","type":"boolean"},{"name":"profile","description":"The profile to use for the editor. The profile defines the variables and functions that are available to the editor.","type":"IPredefinedProfile | undefined"},{"name":"script","description":"The sql expression script. Use this property to define or update the script.","type":"string"}],"events":[{"name":"arcgisDiagnosticsChange","type":"editor.IMarkerData[]","description":"Emitted when the diagnostics collection has changed."},{"name":"arcgisScriptChange","type":"string","description":"Emitted when the script string has changed."}]}}]},"css":{"properties":[{"name":"--arcgis-coding-components-border","description":"The border style for the editor shell *"},{"name":"--arcgis-coding-components-background-color","description":"The background color for the editor shell *"},{"name":"--arcgis-coding-components-side-action-bar-max-w","description":"The max width for the side action bar *"},{"name":"--arcgis-coding-components-code-editor-side-panel-w","description":"The width for the code editor side panel *"},{"name":"--arcgis-coding-components-code-editor-side-panel-max-w","description":"The max width for the code editor side panel *"},{"name":"--arcgis-coding-components-code-editor-results-panel-max-h","description":"The max height for the code editor results panel *"},{"name":"--arcgis-coding-components-code-editor-results-panel-h","description":"The default height for the code editor results panel (preferred over min-h). *"}],"pseudo-elements":[]}}}
|
|
1
|
+
{"$schema":"https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json","name":"@arcgis/coding-components","version":"5.1.0-next.14","description-markup":"markdown","contributions":{"html":{"elements":[{"name":"arcgis-arcade-editor","description":"[**Arcade**](https://developers.arcgis.com/arcade/) is a portable, and lightweight expression language used to create custom content throughout the [ArcGIS system](https://www.esri.com/en-us/arcgis/products/index).\nLike other expression languages, it can perform mathematical calculations, format text, and evaluate logical statements.\nIt also supports multi-statement expressions, variables, and flow control statements. Arcade is unique when compared to other expression and scripting languages due to its inclusion of [feature](https://developers.arcgis.com/arcade/guide/types/#feature) and [geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) data types.\n\nMap Viewer (MV) was the first ArcGIS Online product to incorporate the new Arcade editor after [the editor's introduction in the November 2022 ArcGIS Online release](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/introducing-the-new-arcade-editor-in-arcgis-online/).\nThis was possible thanks to the Arcade editor component, which enabled MV to implement its own Arcade expression builder.\nYou can now also find the editor in ArcGIS Dashboards, ArcGIS Field Maps, and ArcGIS Velocity.\n\nYou can easily get your own dedicated Arcade expression builder with the **Arcade editor** component, which includes:\n\n- An easy to use [layout](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#the-new-layout)\n- An optional minimal layout if you, for example, decide to manually exclude things such as test data, padding, line numbers, and the sidebar\n- A way to execute Arcade expressions in a configurable code editor\n- [Suggestions and code completion](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#suggestions-and-code-completion)\n- [WCAG 2.0 compliant code colorization / syntax highlighting](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/accessibility-and-arcade-working-in-color/)\n- Built-in [keyboard shortcuts](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#keyboard-shortcuts)\n- In-editor help for finding information about profile variables relevant to your profile, documentation for constants and functions, a link to the official Arcade documentation, and, in some case, suggestions.\n- Support for many [languages and directionality](https://developers.arcgis.com/javascript/latest/localization/)\n--\n\n### Events\n- **arcgisDiagnosticsChange** - Emitted when the diagnostics collection has changed.\n- **arcgisScriptChange** - Emitted when the script string has changed.\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.\n- `getTestResult(): Promise<ArcadeResult>` - Returns the Arcade result for the script for the provided test data.\n- `setFocus(): Promise<void>` - Set the focus on the element.","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-arcade-editor/","attributes":[{"name":"hide-documentation-actions","description":"If true, it will hide the documentation action in the side panel","default":"false","value":{"type":"boolean"}},{"name":"hide-side-bar","description":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","default":"false","value":{"type":"boolean"}},{"name":"opened-side-panel","description":"The name of the opened side panel. 'none' means 'no panel opened'.","default":"\"none\"","value":{"type":"string"}},{"name":"script","description":"The arcade script. Use this property to define or update the script.","default":"\"\"","value":{"type":"string"}},{"name":"side-action-bar-expanded","description":"If true, the side action bar will be expanded","default":"false","value":{"type":"boolean"}}],"events":[{"name":"arcgisDiagnosticsChange","type":"Diagnostic[]","description":"Emitted when the diagnostics collection has changed."},{"name":"arcgisScriptChange","type":"string","description":"Emitted when the script string has changed."}],"js":{"properties":[{"name":"arcadeAssistant","description":"enables and configures the arcade assistant","type":"ArcadeAssistantConfig | undefined"},{"name":"customPanels","description":"Custom panels to be displayed in the side panel.\nWill be placed below the default panels but above the help panel.","type":"ICustomPanel[] | undefined"},{"name":"editorOptions","description":"Options to update on the editor.\nFor example:\n```json\n{\n \"fontSize\": 18\n}\n```\n\nTo get the full list of available options, see the Monaco Editor options [documentation](https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor_editor_api.editor.IEditorOptions.html) for more details.","type":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined"},{"name":"hideDocumentationActions","description":"If true, it will hide the documentation action in the side panel","type":"boolean"},{"name":"hideSideBar","description":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","type":"boolean"},{"name":"openedSidePanel","description":"The name of the opened side panel. 'none' means 'no panel opened'.","type":"string"},{"name":"profile","description":"The profile contains metadata used by the editor for editing context and help.\nExample:\n```\n {\n bundles: [\"core\", \"dataAccess\", \"geometry\", \"portal-access\"],\n variables: [\n {\n name: \"$feature\",\n description: \"The feature passed to the script during execution.\",\n definition: aFeatureLayerInstance\n }\n ]\n }\n```","type":"IEditorProfileDefinition | IPredefinedProfile | undefined"},{"name":"script","description":"The arcade script. Use this property to define or update the script.","type":"string"},{"name":"sideActionBarExpanded","description":"If true, the side action bar will be expanded","type":"boolean"},{"name":"snippets","description":"Collection of snippets","type":"ApiSnippet[] | undefined"},{"name":"suggestions","description":"Collection of suggestions","type":"IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined"},{"name":"testData","description":"Test data used to execute the script in the editor. If undefined the execute script UX will be hidden.","type":"IEditorTestContext | undefined"}],"events":[{"name":"arcgisDiagnosticsChange","type":"Diagnostic[]","description":"Emitted when the diagnostics collection has changed."},{"name":"arcgisScriptChange","type":"string","description":"Emitted when the script string has changed."}]}},{"name":"arcgis-code-editor","description":"### Events\n- **arcgisSelectionChange** - Emitted when the selection has changed.\n- **arcgisValueChange** - Emitted when the value has changed (script, code, css, json, etc.)\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.\n- `insertSnippet(text: string | null | undefined): Promise<void>` - Inserts a snippet at the current position in the editor.\n- `insertText(text: string | null | undefined): Promise<void>` - Inserts a text at the current position in the editor.\n- `setFocus(): Promise<void>` - Sets the focus on the editor.","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-code-editor/","attributes":[{"name":"language","description":"The language for the editor.\nCurrently supported language: arcade, arcgis-sql-expression, json, css, html, javascript, typescript, and text.","value":{"type":"string"}},{"name":"model-id","description":"A unique identifier for the model.\nThe unique identifier is sometimes used by language defaults to store model metadata.\nFor example, with arcade, the model id is used to store the arcade profile and other metadata.\nThe unique identifier is especially useful when there are multiple editors on the same page.","value":{"type":"string"}},{"name":"value","description":"The initial value for the editor.\nThe value is the script, code, css, json, etc.","default":"\"\"","value":{"type":"string"}}],"events":[{"name":"arcgisSelectionChange","type":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","description":"Emitted when the selection has changed."},{"name":"arcgisValueChange","type":"string","description":"Emitted when the value has changed (script, code, css, json, etc.)"}],"js":{"properties":[{"name":"editorInstance","description":"The instance of the Monaco Editor after the component has been rendered.\nTo determine when a component is rendered, you can use componentOnReady() method.\nThe method returns a Promise that resolves after the component rendered for the first time.","type":"Editor.IStandaloneCodeEditor | undefined"},{"name":"editorOptions","description":"Options to update on the editor.\nFor example:\n```json\n{\n \"fontSize\": 18\n}\n```\n\nTo get the full list of options set on the editor, use the editorInstance property and see Monaco Editor options documentation for more details.","type":"Editor.IEditorOptions & Editor.IGlobalEditorOptions | undefined"},{"name":"language","description":"The language for the editor.\nCurrently supported language: arcade, arcgis-sql-expression, json, css, html, javascript, typescript, and text.","type":"string | undefined"},{"name":"modelId","description":"A unique identifier for the model.\nThe unique identifier is sometimes used by language defaults to store model metadata.\nFor example, with arcade, the model id is used to store the arcade profile and other metadata.\nThe unique identifier is especially useful when there are multiple editors on the same page.","type":"`${string}-${string}-${string}-${string}-${string}`"},{"name":"value","description":"The initial value for the editor.\nThe value is the script, code, css, json, etc.","type":"string"}],"events":[{"name":"arcgisSelectionChange","type":"{\n selection: Selection;\n model: Editor.ITextModel | null | undefined;\n}","description":"Emitted when the selection has changed."},{"name":"arcgisValueChange","type":"string","description":"Emitted when the value has changed (script, code, css, json, etc.)"}]}},{"name":"arcgis-code-editor-shell","description":"A layout component for code editors that provides slots for an editor, results panel, side panel, and action bars.\n--\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.\n\n### Slots\n- **top-action-bar** - A slot for placing a top action bar above the editor area.\n- **editor** - A slot for placing the main code editor component.\n- **results-panel** - A slot for placing a results panel below the code editor.\n- **side-panel** - A slot for placing a side panel next to the code editor area.\n- **side-action-bar** - A slot for placing a side action bar next to the side panel.\n\n### CSS Properties\n- **--arcgis-coding-components-border** - The border style for the editor shell * \n- **--arcgis-coding-components-background-color** - The background color for the editor shell * \n- **--arcgis-coding-components-side-action-bar-max-w** - The max width for the side action bar * \n- **--arcgis-coding-components-code-editor-side-panel-w** - The width for the code editor side panel * \n- **--arcgis-coding-components-code-editor-side-panel-max-w** - The max width for the code editor side panel * \n- **--arcgis-coding-components-code-editor-results-panel-max-h** - The max height for the code editor results panel * \n- **--arcgis-coding-components-code-editor-results-panel-h** - The default height for the code editor results panel (preferred over min-h). * ","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-code-editor-shell/","attributes":[],"slots":[{"name":"top-action-bar","description":"A slot for placing a top action bar above the editor area."},{"name":"editor","description":"A slot for placing the main code editor component."},{"name":"results-panel","description":"A slot for placing a results panel below the code editor."},{"name":"side-panel","description":"A slot for placing a side panel next to the code editor area."},{"name":"side-action-bar","description":"A slot for placing a side action bar next to the side panel."}],"events":[],"js":{"properties":[],"events":[]}},{"name":"arcgis-code-viewer","description":"A code viewer component for displaying code snippets.\nSupports syntax highlighting for various programming languages, include arcade and arcgis-sql-expression.\n--\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-code-viewer/","attributes":[{"name":"language","description":"The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.","default":"\"arcade\"","value":{"type":"string"}},{"name":"round","description":"When `true`, adds a round style to the component.","default":"false","value":{"type":"boolean"}}],"events":[],"js":{"properties":[{"name":"language","description":"The language for the component.\nCurrently supported language: arcade, arcgis-sql-expression, plus all the following languages found in monaco-editor's repo:\nhttps://github.com/microsoft/monaco-editor/tree/main/src/basic-languages.\n\nNote: The number of supported languages is limited in cdn builds to reduce package size. In cdn builds,\nonly the following languages are supported: css, html, javascript, typescript, and arcade, arcgis-sql-expression.","type":"string"},{"name":"round","description":"When `true`, adds a round style to the component.","type":"boolean"}],"events":[]}},{"name":"arcgis-sql-expression-editor","description":"The SQL Expression Editor provides a familiar code editor experience for writing your own SQL expressions.\nIt supports syntax highlighting, code completion, and validation, allowing users to write SQL expressions using the\n[standardized SQL functions](https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm) supported by ArcGIS.\n--\n\n### Events\n- **arcgisDiagnosticsChange** - Emitted when the diagnostics collection has changed.\n- **arcgisScriptChange** - Emitted when the script string has changed.\n\n### Methods\n- `componentOnReady(): Promise<this>` - Creates a promise that resolves once the component is fully loaded.\n- `setFocus(): Promise<void>` - Set the focus on the element.","doc-url":"https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-sql-expression-editor/","attributes":[{"name":"hide-side-bar","description":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","default":"false","value":{"type":"boolean"}},{"name":"script","description":"The sql expression script. Use this property to define or update the script.","default":"\"\"","value":{"type":"string"}}],"events":[{"name":"arcgisDiagnosticsChange","type":"editor.IMarkerData[]","description":"Emitted when the diagnostics collection has changed."},{"name":"arcgisScriptChange","type":"string","description":"Emitted when the script string has changed."}],"js":{"properties":[{"name":"hideSideBar","description":"If true, it will hide the side actions bar. The editor will be in a minimalistic UX.","type":"boolean"},{"name":"profile","description":"The profile to use for the editor. The profile defines the variables and functions that are available to the editor.","type":"IPredefinedProfile | undefined"},{"name":"script","description":"The sql expression script. Use this property to define or update the script.","type":"string"}],"events":[{"name":"arcgisDiagnosticsChange","type":"editor.IMarkerData[]","description":"Emitted when the diagnostics collection has changed."},{"name":"arcgisScriptChange","type":"string","description":"Emitted when the script string has changed."}]}}]},"css":{"properties":[{"name":"--arcgis-coding-components-border","description":"The border style for the editor shell *"},{"name":"--arcgis-coding-components-background-color","description":"The background color for the editor shell *"},{"name":"--arcgis-coding-components-side-action-bar-max-w","description":"The max width for the side action bar *"},{"name":"--arcgis-coding-components-code-editor-side-panel-w","description":"The width for the code editor side panel *"},{"name":"--arcgis-coding-components-code-editor-side-panel-max-w","description":"The max width for the code editor side panel *"},{"name":"--arcgis-coding-components-code-editor-results-panel-max-h","description":"The max height for the code editor results panel *"},{"name":"--arcgis-coding-components-code-editor-results-panel-h","description":"The default height for the code editor results panel (preferred over min-h). *"}],"pseudo-elements":[]}}}
|
package/dist/loader.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { r as e } from "./chunks/runtime.js";
|
|
3
3
|
import { makeDefineCustomElements as s } from "@arcgis/lumina";
|
|
4
4
|
const o = s(e, {
|
|
5
|
-
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],
|
|
5
|
+
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],
|
|
6
6
|
"arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],
|
|
7
7
|
"arcgis-arcade-results": [() => import("./components/arcgis-arcade-results/customElement.js"), "calciteModeDark,consoleLogs:,loading,openedResultPanel,result:"],
|
|
8
8
|
"arcgis-arcade-suggestions": [() => import("./components/arcgis-arcade-suggestions/customElement.js"), "closed,suggestions:"],
|
|
@@ -11,4 +11,6 @@ export type ArcadeAssistantConfig = {
|
|
|
11
11
|
* Typically you will not need to provide this, granted that you have set `esriConfig.applicationName` in your app.
|
|
12
12
|
*/
|
|
13
13
|
appVersion?: string;
|
|
14
|
+
/** The assistant will by default log all question/answer interactions. Set this to true to disable logging. */
|
|
15
|
+
disableQuestionAnswerLogging?: boolean;
|
|
14
16
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type Field from "@arcgis/core/layers/support/Field.js";
|
|
2
2
|
import type KnowledgeGraph from "@arcgis/core/rest/knowledgeGraph/KnowledgeGraph.js";
|
|
3
|
-
import type { GeometryUnion } from "@arcgis/core/
|
|
3
|
+
import type { GeometryUnion } from "@arcgis/core/geometry/types.js";
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
export interface IArcadeRuntimeDictionary {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.14",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"monaco-editor": "^0.55.1",
|
|
48
48
|
"tslib": "^2.8.1",
|
|
49
49
|
"vscode-languageserver-types": "^3.17.5",
|
|
50
|
-
"@arcgis/arcade-languageservice": "5.1.0-next.
|
|
51
|
-
"@arcgis/languages-api-utils": "5.1.0-next.
|
|
52
|
-
"@arcgis/
|
|
53
|
-
"@arcgis/
|
|
50
|
+
"@arcgis/arcade-languageservice": "5.1.0-next.14",
|
|
51
|
+
"@arcgis/languages-api-utils": "5.1.0-next.14",
|
|
52
|
+
"@arcgis/toolkit": "5.1.0-next.14",
|
|
53
|
+
"@arcgis/lumina": "5.1.0-next.14"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@arcgis/core": "^5.0.0-next",
|
package/dist/cdn/2ORJ3A7K.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as oe}from"./ZYS253RG.js";import"./MP6Z45SA.js";import b from"./VD5UOV5M.js";import"./P5D2YYFD.js";import a from"./HVHTW7TF.js";import{d as ce}from"./IFNCCZ7O.js";import{c as ne,d as re}from"./QWLPT7LO.js";import"./NKCYMRE4.js";import"./BQLG62QR.js";import"./WMLTLTIE.js";import"./UYBZWFE5.js";import{A as X,B as Z,C as U,D as ee,E as te,F as ie,G as ae,H as O,J as se,h as W,j as p,k as P,l as _,s as K,v as N,w as q,x as D,y as I,z as k}from"./EMMNZESW.js";import{a as T}from"./BCUUVBXH.js";import"./YLN7EMJC.js";import"./GHSEU7VA.js";import"./4OSKRQ5X.js";import"./NG7S6FUK.js";import"./3TTFCHAA.js";export default $arcgis.t(([Se,pe,Te,Ae,Ce,{getDeclaredVoxelMembers:Ie,getDeclaredPixelMembers:Me},Ee,{property:w,subclass:Re},{g:le,h:F},z])=>{var de=(t,e,i)=>{let a=new Map;for(let s=e;s<=i;s++)a.set(t[s],s);return a},L=q(class extends D{constructor(t){if(super(t),t.type!==N.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let a;i===void 0?i=e:e!==void 0&&(a=e);let s=[],n=[],l=0;for(let d of t)s[l]=a?a(d,l):l,n[l]=i(d,l),l++;return{values:n,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,a]){let s=Z(t),{values:n,keys:l}=this.dt(e,i,a);if(!Array.isArray(s))return this.ut=l,n;let d=this.ut??=[],c=[],o,g,r=0,u=s.length-1,m=0,h=n.length-1;for(;r<=u&&m<=h;)if(s[r]===null)r++;else if(s[u]===null)u--;else if(d[r]===l[m])c[m]=k(s[r],n[m]),r++,m++;else if(d[u]===l[h])c[h]=k(s[u],n[h]),u--,h--;else if(d[r]===l[h])c[h]=k(s[r],n[h]),I(t,c[h+1],s[r]),r++,h--;else if(d[u]===l[m])c[m]=k(s[u],n[m]),I(t,s[r],s[u]),u--,m++;else if(o===void 0&&(o=de(l,m,h),g=de(d,r,u)),o.has(d[r]))if(o.has(d[u])){let f=g.get(l[m]),S=f!==void 0?s[f]:null;if(S===null){let v=I(t,s[r]);k(v,n[m]),c[m]=v}else c[m]=k(S,n[m]),I(t,s[r],S),s[f]=null;m++}else U(s[u]),u--;else U(s[r]),r++;for(;m<=h;){let f=I(t,c[h+1]);k(f,n[m]),c[m++]=f}for(;r<=u;){let f=s[r++];f!==null&&U(f)}return this.ut=l,X(t,c),P}});var R=class extends D{constructor(e){if(super(e),this.it=_,e.type!==N.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===_||e==null)return this._t=void 0,this.it=e;if(e===P)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let i=[e];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}};R.directiveName="unsafeHTML",R.resultType=1;var V=q(R);var Ve=W`:host(:not([closed])){container-type:size;--calcite-block-border-color: var(--calcite-color-transparent);box-sizing:border-box;.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}@container (max-width: 380px){.hidden-below-380{display:none}}@container (min-width: 380px){.hidden-above-380{display:none}}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.feedback-content{padding:var(--calcite-spacing-sm);display:flex;flex-direction:column;max-height:75cqb;overflow-y:auto;>*{margin-block-end:.5rem}>*:last-child,.terms-label{margin-block-end:0}calcite-text-area{--calcite-text-area-min-height: 4rem}calcite-notice{margin-block-start:0}}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}.feedback-footer{display:flex;justify-content:flex-end;gap:.5rem;width:100%}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}calcite-list-item calcite-button{margin-inline-end:.25rem}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none;flex-direction:column}calcite-text-area{height:auto;overflow:hidden;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.contained-popover-or-tooltip{--calcite-popover-max-size-x: 100%;--calcite-tooltip-max-size-x: 100%}.info-heading{font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-1);margin:0}.info-heading-row{display:flex;align-items:center;gap:var(--calcite-spacing-sm);flex-wrap:wrap}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.suggestions{display:flex;flex-direction:row;gap:var(--calcite-spacing-xs);flex-wrap:wrap}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=heading] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}.contained{max-width:100%;max-height:100%;max-width:100cqi;max-height:75cqb;overflow-y:auto}.submission-notice{--calcite-notice-border-color: transparent;margin-block:0;width:100%;--calcite-font-size-relative-base: var(--calcite-font-size--2)}.border-block-end{border-block-end:1px solid var(--calcite-color-border-3)}.round-top{border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0}}:host([closed]){display:none}`,A=class extends Error{constructor({message:e,code:i,subCode:a,details:s,source:n}){super(e),this.name="ArcadeAssistantError",this.code=i,this.subCode=a,this.details=s,this.source=n}};function ue(t){if(!t)return;let e=t.indexOf('{"error":');if(e!==-1)try{let i=t.slice(e),a=JSON.parse(i);if(a&&typeof a=="object"&&a.error)return a.error}catch{return}}async function Pe(t){let{baseUrl:e,skillId:i,message:a,authToken:s,previousConversationId:n,context:l}=t,d=i?`${e}/skills/${i}/chat`:`${e}/chat`,c=[],o={message:a,context:l};n&&(o.conversation_id=n);let g;try{g=await pe(d,{method:"post",headers:{"Content-Type":"application/json",token:s},body:JSON.stringify(o),responseType:"json"})}catch(v){let $=v,C=$.details?.rawResponse||$.message||String(v),M=ue(C);throw M?new A(M):v}let r=g.data;c.push(r);let u=r.conversationId,m=r.inquiryId,h=r.sequenceNumber;async function f(){let v=0,$=100;for(;v<$;){await new Promise(E=>setTimeout(E,1e3));let C=Ne(u,h,m),M;try{M=await pe(d,{method:"post",headers:{"Content-Type":"application/json",token:s},body:JSON.stringify(C),responseType:"json"})}catch(E){let J=E,ke=J.details?.rawResponse||J.message||String(E),Y=ue(ke);throw Y?new A(Y):E}let x=M.data;if(x.context?.kind==="ArcgisErrorAsContext"&&x.context.error)throw new A({message:x.context.error.message||"ArcGIS Assistant error",code:x.context.error.code,subCode:x.context.error.subCode,details:x.context.error.details,source:"polling-response"});if(c.push(x),h=x.sequenceNumber,v++,!x.hasMore)break}if(v===$)throw new A({message:"Request timed out",code:"TIMEOUT",source:"polling"})}let S=120*1e3;return await Promise.race([f(),new Promise((v,$)=>setTimeout(()=>$(new A({message:"Request timed out",code:"TIMEOUT",source:"hard-timeout"})),S))]),c}function Ne(t,e,i){return{conversationId:t,inquiryId:i,ackSequenceNumber:e}}function qe(t){return t.message.match(/Error in prompt shield/u)?"I'm having trouble with this request. Try again by rephrasing the question.":t.code==="TIMEOUT"?"Request timed out. Try again by re-asking the same question or rephrasing it.":t.message}var De=({notices:t})=>t.length?p`<div class="border-block-end">${L(t,e=>e.id??e.title,e=>p`<calcite-notice class="submission-notice" .icon=${e.icon} .kind=${e.kind} scale=s open .closable=${e.closable} @calciteNoticeClose=${()=>e.onClose?.()}><div slot=title>${e.title}</div>${e.message&&p`<div slot=message>${e.message}</div>`||""}${e.actionLinkMessage&&e.onAction&&p`<calcite-link slot=link @click=${()=>e.onAction?.()}>${e.actionLinkMessage}</calcite-link>`||""}</calcite-notice>`)}</div>`:null,Ue=t=>{let e=t.value.length,i=72,a=180,s=t.offsetWidth,n=Math.max(1,Math.floor(s/8)),l=Math.ceil(e/n),d=i+(l-2)*24;t.style.setProperty("--calcite-text-area-min-height",`${Math.min(d,a)}px`)},Oe=({promptValidationMessage:t,errorMessage:e,contextTooBig:i,contextReducedNoticeDismissed:a,setContextReducedNoticeDismissed:s,setErrorMessage:n,messages:l})=>{let d=[];if(t&&d.push({id:"prompt-validation",kind:"danger",icon:"exclamation-mark-triangle",title:t,closable:!0}),e&&d.push({id:"assistant-error",kind:"danger",icon:"exclamation-mark-triangle",title:e,closable:!0,onClose:()=>n(void 0)}),i&&!a){let c=l.contextreduced??"Context reduced",o=l.contextreducedmessage??"The editor profile is too large for the assistant. It has been reduced in the assistant in order to ensure a successful request.";d.push({id:"context-reduced",kind:"warning",icon:"exclamation-mark-triangle",title:c,message:o,closable:!0,onClose:()=>s(!0)})}return d};function _e({messages:t}){return p`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${t.beta??"Beta"}>${t.beta??"Beta"}</calcite-chip>`}function Fe({popoverContent:t,messages:e}){return p`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer .label=${e.legaldisclaimer??"Legal disclaimer"} placement=bottom auto-close focus-trap-disabled><div class="contained">${t}</div></calcite-popover>`}function ze({errorMessage:t,slot:e}){return p`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e??O}>${t}</calcite-input-message></div>`}function Le({active:t,setActive:e,messages:i}){return p`<calcite-alert slot=alerts .open=${t} placement=bottom kind=success icon=check-circle-f auto-close @calciteAlertClose=${()=>e(!1)} .label=${i.expressionapplied??"Expression applied"}><div slot=message>${i.expressionapplied??"Expression applied to editor."}</div></calcite-alert>`}function Be({context:t,messages:e}){return t?p`<div class="gaps">${t.profileId&&p`<calcite-popover auto-close placement=top .label=${(e.profilecontextlabel??"Profile context: {profileId}").replace("{profileId}",t.profileId)} reference-element=profile-context-button class="context-popover contained-popover-or-tooltip"><p>${(e.profilecontextlabel??"Profile context: {profileId}").replace("{profileId}",t.profileId)}</p></calcite-popover><calcite-button round kind=neutral icon-start=map-information id=profile-context-button scale=s></calcite-button>`||""}</div>`:null}function je({isDisabled:t,isReadOnly:e,setQuestion:i,setIsViewingResult:a,textAreaRef:s,question:n,errorMessage:l,setErrorMessage:d,promptValidationMessage:c,setPromptValidationMessage:o,submitQuestion:g,messages:r,mode:u,assistantRef:m,context:h,contextReducedNoticeDismissed:f,setContextReducedNoticeDismissed:S}){let v=h?.contextTooLarge??!1,$=Oe({promptValidationMessage:c,errorMessage:l,contextTooBig:v,contextReducedNoticeDismissed:f,setContextReducedNoticeDismissed:S,setErrorMessage:d,messages:r});return p`<div class="text-area-wrapper">${De({notices:$})}<calcite-text-area scale=s resize=vertical .readOnly=${t||e} class=${ae($.length?"submission-text-area":"submission-text-area round-top")} .placeholder=${r.askaquestion??`Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${n} @calciteTextAreaInput=${C=>{Ue(C.target),i(C.target.value)}} ${te(s)}><div class="submission-actions-wrapper" slot=footer-start><div class="submission-actions">${h&&Be({context:h,messages:r})||""}<div class="align-inline-end gaps"><calcite-button round kind=neutral .hidden=${u!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid scale=s .disabled=${t} @click=${async()=>{a(!1),i("")}} .label=${r.startover??"Start Over"} class="hidden-above-380" id=small-start-over-button></calcite-button><calcite-tooltip reference-element=small-start-over-button placement=top-start class="hidden-above-380">${r.startover??"Start Over"}</calcite-tooltip><calcite-button round kind=neutral .hidden=${u!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${t} @click=${async()=>{a(!1),i("")}} class="hidden-below-380" scale=s>${r.startover??"Start Over"}</calcite-button><calcite-button round scale=s icon-end=effects appearance=solid .loading=${t} .disabled=${t} @click=${async()=>{if(d(""),!n){o(r.enteraprompt??"Please enter a prompt");return}o(void 0),await g()}} class="hidden-below-380">${u==="prompt"?r.ask??"Generate":r.refine??"Refine"}</calcite-button><calcite-button round scale=s icon-end=effects appearance=solid .loading=${t} .disabled=${t} id=small-submit-button @click=${async()=>{if(d(""),!n){o(r.enteraprompt??"Please enter a prompt");return}o(void 0),await g()}} class="hidden-above-380" .label=${u==="prompt"?r.ask??"Generate":r.refine??"Refine"}></calcite-button><calcite-tooltip reference-element=small-submit-button placement=top-start class="hidden-above-380">${u==="prompt"?r.ask??"Generate":r.refine??"Refine"}</calcite-tooltip></div></div></div></calcite-text-area></div>`}var He="https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement",Qe="https://www.esri.com/en-us/privacy/privacy-statements";function Ge({setOpen:t,messages:e,feedback:i,learnMoreUrl:a,setFeedback:s,onSubmit:n}){return i.active?p`<calcite-sheet class="feedback-sheet" .label=${e.feedback??"Feedback"} slot=sheets display-mode=float position=block-end .open=${i.active} @calciteSheetClose=${()=>t(!1)}><calcite-panel .heading=${e.submitfeedback??"Submit feedback to Esri"} scale=s><div class="feedback-content"><calcite-text-area scale=s resize=vertical .value=${i.text} @calciteTextAreaInput=${l=>s({...i,text:l.target.value})} .disabled=${i.submitting} .placeholder=${e.donotincludepersonalinfo??"Do not include personal or sensitive information"} rows=3></calcite-text-area><calcite-label layout=inline scale=s class="terms-label"><calcite-checkbox scale=l .checked=${i.termsAccepted} @calciteCheckboxChange=${l=>{s({...i,termsAccepted:l.target.checked})}} .disabled=${i.submitting}></calcite-checkbox><span>${V((e.agreement??"I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}",`<calcite-link href=${Qe} target="_blank">${e.esriprivacystatement??"Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}",`<calcite-link href=${He} target="_blank">${e.supplement??"Supplement"}</calcite-link>`))}</span></calcite-label><calcite-notice scale=s open closable><span slot=message>${V((e.feedbackhelps??"Your feedback will be used to improve Esri products and services. {LearnMore} about how this data is used.").replace("{LearnMore}",`<calcite-link href=${a} target="_blank">${e.learnmore??"Learn more"}</calcite-link>`))}</span></calcite-notice></div><div slot=footer class="feedback-footer"><calcite-button kind=neutral appearance=outline @click=${()=>t(!1)} .disabled=${i.submitting}>${e.cancel??"Cancel"}</calcite-button><calcite-button @click=${n} .disabled=${!i.termsAccepted||i.submitting} .loading=${i.submitting} data-testid=submit-feedback-button>${e.submit??"Submit"}</calcite-button></div></calcite-panel></calcite-sheet>`:null}function me({assistantsEnabled:t,messages:e,slot:i,helpTopicUrl:a}){return p`<calcite-block .label=${e.assistantinformation??"Assistant information"} slot=${i??O} expanded class="info-block" scale=s><div class="info-heading-row"><h1 class="info-heading">${e.introducing??"Introducing Arcade Assistant (beta)"}</h1><calcite-chip .label=${e.new??"New"} kind=brand scale=s>${e.new??"New"}</calcite-chip></div>${t?p`<p>${e.capabilities??"The assistant uses artificial intelligence to generate Arcade expressions."}</p><p>${e.keepinmind??"Keep in mind the following:"}<ul><li>${e.beconsise??"Be concise, but also clear in your request"}</li><li>${e.avoidambiguity??"Avoid ambiguity and vagueness"}</li><li>${e.moredetails??"you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${V((e.seedocumentation??"Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}",`<calcite-link href=${a} target="_blank">${e.documentation??"documentation"}</calcite-link>`))}</p>`:p`<p>${e.useofassistant??"The assistant uses artificial intelligence to generate Arcade expressions. To enable Arcade Assistant (beta), the following must be true:"}</p><ul><li>${e.enabledinorg??"AI assistants are enabled in the organization settings"}</li><li>${e.enabledbetaapps??"Beta apps and capabilities are not blocked"}</li><li>${e.enabledroleprivilege??"Your role privilege allows you to use AI assistants"}</li></ul>`}</calcite-block>`}function Je({messages:t,onProceed:e,onExit:i,helpTopicUrl:a}){return p`<calcite-dialog close-disabled placement=top .heading=${t.welcome??"Welcome to the new assistant experience"} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${t.beforeyougetstarted??"Before you get started be aware:"}</h3><ul><li>${t.maybeincorrect??"AI generated code may occasionally be incorrect or biased. Review carefully."}</li><li>${V((t.pleasereadhelp??"Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.").replace("{helpTopic}",`<calcite-link href=${a} target="_blank">${t.helptopic??"help topic"}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${t.proceed??"Proceed"}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${i} kind=neutral>${t.exit??"Exit"}</calcite-button></calcite-dialog>`}function Ye({messages:t,suggestions:e,onSuggestionClick:i}){return p`<calcite-block .heading=${t.promptsuggestions} expanded collapsible id=suggestion-block scale=s><div class="suggestions">${e.map(a=>p`<calcite-button round scale=s appearance=outline-fill kind=neutral .label=${t.promptsuggestion} class="suggestion-button" @click=${()=>i?.(a)}>${a}</calcite-button>`)}</div></calcite-block>`}var he=200;function ge({hidden:t=!1,expanded:e=!1,messages:i,cards:a,heading:s,collapsible:n=!1,showEffectsIcon:l=!1,onCopyCode:d,standalone:c}){return p`<calcite-block .hidden=${t} id=result-block .heading=${s??i.besteffort??"Here is the assistant's best effort"} .expanded=${e} .collapsible=${n}>${l&&p`<calcite-chip .label=${i.assistantresponses??"Assistant responses"} slot=content-start icon=effects scale=m class="suggestion-chips"></calcite-chip>`||""}<calcite-card-group .label=${i.assistantresponses??"Assistant responses"}>${L(a,o=>o.conversationId,o=>p`<calcite-card><div slot=heading><div class="prior-prompt"><span>${o.priorPrompt.length>he?`${o.priorPrompt.slice(0,he)}...`:o.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${o.conversationId}-${c?"standalone":"list"}`} @click=${g=>{let r=g.currentTarget;navigator.clipboard.writeText(o.priorPrompt).then(()=>{r.setAttribute("data-copied","true"),setTimeout(()=>r.removeAttribute("data-copied"),1500)})}}></calcite-action><calcite-popover .referenceElement=${`copy-prompt-${o.conversationId}-${c?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${i.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${i.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-prompt-${o.conversationId}-${c?"standalone":"list"}`} placement=top-start class="copy-tooltip">${i.copyprompttoclipboard??"Copy prompt to clipboard"}</calcite-tooltip></div>${o.message&&c&&p`<div class="response-error-container">${ze({errorMessage:o.message})}</div>`||""}</div><div><div class="code-response-wrapper"><div class="positioned-code-content"><calcite-chip-group .label=${i.responsecontext??"Response Context"} scale=s>${o.message&&!c&&p`<calcite-tooltip .referenceElement=${`response-chip-${o.conversationId}-error`} placement=top-start>${o.message}</calcite-tooltip><calcite-chip .id=${`response-chip-${o.conversationId}-error`} .label=${i.error??"Error"} scale=s appearance=outline icon=exclamation-mark-triangle-f class="response-error-chip"></calcite-chip>`||""}${We({card:o,messages:i})}</calcite-chip-group></div><details class="collapsible-code" open><summary>Code response</summary><arcgis-code-viewer language=arcade round>${o.code}</arcgis-code-viewer></details></div></div><div slot=footer-start class="feedback-actions"><calcite-button class="add-to-editor-button hidden-above-380" @click=${()=>o.onAddToEditor("add")} scale=s icon-start=plus round .label=${i.addtoeditor??"Add to editor"} .id=${`add-to-editor-button-${o.conversationId}-${c?"standalone":"list"}`}></calcite-button><calcite-tooltip class="hidden-above-380" .referenceElement=${`add-to-editor-button-${o.conversationId}-${c?"standalone":"list"}`} placement=top-start>${i.addtoeditor??"Add to editor"}</calcite-tooltip><calcite-button class="add-to-editor-button hidden-below-380" @click=${()=>o.onAddToEditor("add")} scale=s icon-start=plus round>${i.addtoeditor??"Add to editor"}</calcite-button><calcite-button round icon-start=file-code kind=neutral scale=s @click=${()=>o.onAddToEditor("replace")} class="response-secondary-action-button" .id=${`replace-${o.conversationId}-${c?"standalone":"list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${o.conversationId}-${c?"standalone":"list"}`} placement=top-start><span>${i.replaceineditor??"Replace all code in editor"}</span></calcite-tooltip><calcite-button round icon-start=copy-to-clipboard kind=neutral scale=s @click=${g=>{let r=g.currentTarget;d(o.code).then(()=>{r.setAttribute("data-copied","true"),setTimeout(()=>r.removeAttribute("data-copied"),1500)})}} class="response-secondary-action-button" .id=${`copy-response-${o.conversationId}-${c?"standalone":"list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${o.conversationId}-${c?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${i.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${i.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-response-${o.conversationId}-${c?"standalone":"list"}`} placement=top-start class="copy-tooltip">${i.copytoclipboard??"Copy code to clipboard"}</calcite-tooltip></div><div slot=footer-end class="feedback-actions"><calcite-action .text=${i.thumbsup??"Thumbs up"} scale=s icon=thumbs-up @click=${o.onThumbsUp} .id=${`thumbs-up-${o.conversationId}-${c?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${o.conversationId}-${c?"standalone":"list"}`} placement=top-start><span>${i.helpful??"Helpful"}</span></calcite-tooltip><calcite-action .text=${i.thumbsdown??"Thumbs down"} scale=s icon=thumbs-down @click=${o.onThumbsDown} .id=${`thumbs-down-${o.conversationId}-${c?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${o.conversationId}-${c?"standalone":"list"}`} placement=top-start><span>${i.unhelpful??"Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`}var We=({card:t,messages:e})=>{let i=K(),a=`response-chip-profile-${t.conversationId}-${i}`,s=(e.profilecontextlabel??"Profile context: {profileId}").replace("{profileId}",t.profileId);return p`<calcite-tooltip .referenceElement=${a} placement=top-start class="contained-popover-or-tooltip">${s}</calcite-tooltip><calcite-chip .label=${t.profileId} scale=s appearance=outline icon=map-information id=${a??O}>${t.profileId}</calcite-chip>`},be=t=>t.type==="featureSet",B=t=>{if(!le(t))return[];let e=[];return t.relationships?.forEach(i=>{e.push(i.toJSON())}),e},j=t=>t.length>0?{relationships:t}:{},Ke=t=>ce(t).map(e=>({alias:e.alias,name:e.name,type:e.type,...e.domain?{domain:e.domain}:{}})),H=t=>t?{fields:Ke(t)}:{fields:[]};async function fe(t){let e=await t.loadSource(),i=F(e)&&e.isTable,a=B(e);return{name:t.name,type:"featureSet",isTable:i,...H(e?.fields),...j(a)}}async function xe(t){switch(t.type){case"feature":{let e=await t.loadSource(),i=B(e);return{name:t.name,type:t.type,...H(e?.fields),...j(i)}}case"featureSet":{let e=await t.loadSource(),i=F(e)&&e.isTable;return{name:t.name,type:"featureSet",...i?{isTable:i}:{},...H(e?.fields),...j(B(e))}}case"featureSetCollection":{let e=await t.loadSource(),i=e?.layers.filter(be)??[],a=e?.tables.filter(be)??[],s=await Promise.all(i.map(fe)),n=await Promise.all(a.map(fe));return{name:t.name,type:"featureSetCollection",layers:s,tables:n}}case"dictionary":{let e=await Promise.all(t.dictionaryVariables.map(xe));return{name:t.name,type:"dictionary",attributes:e}}case"pixel":{let e=await t.loadSource();if(!e)return{name:t.name,type:"pixel"};let i=await Me(e);return{name:t.name,type:"pixel",members:i.map(ve)}}case"voxel":{let e=await t.loadSource();if(!e)return{name:t.name,type:"voxel"};let i=await Ie(e);return{name:t.name,type:"voxel",members:i.map(ve)}}case"array":return{name:t.name,type:"array",elementType:t.elementType.type};case"number":case"text":case"boolean":case"date":case"knowledgeGraph":case"dateOnly":case"geometry":case"time":return{name:t.name,type:t.type}}}function ve(t){return t.type==="array"?{name:t.name,type:"array",elementType:t.elementType.type}:{name:t.name,type:t.type}}async function Xe(t){return{variables:await Promise.all(t.variables.map(xe))}}var Ze=1e5;function et(t){let e=new TextEncoder().encode(t).length;return Math.ceil(e/3.5)}function Q(t){return et(JSON.stringify(t))}function tt(t){let e=a=>({name:a.name,type:a.type,...a.isTable?{isTable:a.isTable}:{},...a.relationships?{relationships:a.relationships}:{}}),i=a=>{switch(a.type){case"feature":case"featureSet":case"knowledgeGraph":return{name:a.name,type:a.type,..."isTable"in a&&a.isTable?{isTable:a.isTable}:{},..."relationships"in a?{relationships:a.relationships}:{}};case"featureSetCollection":return{name:a.name,type:"featureSetCollection",layers:a.layers.map(e),tables:a.tables.map(e)};case"dictionary":return{name:a.name,type:"dictionary",attributes:a.attributes.map(i)};case"pixel":case"voxel":return{name:a.name,type:a.type};case"array":return{name:a.name,type:"array",...a.elementType?{elementType:a.elementType}:{}};default:return a}};return{variables:t.variables.map(i)}}function it(t){let e=t.variables,i=e.length,a=e.find(n=>n.name==="$feature")??e.find(n=>n.type==="feature")??e[0],s=a?[a]:[];return{context:{variables:s},wasReduced:i!==s.length,reducedToVariableName:a?.name}}function at(t){return Q(t)>Ze}var st=Object.defineProperty,ot=Object.getOwnPropertyDescriptor,y=(t,e,i,a)=>{for(var s=a>1?void 0:a?ot(e,i):e,n=t.length-1,l;n>=0;n--)(l=t[n])&&(s=(a?l(e,i,s):l(s))||s);return a&&s&&st(e,i,s),s},b=class extends Ee{constructor(t){super(t),this.viewMode="prompt",this.confirmationActive=!1,this.contextReducedNoticeDismissed=!1,this.splashActive=!0,this.isSubmitting=!1,this.question="",this.history=[],this.feedback={active:!1}}};y([w()],b.prototype,"viewMode",2);y([w()],b.prototype,"confirmationActive",2);y([w()],b.prototype,"contextReducedNoticeDismissed",2);y([w()],b.prototype,"splashActive",2);y([w()],b.prototype,"isSubmitting",2);y([w()],b.prototype,"errorMessage",2);y([w()],b.prototype,"promptValidationMessage",2);y([w()],b.prototype,"question",2);y([w()],b.prototype,"history",2);y([w()],b.prototype,"feedback",2);y([w()],b.prototype,"context",2);b=y([Re("ArcadeAssistantViewState")],b);var nt="arcade_generation",rt="ArcadeCodeRequest",ye="visualization",ct="ArcadeAssistant",lt=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],we=[],$e=!0,G=class extends ie{constructor(){super(...arguments),this.textAreaRef=ee(),this.messages=oe(),this._feedbackService=void 0,this.viewState=new b,this.handleFeedbackButton=(e,i)=>{this.updateViewState({feedback:{active:!0,value:e,item:i,termsAccepted:!1,text:"",submitting:!1}})},this.handleFeedbackSheetClose=()=>{this.updateViewState({feedback:{active:!1}})},this.handleFeedbackSubmit=async()=>{if(!this.viewState.feedback.active)return;this.updateViewState({feedback:{...this.viewState.feedback,submitting:!0}});let e=await this.ensureFeedbackService();if(!e){this.handleFeedbackSheetClose();return}let i=this.viewState.feedback.item.contextSnapshot,a=Ae.applicationName;!a&&!this.appVersion&&T("warn",this,"esriConfig.applicationName is not set. Consider setting it to help identify the application version in feedback.");let{value:s,text:n,termsAccepted:l,item:{question:d,formattedScript:c,conversationId:o}}=this.viewState.feedback,g={user_evaluation:s,your_comments:n||void 0,question:d??"",answer:encodeURIComponent(c??""),useragent:navigator.userAgent,_source:ct,version:this.appVersion||a||"NOT_SET",context:i?JSON.stringify(i):"",extras:i?.profileId??"",conversation_id:o??"",privacy_statement:l?"I_agree":""};try{await e.applyEdits({addFeatures:[new Ce({attributes:g})]})}catch(r){T("error",this,"Error submitting feedback.",{detail:{error:r}})}this.handleFeedbackSheetClose()},this.handleClose=e=>{this.closed=!0,this.closePanel?.(e)},this.setQuestionState=e=>{this.updateViewState({question:e,promptValidationMessage:void 0})},this.setFeedbackState=e=>{this.updateViewState({feedback:e})},this.onSuggestionClick=e=>{this.textAreaRef.value&&(this.textAreaRef.value.value=e,this.textAreaRef.value.setFocus(),this.setQuestionState(e))},this.helpBase="",this.assistantsEnabled=!1,this.closed=!1}static{this.properties={closePanel:0,insertText:0,helpBase:1,assistantsEnabled:5,portalUrl:1,serviceUrl:1,closed:7,editorRef:0,feedbackServiceUrl:1,appVersion:1}}static{this.styles=Ve}get disclaimerComment(){return`// ${this.messages.disclaimercomment}
|
|
3
|
-
// ${this.messages.disclaimerpt2??"AI-generated content may be inaccurate. Review before using."}`}get assistantOverviewDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/understand-arcade-assistant.htm`}get usingTheAssitantDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/use-arcade-assistant.htm`}async destroy(){}connectedCallback(){super.connectedCallback(),this.updateViewState({history:we,splashActive:$e})}load(){let e=async()=>{let i=this.getModel();if(!i){this.updateViewState({context:void 0});return}let a=await this.getProfileAndMetadata(i.uri);this.updateViewState({context:a,contextReducedNoticeDismissed:a.contextTooLarge?!1:this.viewState.contextReducedNoticeDismissed})};e().catch(i=>{T("error",this,"Error setting initial context.",{detail:{error:i}})}),this.manager.onLifecycle(()=>{let i=z.onModelContextDidChange(async()=>{e().catch(a=>{T("error",this,"Error setting context.",{detail:{error:a}})})});return{remove:()=>{i.dispose()}}})}disconnectedCallback(){super.disconnectedCallback(),we=this.viewState.history,$e=this.viewState.splashActive,this.copySuccessTimer&&(clearTimeout(this.copySuccessTimer),this.copySuccessTimer=void 0)}createFeedbackContextSnapshot(e){let i=tt(e.metadata);return{...e,metadata:i,estimatedTokens:Q(i)}}updateViewState(e){this.viewState.set(e)}getHistoryCards(){return this.viewState.history.reduce((e,i)=>(!i.script||(e.push({priorPrompt:i.question,code:i.formattedScript||i.error||"",profileId:i.profile??ye,onAddToEditor:a=>{ne(this.editorRef.editorInstance,i.formattedScript??"",a,this.disclaimerComment)},onThumbsUp:()=>this.handleFeedbackButton("good",i),onThumbsDown:()=>this.handleFeedbackButton("bad",i),conversationId:i.conversationId??"",message:i.message}),this.viewState.viewMode),e),[])}async ensureFeedbackService(){if(this._feedbackService)return this._feedbackService;if(!this.feedbackServiceUrl)return;let e=new Te({url:this.feedbackServiceUrl});await e.load();let i=lt.filter(a=>!e.fields.some(s=>s.name===a));if(i.length>0){T("error",this,`Missing the following fields in feedback service: ${i.join(", ")}. Feedback will not be logged.`);return}return this._feedbackService=e,e}getModel(){return this.editorRef.editorInstance?.getModel()}async submitQuestion(){if(this.viewState.question){this.updateViewState({isSubmitting:!0,errorMessage:void 0});try{let e=await this.getToken(),i=this.getModel();if(!i||!this.serviceUrl)return;let a=this.viewState.context??await this.getProfileAndMetadata(i.uri),s=(await Pe({baseUrl:this.serviceUrl,skillId:nt,message:this.viewState.question,authToken:e,context:{kind:rt,context:{profile_id:a.profileId,metadata:[a.metadata]}}})).find(n=>n.context?.kind==="ArcadeCodeResponse");if(!s)return;if(s.context?.kind==="ArcadeCodeResponse"){let n=this.createFeedbackContextSnapshot(a);this.updateViewState({history:[{script:s?.context?.arcadeCode?.code,formattedScript:re(s?.context?.arcadeCode?.code??""),error:void 0,question:this.viewState.question,profile:a.profileId,conversationId:s.conversationId,contextSnapshot:n,...s.message?{message:s.message}:{}},...this.viewState.history],viewMode:"result",errorMessage:void 0})}}catch(e){e instanceof Error&&e.name==="ArcadeAssistantError"?this.updateViewState({errorMessage:qe(e)||this.messages.erroroccurred||"An error occurred."}):this.updateViewState({errorMessage:this.messages.erroroccurred||"An error occurred."}),T("error",this,"Error submitting question",{detail:{error:e}})}finally{this.updateViewState({isSubmitting:!1})}}}async getToken(){let{token:e}=await Se.getCredential(this.portalUrl);return e}async getProfileAndMetadata(e){let i=ye,a=z.getEditorProfileForModel(e);a?.loaded||await a?.loadSource();let s=this.editorRef.profile;s&&"id"in s&&(i=s.id);let n=a?await Xe(a):{variables:[]},l=at(n),d=l?it(n):void 0,c=d?d.context:n,o=Q(c);return{profileId:i,metadata:c,contextTooLarge:l,reducedToVariableName:d?.reducedToVariableName,estimatedTokens:o}}onCopyCode(e){let i=e?`${this.disclaimerComment}
|
|
4
|
-
${e}`:"";return navigator.clipboard.writeText(i)}render(){if(this.closed)return null;let e=this.viewState.viewMode==="result",i=this.getHistoryCards();return this.assistantsEnabled?p`<calcite-flow><calcite-flow-item closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.viewState.splashActive&&p`<calcite-scrim></calcite-scrim>`||""}${_e({messages:this.messages})}${Fe({messages:this.messages,popoverContent:me({assistantsEnabled:this.assistantsEnabled,messages:this.messages,helpTopicUrl:this.usingTheAssitantDocUrl})})}<calcite-shell class="unstyled-shell">${this.viewState.splashActive&&Je({messages:this.messages,onProceed:()=>{this.updateViewState({splashActive:!1})},helpTopicUrl:this.assistantOverviewDocUrl,onExit:a=>this.closePanel?.(a)})||""}${Le({active:this.viewState.confirmationActive,setActive:a=>this.updateViewState({confirmationActive:a}),messages:this.messages})}${je({isDisabled:this.viewState.isSubmitting,isReadOnly:!1,setQuestion:this.setQuestionState,setIsViewingResult:a=>this.updateViewState({viewMode:a?"result":"prompt"}),mode:e?"refine":"prompt",textAreaRef:this.textAreaRef,question:this.viewState.question,errorMessage:this.viewState.errorMessage,setErrorMessage:a=>this.updateViewState({errorMessage:a}),promptValidationMessage:this.viewState.promptValidationMessage,setPromptValidationMessage:a=>this.updateViewState({promptValidationMessage:a}),submitQuestion:this.submitQuestion.bind(this),assistantRef:this.el,messages:this.messages,context:this.viewState.context,contextReducedNoticeDismissed:this.viewState.contextReducedNoticeDismissed,setContextReducedNoticeDismissed:a=>this.updateViewState({contextReducedNoticeDismissed:a})})}<calcite-block-group .label=${this.messages.interactiveblocks??"interactive blocks"}>${!e&&!this.viewState.isSubmitting&&Ye({messages:this.messages,suggestions:[this.messages.prompsuggestion1??"",this.messages.prompsuggestion2??""],onSuggestionClick:this.onSuggestionClick})||""}<calcite-block .hidden=${!this.viewState.isSubmitting} .heading=${this.messages.generatingresponse??"Generating response..."}></calcite-block>${ge({expanded:e,messages:this.messages,collapsible:!0,showEffectsIcon:!0,cards:i.length?[i[0]]:[],heading:this.messages.besteffort??"Here's the assistant's best effort",hidden:this.viewState.isSubmitting||!e,onCopyCode:this.onCopyCode.bind(this),standalone:!0})}${ge({expanded:!e,messages:this.messages,collapsible:!0,cards:e?i.slice(1):i,heading:this.messages.recentprompts??"Recent prompts",hidden:this.viewState.isSubmitting||this.viewState.history.length===0,onCopyCode:this.onCopyCode.bind(this)})}</calcite-block-group>${this.viewState.feedback.active?Ge({setOpen:this.handleFeedbackSheetClose,messages:this.messages,onSubmit:this.handleFeedbackSubmit,feedback:this.viewState.feedback,setFeedback:this.setFeedbackState,learnMoreUrl:this.assistantOverviewDocUrl}):null}</calcite-shell></calcite-flow-item></calcite-flow>`:p`<calcite-flow><calcite-flow-item .selected=${!e} closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${me({slot:"content-top",messages:this.messages,assistantsEnabled:this.assistantsEnabled,helpTopicUrl:this.usingTheAssitantDocUrl})}</calcite-flow-item></calcite-flow>`}};se("arcgis-arcade-coding-assistant",G);return G},"identity/IdentityManager","request","layers/FeatureLayer","config","Graphic","applications/Components/arcadeEditorUtils","core/Accessor","core/accessorSupport/decorators",a,b)
|