@arcgis/coding-components 5.0.0-next.112 → 5.0.0-next.114
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/addons.js +1 -1
- package/dist/cdn/{VQ2JSD3J.js → 2GCQFUMI.js} +2 -2
- package/dist/cdn/{W2UGPDJ4.js → 4LHBHN5J.js} +2 -2
- package/dist/cdn/{TRANGKBJ.js → 4Y5YSMOE.js} +2 -2
- package/dist/cdn/{KU67M6PI.js → 5CZRMWEI.js} +2 -2
- package/dist/cdn/{ZYK7M7LM.js → 5D7BZ4AJ.js} +123 -123
- package/dist/cdn/{5ZGX5XTK.js → 5XRXNGIJ.js} +2 -2
- package/dist/cdn/{77JGK5GN.js → 67ARLOL3.js} +2 -2
- package/dist/cdn/{GBTWZ3XD.js → 67ZTNYDR.js} +2 -2
- package/dist/cdn/{GI6HWCLC.js → 6HZN5K7C.js} +1 -1
- package/dist/cdn/{RKOC5IRE.js → AW57CO3G.js} +2 -2
- package/dist/cdn/BLWQ7QOL.js +4 -0
- package/dist/cdn/{TDGS2O6Y.js → C62MXLP6.js} +1 -1
- package/dist/{monacoStyles.js → cdn/DR2NYKLD.js} +3 -6
- package/dist/cdn/{QEFMGE4W.js → EAJJ7BYC.js} +2 -2
- package/dist/cdn/{Z2TSI7BE.js → ELX57OKG.js} +1 -1
- package/dist/cdn/FBPV75KB.js +4 -0
- package/dist/cdn/FXBIE4TU.js +4 -0
- package/dist/cdn/GELX4TL4.js +4 -0
- package/dist/cdn/{2ICHDIM4.js → GZAZQWHH.js} +2 -2
- package/dist/cdn/{PCKTIN6B.js → HZPKRD5Y.js} +2 -2
- package/dist/cdn/{FXYQAPUS.js → IGN4DYX6.js} +1 -1
- package/dist/cdn/{AER7L4K2.js → JX5Z5PZM.js} +2 -2
- package/dist/cdn/{PCPWZFIQ.js → JYZFOYLT.js} +1 -1
- package/dist/cdn/{WJDBXY4M.js → KRZYNZ3L.js} +1 -1
- package/dist/cdn/{BJ7H7ILG.js → LVRGJKTO.js} +2 -2
- package/dist/cdn/{GAFEHBI4.js → N4HK6QPY.js} +1 -1
- package/dist/cdn/{MACRVGYV.js → NGMWEFSR.js} +2 -2
- package/dist/cdn/{PGHGI33U.js → NNVZSNRG.js} +2 -2
- package/dist/cdn/{Z464KXFF.js → NOJYWNV6.js} +2 -2
- package/dist/cdn/{TDNUUDEQ.js → NR6Y3SMQ.js} +2 -2
- package/dist/cdn/{QSDHTP2O.js → O2RLIM4Z.js} +2 -2
- package/dist/cdn/OCXQUJHW.js +6 -0
- package/dist/cdn/{73A4C5J2.js → OTELJGV3.js} +18 -18
- package/dist/cdn/{WOHUDG7Y.js → OTTHE5A7.js} +2 -2
- package/dist/cdn/P6PEG6MN.js +4 -0
- package/dist/cdn/{GSD5MJRA.js → Q7T6IG6A.js} +3 -3
- package/dist/cdn/QGA5LYZF.js +4 -0
- package/dist/cdn/R7M5X6VK.js +4 -0
- package/dist/cdn/{TUHLHREY.js → RVD7TQR3.js} +2 -2
- package/dist/cdn/SZPTSVKI.js +4 -0
- package/dist/cdn/{KGCVH6T7.js → TDWKY5BJ.js} +1 -1
- package/dist/cdn/TINATS7X.js +4 -0
- package/dist/cdn/TOESJKP6.js +4 -0
- package/dist/cdn/UYKE4EFV.js +4 -0
- package/dist/cdn/{VII3DH4T.js → VCLSKCOF.js} +2 -2
- package/dist/cdn/{KPOAYJOJ.js → VJTAK7CX.js} +2 -2
- package/dist/cdn/{7GYPGUXR.js → VWGDPBT6.js} +2 -2
- package/dist/cdn/{KQZKX2SL.js → YEA4EWQC.js} +2 -2
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +2 -2
- package/dist/cdn/index.js +2 -7
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/arcade-contribution.js +8 -5
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +21 -18
- package/dist/chunks/arcade-service-accessors.js +16 -13
- package/dist/chunks/colorize.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +6 -3
- package/dist/chunks/monaco-theme.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +35 -32
- package/dist/chunks/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utilities.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +13 -13
- package/dist/components/arcgis-arcade-editor/customElement.js +41 -42
- package/dist/components/arcgis-arcade-editor/index.d.ts +1 -0
- package/dist/components/arcgis-arcade-editor/index.js +1 -0
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +5 -5
- package/dist/components/arcgis-code-editor/customElement.d.ts +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +269 -60
- package/dist/components/arcgis-code-editor-shell/customElement.d.ts +17 -0
- package/dist/components/arcgis-code-editor-shell/customElement.js +19 -0
- package/dist/components/arcgis-code-editor-shell/index.d.ts +1 -0
- package/dist/components/arcgis-code-editor-shell/index.js +1 -0
- package/dist/components/arcgis-code-viewer/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +11 -11
- package/dist/components/arcgis-sql-expression-editor/customElement.js +15 -19
- package/dist/components/arcgis-sql-expression-editor/index.d.ts +1 -0
- package/dist/components/arcgis-sql-expression-editor/index.js +1 -0
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +126 -5
- package/dist/docs/docs.json +123 -5
- package/dist/docs/vscode.css-custom-data.json +30 -1
- package/dist/docs/vscode.html-custom-data.json +11 -0
- package/dist/docs/web-types.json +64 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/dist/loader.js +5 -4
- package/dist/types/lumina.d.ts +5 -0
- package/dist/types/preact.d.ts +6 -0
- package/dist/types/react.d.ts +7 -0
- package/dist/types/stencil.d.ts +5 -0
- package/dist/utils/internal-monaco-apis.d.ts +67 -0
- package/dist/utils/monaco-importer.d.ts +3 -0
- package/dist/utils/monaco-typings.d.ts +3 -0
- package/dist/utils/patch-monaco.d.ts +16 -0
- package/package.json +5 -5
- package/dist/cdn/22SZEPF4.js +0 -4
- package/dist/cdn/AT42Z3HP.js +0 -4
- package/dist/cdn/AW76B7FW.js +0 -4
- package/dist/cdn/BEFETNPF.js +0 -4
- package/dist/cdn/CX2SSXG4.js +0 -4
- package/dist/cdn/EVYUD4NL.js +0 -4
- package/dist/cdn/HZ67L7NJ.js +0 -4
- package/dist/cdn/K6MDPJED.js +0 -4
- package/dist/cdn/KQP2PJVU.js +0 -4
- package/dist/cdn/MRZLSJ6G.js +0 -6
- package/dist/cdn/QS3R73AT.js +0 -4
- package/dist/cdn/WZYVKC6H.js +0 -4
- package/dist/cdn/YTXEQJJ6.js +0 -4
- package/dist/chunks/editor.js +0 -8
- package/dist/utils/import-monaco-styles.d.ts +0 -7
|
@@ -20,8 +20,8 @@ import { getDeclaredVoxelMembers as ce, getDeclaredPixelMembers as ne } from "@a
|
|
|
20
20
|
import { s as le } from "../../chunks/fields.js";
|
|
21
21
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
22
22
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
23
|
-
v5.0.0-next.
|
|
24
|
-
const de = Z`:host(:not([closed])){container-type:size;--calcite-block-border-color: var(--calcite-color-transparent);
|
|
23
|
+
v5.0.0-next.114 */
|
|
24
|
+
const de = Z`: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}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}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)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}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}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}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%}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.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)}.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}.code-collapse{margin-inline-start:auto}.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)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[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}}:host([closed]){display:none}`;
|
|
25
25
|
class v extends Error {
|
|
26
26
|
constructor({
|
|
27
27
|
message: e,
|
|
@@ -64,7 +64,7 @@ async function pe(i) {
|
|
|
64
64
|
responseType: "json"
|
|
65
65
|
});
|
|
66
66
|
} catch (m) {
|
|
67
|
-
const f = m,
|
|
67
|
+
const f = m, k = f.details?.rawResponse || f.message || String(m), g = R(k);
|
|
68
68
|
throw g ? new v(g) : m;
|
|
69
69
|
}
|
|
70
70
|
const p = l.data;
|
|
@@ -76,7 +76,7 @@ async function pe(i) {
|
|
|
76
76
|
const f = 25;
|
|
77
77
|
for (; m < f; ) {
|
|
78
78
|
await new Promise((y) => setTimeout(y, 1e3));
|
|
79
|
-
const
|
|
79
|
+
const k = ue($, C, H);
|
|
80
80
|
let g;
|
|
81
81
|
try {
|
|
82
82
|
g = await E(d, {
|
|
@@ -85,7 +85,7 @@ async function pe(i) {
|
|
|
85
85
|
"Content-Type": "application/json",
|
|
86
86
|
token: r
|
|
87
87
|
},
|
|
88
|
-
body: JSON.stringify(
|
|
88
|
+
body: JSON.stringify(k),
|
|
89
89
|
responseType: "json"
|
|
90
90
|
});
|
|
91
91
|
} catch (y) {
|
|
@@ -169,7 +169,7 @@ function ve({ isDisabled: i, isReadOnly: e, setQuestion: t, setIsViewingResult:
|
|
|
169
169
|
}}>${l === "prompt" ? a.ask ?? "Generate" : a.refine ?? "Refine"}</calcite-button></div></div></div></calcite-text-area></div>`;
|
|
170
170
|
}
|
|
171
171
|
const $e = "https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement", xe = "https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";
|
|
172
|
-
function
|
|
172
|
+
function ke({ setOpen: i, messages: e, feedback: t, setFeedback: o, onSubmit: r }) {
|
|
173
173
|
return t.active ? c`<calcite-sheet class="feedback-sheet" .label=${e.feedback ?? "Feedback"} slot=sheets display-mode=float position=block-end .open=${t.active} @calciteSheetClose=${() => i(!1)}><calcite-panel .heading=${e.providefeedback ?? "Provide feedback"} .description=${e.experiencehelps ?? "Your experience helps guide future improvements"}><div class="feedback-content"><calcite-label>${e.experiencehelpful ?? "Was the assistant helpful?"}<calcite-segmented-control scale=l .disabled=${t.submitting}><calcite-segmented-control-item icon-start=thumbs-up .checked=${t.value === "good"} @click=${() => o({ ...t, value: "good" })}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${t.value === "bad"} @click=${() => o({ ...t, value: "bad" })}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${e.describeexperience ?? "Describe your experience"}<calcite-text-area resize=vertical .value=${t.text} @calciteTextAreaInput=${(n) => o({ ...t, text: n.target.value })} .disabled=${t.submitting}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${(n) => {
|
|
174
174
|
o({ ...t, termsAccepted: n.target.checked });
|
|
175
175
|
}} .disabled=${t.submitting}></calcite-checkbox><span>${x((e.agreement ?? "I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}", `<calcite-link href=${$e} target="_blank">${e.esriprivacystatement ?? "Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}", `<calcite-link href=${xe} target="_blank">${e.supplement ?? "Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${r} .disabled=${!t.termsAccepted || t.submitting} .loading=${t.submitting}>${e.submitfeedback ?? "Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>` : null;
|
|
@@ -177,7 +177,7 @@ function we({ setOpen: i, messages: e, feedback: t, setFeedback: o, onSubmit: r
|
|
|
177
177
|
function P({ assistantsEnabled: i, messages: e, slot: t, assistantHelpUrl: o, helpTopicUrl: r }) {
|
|
178
178
|
return c`<calcite-block .label=${e.assistantinformation ?? "Assistant information"} slot=${t ?? V} expanded class="info-block"><calcite-chip .label=${e.new ?? "New"} kind=brand>${e.new ?? "New"}</calcite-chip><h1 class="info-heading">${e.introducing ?? "Introducing Arcade Assistant (beta)"}</h1><p>${e.capabilities ?? "The assistant uses artificial intelligence to generate Arcade expressions."}</p>${i ? c`<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>${x((e.seedocumentation ?? "Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}", `<calcite-link href=${r} target="_blank">${e.documentation ?? "documentation"}</calcite-link>`))}</p>` : c`<p>${x(e.useofassistant?.replace("{aiassistants}", `<strong>${e.aiassistants ?? "Ai Assistants"}</strong>`))}<calcite-link .href=${o} target=_blank icon-end=launch2>${e.configureassistants ?? "Configure Assistants"}</calcite-link></p>`}</calcite-block>`;
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function we({ messages: i, onProceed: e, onExit: t, helpTopicUrl: o }) {
|
|
181
181
|
return c`<calcite-dialog close-disabled placement=top .heading=${i.welcome ?? "Welcome to the new assistant experience"} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted ?? "Before you get started be aware:"}</h3><ul><li>${i.maybeincorrect ?? "AI generated code may occasionally be incorrect or biased. Review carefully."}</li><li>${x((i.pleasereadhelp ?? "Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.").replace("{helpTopic}", `<calcite-link href=${o} target="_blank">${i.helptopic ?? "help topic"}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed ?? "Proceed"}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit ?? "Exit"}</calcite-button></calcite-dialog>`;
|
|
182
182
|
}
|
|
183
183
|
function Ae({ messages: i, suggestions: e, onSuggestionClick: t }) {
|
|
@@ -313,7 +313,7 @@ async function Se(i) {
|
|
|
313
313
|
variables: await Promise.all(i.variables.map(L))
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
|
-
const Ie = "arcade_generation", Te = "ArcadeCodeRequest",
|
|
316
|
+
const Ie = "arcade_generation", Te = "ArcadeCodeRequest", w = "visualization", Ee = "ArcadeAssistant", Re = [
|
|
317
317
|
"your_comments",
|
|
318
318
|
"user_evaluation",
|
|
319
319
|
"question",
|
|
@@ -433,12 +433,12 @@ class Pe extends Q {
|
|
|
433
433
|
code: t.formattedScript || t.error || "",
|
|
434
434
|
chips: [
|
|
435
435
|
{
|
|
436
|
-
label: t.profile ??
|
|
436
|
+
label: t.profile ?? w,
|
|
437
437
|
icon: "map-information",
|
|
438
438
|
appearance: "outline",
|
|
439
439
|
scale: "s",
|
|
440
440
|
conversationId: t.conversationId ?? "",
|
|
441
|
-
tooltip: (this.messages.profilecontextlabel ?? "Profile context: {profileName}").replace("{profileName}", t.profile ??
|
|
441
|
+
tooltip: (this.messages.profilecontextlabel ?? "Profile context: {profileName}").replace("{profileName}", t.profile ?? w)
|
|
442
442
|
},
|
|
443
443
|
...t.layerName ? [
|
|
444
444
|
{
|
|
@@ -527,7 +527,7 @@ class Pe extends Q {
|
|
|
527
527
|
return e;
|
|
528
528
|
}
|
|
529
529
|
async getProfileAndMetadata(e) {
|
|
530
|
-
let t =
|
|
530
|
+
let t = w;
|
|
531
531
|
const o = T.getEditorProfileForModel(e);
|
|
532
532
|
o?.loaded || await o?.loadSource();
|
|
533
533
|
const r = this.editorRef.profile;
|
|
@@ -542,7 +542,7 @@ ${e}` : "";
|
|
|
542
542
|
return navigator.clipboard.writeText(t);
|
|
543
543
|
}
|
|
544
544
|
render() {
|
|
545
|
-
return this.closed ? null : this.assistantsEnabled ? c`<calcite-flow><calcite-flow-item closable heading-level=2 .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive && c`<calcite-scrim></calcite-scrim>` || ""}${fe({ messages: this.messages })}${be({ popoverContent: P({ assistantsEnabled: this.assistantsEnabled, messages: this.messages, assistantHelpUrl: this.assistantHelpUrl, helpTopicUrl: this.usingTheAssitantDocUrl }) })}<calcite-shell class="unstyled-shell">${this.splashActive &&
|
|
545
|
+
return this.closed ? null : this.assistantsEnabled ? c`<calcite-flow><calcite-flow-item closable heading-level=2 .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive && c`<calcite-scrim></calcite-scrim>` || ""}${fe({ messages: this.messages })}${be({ popoverContent: P({ assistantsEnabled: this.assistantsEnabled, messages: this.messages, assistantHelpUrl: this.assistantHelpUrl, helpTopicUrl: this.usingTheAssitantDocUrl }) })}<calcite-shell class="unstyled-shell">${this.splashActive && we({ messages: this.messages, onProceed: () => {
|
|
546
546
|
this.splashActive = !1;
|
|
547
547
|
}, helpTopicUrl: this.assistantOverviewDocUrl, onExit: (e) => this.closePanel?.(e) }) || ""}${ge({ active: this.confirmationActive, setActive: (e) => this.confirmationActive = e, messages: this.messages })}${ve({ isDisabled: this.isSubmitting, isReadOnly: !1, setQuestion: this.setQuestion, setIsViewingResult: (e) => this.isViewingResult = e, mode: this.isViewingResult ? "refine" : "prompt", textAreaRef: this.textAreaRef, question: this.question, errorMessage: this.errorMessage, setErrorMessage: (e) => this.errorMessage = e, submitQuestion: this.submitQuestion.bind(this), messages: this.messages, context: this.context })}<calcite-block-group label="interactive blocks">${!this.isViewingResult && !this.isSubmitting && Ae({ messages: this.messages, suggestions: [this.messages.prompsuggestion1 ?? "", this.messages.prompsuggestion2 ?? ""], onSuggestionClick: this.onSuggestionClick }) || ""}<calcite-block .hidden=${!this.isSubmitting} .heading=${this.messages.generatingresponse ?? "Generating response..."}></calcite-block>${q({
|
|
548
548
|
expanded: this.isViewingResult,
|
|
@@ -569,7 +569,7 @@ ${e}` : "";
|
|
|
569
569
|
heading: this.messages.recentprompts ?? "Recent prompts",
|
|
570
570
|
hidden: this.isSubmitting || this.history.length === 0,
|
|
571
571
|
onCopyCode: this.onCopyCode.bind(this)
|
|
572
|
-
})}</calcite-block-group>${this.feedback.active ?
|
|
572
|
+
})}</calcite-block-group>${this.feedback.active ? ke({ setOpen: this.handleFeedbackSheetClose, messages: this.messages, onSubmit: this.handleFeedbackSubmit, feedback: this.feedback, setFeedback: this.setFeedbackState.bind(this) }) : null}</calcite-shell></calcite-flow-item></calcite-flow>` : c`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable heading-level=2 .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${P({ slot: "content-top", messages: this.messages, assistantsEnabled: this.assistantsEnabled, assistantHelpUrl: this.assistantHelpUrl, helpTopicUrl: this.usingTheAssitantDocUrl })}</calcite-flow-item></calcite-flow>`;
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
G("arcgis-arcade-coding-assistant", Pe);
|
|
@@ -1,73 +1,72 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { css as y, html as i, nothing as
|
|
1
|
+
import { g as R, c as w } from "../../chunks/runtime.js";
|
|
2
|
+
import { css as y, html as i, nothing as b } from "lit";
|
|
3
3
|
import { KeyCode as D } from "monaco-editor";
|
|
4
4
|
import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
|
|
5
5
|
import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
6
6
|
import "monaco-editor/esm/vs/platform/hover/browser/hover.js";
|
|
7
7
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
8
|
-
import
|
|
8
|
+
import "monaco-editor/esm/vs/base/browser/dom.js";
|
|
9
|
+
import "monaco-editor/esm/vs/editor/browser/editorDom.js";
|
|
10
|
+
import "monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js";
|
|
11
|
+
import { LitElement as C, createEvent as P, safeClassMap as l } from "@arcgis/lumina";
|
|
9
12
|
import { generateGuid as B } from "@arcgis/toolkit/string";
|
|
10
13
|
import { Deferred as I } from "@arcgis/toolkit/promise";
|
|
11
14
|
import { D as M, e as v } from "../../chunks/arcade-executor.js";
|
|
12
|
-
import { s as
|
|
15
|
+
import { s as k, a as L } from "../../chunks/arcade-service-accessors.js";
|
|
13
16
|
import { b as d } from "../../chunks/arcade-defaults.js";
|
|
14
|
-
import { u as
|
|
15
|
-
import { createRef as
|
|
16
|
-
import { s as z } from "../../chunks/editor.js";
|
|
17
|
+
import { u as T } from "../../chunks/useT9n.js";
|
|
18
|
+
import { createRef as F, ref as U } from "lit/directives/ref.js";
|
|
17
19
|
import N from "@arcgis/core/identity/IdentityManager.js";
|
|
18
20
|
import { log as O, rethrowError as o } from "@arcgis/toolkit/log";
|
|
19
21
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
20
22
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
21
|
-
v5.0.0-next.
|
|
22
|
-
const
|
|
23
|
+
v5.0.0-next.114 */
|
|
24
|
+
const j = y`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}.main-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}`, z = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", a = (s, e) => O(s, "Arcade Assistant", e), H = (s) => {
|
|
23
25
|
const { aiAssistantsEnabled: e } = s;
|
|
24
26
|
return e === void 0 ? (a("warn", "`areAiAssistantsEnabled` is not defined in the organizations settings."), !1) : e;
|
|
25
|
-
},
|
|
26
|
-
async function
|
|
27
|
+
}, V = (s) => !(!s || !("id" in s)), G = async (s) => (await N.getCredential(s)).token;
|
|
28
|
+
async function X({
|
|
27
29
|
portalUrl: s,
|
|
28
30
|
profile: e
|
|
29
31
|
}) {
|
|
30
|
-
if (!
|
|
32
|
+
if (!V(e))
|
|
31
33
|
return a("warn", "Addon initialization failed. Reason: unsupported profile."), { shouldRender: !1 };
|
|
32
|
-
const t = s.replace(/\/sharing\/rest(\/.*)?$/iu, "").replace(/\/$/u, ""), n = await
|
|
34
|
+
const t = s.replace(/\/sharing\/rest(\/.*)?$/iu, "").replace(/\/$/u, ""), n = await G(s), r = `${t}/sharing/rest/portals/self?f=json&token=${n}`, h = `${t}/sharing/rest/portals/self/settings?f=json&token=${n}`, p = `${t}/sharing/rest/portals/self/signinSettings?f=json&token=${n}`, u = await Promise.allSettled([
|
|
33
35
|
fetch(r, { credentials: "include" }).then((c) => c.json()),
|
|
34
36
|
fetch(h, { credentials: "include" }).then((c) => c.json()),
|
|
35
37
|
fetch(p, { credentials: "include" }).then((c) => c.json())
|
|
36
|
-
]), [g, f, _] = u, m = g.status === "fulfilled" ? g.value : (a("warn", `Failed to fetch selfUrl. Reason: ${g.reason}.`), {}),
|
|
37
|
-
if (
|
|
38
|
+
]), [g, f, _] = u, m = g.status === "fulfilled" ? g.value : (a("warn", `Failed to fetch selfUrl. Reason: ${g.reason}.`), {}), A = f.status === "fulfilled" ? f.value : (a("warn", `Failed to fetch settingsUrl. Reason: ${f.reason}.`), {}), x = _.status === "fulfilled" ? _.value : (a("warn", `Failed to fetch signinSettingsUrl. Reason: ${_.reason}.`), {}), $ = m?.helperServices?.aiAssistantServices?.url;
|
|
39
|
+
if (!$)
|
|
38
40
|
return a("warn", "Service URL is not available in the portal self response."), { shouldRender: !1 };
|
|
39
41
|
const E = m.helpBase || "";
|
|
40
|
-
if (!
|
|
42
|
+
if (!A)
|
|
41
43
|
return a("warn", "Settings response is not available."), { shouldRender: !1 };
|
|
42
|
-
let
|
|
43
|
-
return
|
|
44
|
+
let S = H(A);
|
|
45
|
+
return x.blockBetaApps === !0 && (a(
|
|
44
46
|
"warn",
|
|
45
47
|
"Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."
|
|
46
|
-
),
|
|
48
|
+
), S = !1), {
|
|
47
49
|
shouldRender: !0,
|
|
48
|
-
serviceUrl:
|
|
50
|
+
serviceUrl: $,
|
|
49
51
|
helpBase: E,
|
|
50
|
-
assistantsEnabled:
|
|
51
|
-
feedbackServiceUrl:
|
|
52
|
+
assistantsEnabled: S,
|
|
53
|
+
feedbackServiceUrl: z
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
|
-
class
|
|
56
|
+
class q extends C {
|
|
55
57
|
constructor() {
|
|
56
|
-
super(...arguments), this._codeEditorElt =
|
|
58
|
+
super(...arguments), this._codeEditorElt = F(), this._componentReadyDefer = new I(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = T(), this._modelId = B(), this._openArcadeHelp = () => void window.open(M, "Arcade Help"), this._toggleSidePanel = (e) => {
|
|
57
59
|
if (!e.target)
|
|
58
60
|
return;
|
|
59
61
|
const t = e.target?.dataset.panelName ?? "none";
|
|
60
62
|
this.openedSidePanel = t === this.openedSidePanel ? "none" : t, this.openedSidePanel === "none" && this._codeEditorElt.value?.setFocus().catch(o(this));
|
|
61
|
-
}, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this._arcadeAssistantRemoteState = { shouldRender: !1 }, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange =
|
|
63
|
+
}, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this._arcadeAssistantRemoteState = { shouldRender: !1 }, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange = P({ bubbles: !1 }), this.arcgisScriptChange = P({ bubbles: !1 });
|
|
62
64
|
}
|
|
63
65
|
static {
|
|
64
66
|
this.properties = { _apiLibrary: 16, _consoleLogs: 16, _editorProfile: 16, _executingScript: 16, _executionResult: 16, _preparingArcade: 16, _resultPanel: 16, _showExecutionPanel: 16, _arcadeAssistantRemoteState: 16, editorInstance: 32, editorOptions: 0, hideDocumentationActions: 5, hideSideBar: 5, openedSidePanel: 2, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0, arcadeAssistant: 0 };
|
|
65
67
|
}
|
|
66
68
|
static {
|
|
67
|
-
this.
|
|
68
|
-
}
|
|
69
|
-
static {
|
|
70
|
-
this.styles = [H, z];
|
|
69
|
+
this.styles = [j];
|
|
71
70
|
}
|
|
72
71
|
get editorInstance() {
|
|
73
72
|
return this._codeEditorElt.value?.editorInstance;
|
|
@@ -92,8 +91,8 @@ class W extends C {
|
|
|
92
91
|
await this._componentReadyDefer.promise, await this._codeEditorElt.value?.setFocus();
|
|
93
92
|
}
|
|
94
93
|
async load() {
|
|
95
|
-
const e =
|
|
96
|
-
|
|
94
|
+
const e = R("./assets");
|
|
95
|
+
k(e), await this._updateDataModelDeps(), await this._updateArcadeAssistantRemoteState();
|
|
97
96
|
}
|
|
98
97
|
willUpdate(e) {
|
|
99
98
|
(e.has("messages") || e.has("profile")) && this.hasUpdated && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") && d.updateApiContextForModel(this._modelId, {
|
|
@@ -102,7 +101,7 @@ class W extends C {
|
|
|
102
101
|
}
|
|
103
102
|
async loaded() {
|
|
104
103
|
this._componentReadyDefer.resolve(), await this._updateApiLibrary();
|
|
105
|
-
const e = await
|
|
104
|
+
const e = await L();
|
|
106
105
|
this._disposables.push(e.onDiagnosticsChange((t) => !this._preparingArcade && this.arcgisDiagnosticsChange.emit(t.diagnostics))), this.testData && this._addExecuteScriptAction();
|
|
107
106
|
}
|
|
108
107
|
disconnectedCallback() {
|
|
@@ -188,22 +187,22 @@ class W extends C {
|
|
|
188
187
|
t !== -1 && this._disposables.splice(t, 1), e.dispose();
|
|
189
188
|
}
|
|
190
189
|
async _updateArcadeAssistantRemoteState() {
|
|
191
|
-
this.arcadeAssistant && (this._arcadeAssistantRemoteState = await
|
|
190
|
+
this.arcadeAssistant && (this._arcadeAssistantRemoteState = await X({
|
|
192
191
|
...this.arcadeAssistant,
|
|
193
192
|
profile: this.profile
|
|
194
193
|
}));
|
|
195
194
|
}
|
|
196
195
|
renderMainActionBar() {
|
|
197
|
-
return this.testData ? i`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => void this._executeScript().catch(o(this))}></calcite-action>${this._executionResult ? i`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>` : null;
|
|
196
|
+
return this.testData ? i`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled slot=top-action-bar><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => void this._executeScript().catch(o(this))}></calcite-action>${this._executionResult ? i`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>` : null;
|
|
198
197
|
}
|
|
199
198
|
renderMainPanel() {
|
|
200
|
-
return i`<arcgis-code-editor
|
|
199
|
+
return i`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${d.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${U(this._codeEditorElt)}></arcgis-code-editor>`;
|
|
201
200
|
}
|
|
202
201
|
renderAction({ id: e, label: t, icon: n, active: r, panelName: h, iconFlipRtl: p = !1, onClick: u = this._toggleSidePanel }) {
|
|
203
|
-
return i`<calcite-action id=${e ??
|
|
202
|
+
return i`<calcite-action id=${e ?? b} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${n} .active=${r} @click=${u} data-panel-name=${h ?? b} .iconFlipRtl=${p}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
|
|
204
203
|
}
|
|
205
204
|
renderSideActionBar() {
|
|
206
|
-
return this.hideSideBar ? null : i`<calcite-action-bar
|
|
205
|
+
return this.hideSideBar ? null : i`<calcite-action-bar slot=side-action-bar class="side-action-bar" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
|
|
207
206
|
id: "profile-variables-action",
|
|
208
207
|
label: this.messages.profilevariables ?? "",
|
|
209
208
|
icon: "profile-variables",
|
|
@@ -247,7 +246,7 @@ class W extends C {
|
|
|
247
246
|
if (this.hideSideBar)
|
|
248
247
|
return null;
|
|
249
248
|
const { openedSidePanel: e } = this;
|
|
250
|
-
return i`<arcgis-language-api-panel class=${l(e === "api"
|
|
249
|
+
return i`<arcgis-language-api-panel slot=side-panel class=${l(e === "api" ? "" : "hidden")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .closed=${e !== "api"}></arcgis-language-api-panel><arcgis-editor-variables slot=side-panel class=${l(e === "variables" ? "" : "hidden")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e !== "variables"}></arcgis-editor-variables>${this.suggestions?.length && i`<arcgis-arcade-suggestions slot=side-panel class=${l(e === "suggestions" ? "" : "hidden")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${this.arcadeAssistant && this._arcadeAssistantRemoteState.shouldRender && i`<arcgis-arcade-coding-assistant slot=side-panel class=${l(e === "arcade-assistant" ? "" : "hidden")} .closed=${e !== "arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${this._arcadeAssistantRemoteState.serviceUrl} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((t) => i`<calcite-flow slot=side-panel class=${l(e === t.id ? "" : "hidden")}>${t?.useFlows ? t.renderer?.({
|
|
251
250
|
closePanel: this._toggleSidePanel,
|
|
252
251
|
insertText: this._insertText.bind(this),
|
|
253
252
|
closed: e !== t.id,
|
|
@@ -262,13 +261,13 @@ class W extends C {
|
|
|
262
261
|
})}</calcite-flow-item>`}</calcite-flow>`)}`;
|
|
263
262
|
}
|
|
264
263
|
renderResultsPanel() {
|
|
265
|
-
return this._showExecutionPanel ? i`<arcgis-arcade-results
|
|
264
|
+
return this._showExecutionPanel ? i`<arcgis-arcade-results slot=results-panel .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>` : null;
|
|
266
265
|
}
|
|
267
266
|
render() {
|
|
268
|
-
return i
|
|
267
|
+
return i`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
|
|
269
268
|
}
|
|
270
269
|
}
|
|
271
|
-
|
|
270
|
+
w("arcgis-arcade-editor", q);
|
|
272
271
|
export {
|
|
273
|
-
|
|
272
|
+
q as ArcgisArcadeEditor
|
|
274
273
|
};
|
|
@@ -10,4 +10,5 @@ import "../arcgis-arcade-coding-assistant/index.js";
|
|
|
10
10
|
import "@esri/calcite-components/components/calcite-flow";
|
|
11
11
|
import "@esri/calcite-components/components/calcite-flow-item";
|
|
12
12
|
import "../arcgis-arcade-results/index.js";
|
|
13
|
+
import "../arcgis-code-editor-shell/index.js";
|
|
13
14
|
export * from "./customElement.js";
|
|
@@ -10,4 +10,5 @@ import "../arcgis-arcade-coding-assistant/index.js";
|
|
|
10
10
|
import "@esri/calcite-components/components/calcite-flow";
|
|
11
11
|
import "@esri/calcite-components/components/calcite-flow-item";
|
|
12
12
|
import "../arcgis-arcade-results/index.js";
|
|
13
|
+
import "../arcgis-code-editor-shell/index.js";
|
|
13
14
|
export * from "./customElement.js";
|
|
@@ -11,7 +11,7 @@ import { t as k } from "../../chunks/monaco-theme.js";
|
|
|
11
11
|
import { observeAncestorsMutation as z, unsafeGetCalciteModeName as N } from "@arcgis/toolkit/dom";
|
|
12
12
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
13
13
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
14
|
-
v5.0.0-next.
|
|
14
|
+
v5.0.0-next.114 */
|
|
15
15
|
const E = w`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`, l = {
|
|
16
16
|
lines: !0,
|
|
17
17
|
selectionMode: "none",
|
|
@@ -9,12 +9,12 @@ import { c as b } from "../../chunks/markdown.js";
|
|
|
9
9
|
import { u as _ } from "../../chunks/useT9n.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
12
|
-
v5.0.0-next.
|
|
12
|
+
v5.0.0-next.114 */
|
|
13
13
|
function v(o) {
|
|
14
14
|
return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
|
|
15
15
|
}
|
|
16
|
-
const S = d`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
17
|
-
class
|
|
16
|
+
const S = d`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`;
|
|
17
|
+
class w extends h {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments), this._beforeBack = async () => {
|
|
20
20
|
this._selectedSuggestion = void 0;
|
|
@@ -77,7 +77,7 @@ class $ extends h {
|
|
|
77
77
|
return this.closed ? null : s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
n("arcgis-arcade-suggestions",
|
|
80
|
+
n("arcgis-arcade-suggestions", w);
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
w as ArcgisArcadeSuggestions
|
|
83
83
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import { Selection, editor as Editor } from 'monaco-editor';
|
|
3
3
|
import { PropertyValues } from 'lit';
|
|
4
|
-
import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
|
|
4
|
+
import { PublicLitElement as LitElement, JsxNode, TargetedEvent } from '@arcgis/lumina';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* [Read more...](https://developers.arcgis.com/javascript/latest/references/coding-components/arcgis-code-editor/)
|