@arcgis/coding-components 4.33.0-next.156 → 4.33.0-next.157
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/arcade-coding-assistant/temporary-strings.d.ts +18 -3
- package/dist/addons.js +21 -20
- package/dist/cdn/{IT3RNWMF.js → 2EOMTXAM.js} +2 -2
- package/dist/cdn/{TXTLAXW3.js → 3DBMUM2E.js} +2 -2
- package/dist/cdn/{SNTBRO5H.js → 3IHAP57X.js} +2 -2
- package/dist/cdn/{YFJH2YET.js → 44ZQZJW7.js} +2 -2
- package/dist/cdn/{Y7AC5CO4.js → 53BJLN5C.js} +2 -2
- package/dist/cdn/{ELMYMB55.js → 5A2W2JGQ.js} +1 -1
- package/dist/cdn/{62WTC26T.js → 5KKQKEM7.js} +6 -5
- package/dist/cdn/62VVIVFO.js +6 -0
- package/dist/cdn/{WGXXUMHZ.js → 63YGJX3Q.js} +2 -2
- package/dist/cdn/{OZUJOLBS.js → 6T5Z42NQ.js} +2 -2
- package/dist/cdn/{QIER5L5H.js → 7WJ7J7VC.js} +2 -2
- package/dist/cdn/{ST32SX6P.js → AO6VJ7AR.js} +2 -2
- package/dist/cdn/{DEKON7NV.js → AVRKPJBZ.js} +2 -2
- package/dist/cdn/{DJY5FUDQ.js → B2DWB3RE.js} +2 -2
- package/dist/cdn/{SFNKMURE.js → CF6C7RH4.js} +2 -2
- package/dist/cdn/{D6DSUBOK.js → DCIK6GAB.js} +1 -1
- package/dist/cdn/{27PLWXGX.js → DMVIP5KG.js} +1 -1
- package/dist/cdn/{76SXMLOW.js → GJYOLQU6.js} +2 -2
- package/dist/cdn/{HKASEUDW.js → GX7GR7GP.js} +2 -2
- package/dist/cdn/{VYAX2QBV.js → H2D2PSIU.js} +2 -2
- package/dist/cdn/{6JQTRTHP.js → ICCAXRYM.js} +2 -2
- package/dist/cdn/{7A2U4FEQ.js → INEDXYQ2.js} +2 -2
- package/dist/cdn/{UAL5NCD3.js → JINJ3MOZ.js} +2 -2
- package/dist/cdn/{7WJDOUXH.js → JNFBWA7U.js} +2 -2
- package/dist/cdn/{LTNTWIRM.js → KW5ZFYC6.js} +2 -2
- package/dist/cdn/{IEW67KDU.js → L5ZMTXUX.js} +2 -2
- package/dist/cdn/{NGJ7Z4I6.js → LRRRFZEI.js} +2 -2
- package/dist/cdn/{IXDJOGWN.js → NL4UMVSX.js} +2 -2
- package/dist/cdn/{HFN4YJFS.js → NWCQS4RN.js} +2 -2
- package/dist/cdn/{NFVUBER3.js → OQZTMOH5.js} +2 -2
- package/dist/cdn/{XGLWKDJV.js → PEKLAPXM.js} +2 -2
- package/dist/cdn/{4PICZUHR.js → Q4MP4G7Q.js} +2 -2
- package/dist/cdn/{HPE56V6H.js → REYPES3K.js} +1 -1
- package/dist/cdn/{IGEAF4ZJ.js → RLCNPMAX.js} +3 -3
- package/dist/cdn/{A24EASHQ.js → ROOAZ3XS.js} +1 -1
- package/dist/cdn/{YWTW3WIA.js → UUKDOBDY.js} +2 -2
- package/dist/cdn/{ELZ7BTCI.js → UXCNBPUL.js} +2 -2
- package/dist/cdn/{SEJZT7WU.js → VBSRSKAI.js} +2 -2
- package/dist/cdn/{IA54QQCK.js → VIRZ237W.js} +2 -2
- package/dist/cdn/{NIEB5ZKF.js → VVNVW53D.js} +2 -2
- package/dist/cdn/{PHQKSWGA.js → YJ4XQUAL.js} +2 -2
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +16723 -16711
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-defaults.js +2 -2
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/editor.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +4 -3
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +64 -44
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco.js +1 -1
- package/dist/chunks/sql-expr-contribution.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +3 -8
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +208 -147
- package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +17 -11
- package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +5 -2
- package/dist/components/arcgis-arcade-coding-assistant/index.js +5 -2
- package/dist/components/arcgis-arcade-coding-assistant/types.d.ts +36 -0
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +4 -4
- package/dist/utils/utilities.d.ts +1 -1
- package/package.json +5 -5
- package/dist/cdn/GEWXHI4A.js +0 -4
|
@@ -8,9 +8,6 @@ export declare const temporaryStrings: {
|
|
|
8
8
|
beforeyougetstarted: string;
|
|
9
9
|
maybeincorrect: string;
|
|
10
10
|
pleasereadhelp: string;
|
|
11
|
-
consultprivacy: string;
|
|
12
|
-
privacyStatement: string;
|
|
13
|
-
privacySupplement: string;
|
|
14
11
|
proceed: string;
|
|
15
12
|
exit: string;
|
|
16
13
|
promptsuggestions: string;
|
|
@@ -22,4 +19,22 @@ export declare const temporaryStrings: {
|
|
|
22
19
|
refine: string;
|
|
23
20
|
startover: string;
|
|
24
21
|
helptopic: string;
|
|
22
|
+
agreement: string;
|
|
23
|
+
esriprivacystatement: string;
|
|
24
|
+
supplement: string;
|
|
25
|
+
disclaimerpt2: string;
|
|
26
|
+
replaceineditor: string;
|
|
27
|
+
keepinmind: string;
|
|
28
|
+
beconsise: string;
|
|
29
|
+
avoidambiguity: string;
|
|
30
|
+
documentation: string;
|
|
31
|
+
useexamples: string;
|
|
32
|
+
moredetails: string;
|
|
33
|
+
seedocumentation: string;
|
|
34
|
+
assistantinformation: string;
|
|
35
|
+
profilecontextlabel: string;
|
|
36
|
+
layercontextlabel: string;
|
|
37
|
+
numlayers: string;
|
|
38
|
+
numlayersplural: string;
|
|
39
|
+
numlayerssingular: string;
|
|
25
40
|
};
|
package/dist/addons.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { html as
|
|
1
|
+
import { html as b } from "lit";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
-
v4.33.0-next.
|
|
5
|
-
const
|
|
4
|
+
v4.33.0-next.157 */
|
|
5
|
+
const m = [
|
|
6
6
|
"popup",
|
|
7
7
|
"popup-element",
|
|
8
8
|
"visualization",
|
|
@@ -10,42 +10,43 @@ const b = [
|
|
|
10
10
|
"aggregate-field",
|
|
11
11
|
"popup-feature-reduction",
|
|
12
12
|
"popup-voxel"
|
|
13
|
-
],
|
|
14
|
-
const s =
|
|
13
|
+
], w = (e) => {
|
|
14
|
+
const s = m.includes(e);
|
|
15
15
|
return s || console.warn(`Profile "${e}" is not supported by the Arcade Coding Assistant.`), s;
|
|
16
|
-
},
|
|
16
|
+
}, A = (e) => {
|
|
17
17
|
const { aiAssistantsEnabled: s } = e;
|
|
18
18
|
return s === void 0 ? (console.warn("areAiAssistantsEnabled is not defined in the organizations settings."), !1) : !!s;
|
|
19
|
-
},
|
|
20
|
-
async function
|
|
19
|
+
}, v = () => typeof globalThis < "u" && "$arcgis" in globalThis && typeof globalThis.$arcgis == "object" && "import" in globalThis.$arcgis && !("forceESM" in globalThis.$arcgis), T = async (e) => v() ? (await (await globalThis.$arcgis.import("@arcgis/core/identity/IdentityManager.js")).getCredential(e))?.token || "" : (await (await import("@arcgis/core/identity/IdentityManager.js")).default.getCredential(e)).token || "";
|
|
20
|
+
async function E({ orgBaseUrl: e, profileName: s, feedbackServiceUrl: n, appVersion: o, panelName: r }) {
|
|
21
21
|
if (!customElements.get("arcgis-arcade-coding-assistant"))
|
|
22
22
|
throw new Error("arcgis-arcade-coding-assistant component is not registered. Please ensure the component is imported from @arcgis/coding-components.");
|
|
23
|
-
const i = await
|
|
24
|
-
fetch(
|
|
25
|
-
fetch(
|
|
26
|
-
]), p =
|
|
23
|
+
const i = await T(e), c = `${e}/sharing/rest/portals/self?f=json&token=${i}`, l = `${e}/sharing/rest/portals/self/settings?f=json&token=${i}`, [a, d] = await Promise.all([
|
|
24
|
+
fetch(c, { credentials: "include" }).then((t) => t.json()),
|
|
25
|
+
fetch(l, { credentials: "include" }).then((t) => t.json())
|
|
26
|
+
]), p = a?.helperServices?.aiAssistantServices?.url, g = a.helpBase, u = A(d);
|
|
27
27
|
return {
|
|
28
|
-
enabled:
|
|
28
|
+
enabled: w(s),
|
|
29
29
|
id: "arcade-assistant",
|
|
30
|
-
name:
|
|
30
|
+
name: r,
|
|
31
31
|
icon: "effects",
|
|
32
32
|
useFlows: !0,
|
|
33
33
|
location: "sidebar",
|
|
34
|
-
renderer: ({ closePanel: t, insertText:
|
|
34
|
+
renderer: ({ closePanel: t, insertText: f, closed: h, editorRef: $ }) => b`
|
|
35
35
|
<arcgis-arcade-coding-assistant
|
|
36
36
|
.orgBaseUrl=${e}
|
|
37
37
|
.serviceUrl=${p}
|
|
38
38
|
.feedbackServiceUrl=${n}
|
|
39
39
|
.closePanel=${t}
|
|
40
|
-
.insertText=${
|
|
41
|
-
.closed=${
|
|
40
|
+
.insertText=${f}
|
|
41
|
+
.closed=${h}
|
|
42
42
|
.editorRef=${$}
|
|
43
|
-
.appVersion=${
|
|
44
|
-
|
|
43
|
+
.appVersion=${o}
|
|
44
|
+
.helpBase=${g}
|
|
45
|
+
?assistants-enabled=${u}
|
|
45
46
|
></arcgis-arcade-coding-assistant>
|
|
46
47
|
`
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
+
E as useArcadeAssistant
|
|
51
52
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
4
|
-
import j from"./
|
|
3
|
+
v4.33.0-next.157 */
|
|
4
|
+
import j from"./GJYOLQU6.js";import"./VIRZ237W.js";import i from"./3IHAP57X.js";import{a as v,c as r,d as I,e as n}from"./AVRKPJBZ.js";import{b as a}from"./ICCAXRYM.js";import{a as _}from"./JNFBWA7U.js";import"./44ZQZJW7.js";import e from"./7WJ7J7VC.js";import d from"./RLCNPMAX.js";import"./REYPES3K.js";import{g as b}from"./5KKQKEM7.js";import"./AO6VJ7AR.js";import{C as f,a as p,b as s,l as o,y as g}from"./H2D2PSIU.js";import{d as h,e as u,q as c}from"./DCIK6GAB.js";import"./UXCNBPUL.js";import"./DMVIP5KG.js";export default $arcgis.t(([,,,d])=>{var $=p`: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)}}`,m=class extends g{constructor(){super(...arguments),this.messages=_(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._colorizeStyle="",this._filterValue="",this.languageId="arcade",this.hideDocumentationActions=!1,this.loading=!1,this.closed=!1,this.arcgisClose=o({bubbles:!1}),this.arcgisItemSelected=o({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedApiItem:16,languageId:1,apiLibrary:0,hideDocumentationActions:5,loading:5,closed:5}}static{this.styles=$}async load(){await d(this.languageId),this._colorizeStyle=r(),this._themeChangedListener=I(()=>this._colorizeStyle=r())}willUpdate(e){if(e.has("languageId")&&d(this.languageId),e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{u(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisClose.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=n(this._selectedApiItem.examples),v(e,this.languageId).catch(console.error))}renderApiCategory(e){let i=b(e.items,"name",this._filterValue);return i.length?s`<calcite-list-item-group .heading=${e.title}>${i.map(t=>s`<calcite-list-item .label=${c(t.completion.detail)} @calciteListItemSelect=${l=>this._emitItemSelected(l,t)} @keydown=${l=>this._emitItemSelected(l,t)}><calcite-action slot=actions-end .text=${this.messages.expand??""} icon=chevron-right icon-flip-rtl scale=s @click=${l=>this._selectItem(l,t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>`:null}renderApiItemFlowItem(){let e=this._selectedApiItem;return e?s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions?null:s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions?"full":"half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${i=>this._emitItemSelectedAndClose(i,e)} ${a(h)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${c(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation)??""}></div>${e.examples?s`<div ${a(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){if(this.closed)return null;let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<style>${this._colorizeStyle}</style><calcite-flow ${a(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading?s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"}></calcite-loader>`:s`<calcite-list label="arcade api">${i?s`<div class="notice-container">${this.messages.noitems}</div>`:e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`}};f("arcgis-language-api-panel",m);return m},d,e,i,j)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
4
|
-
import{Fl as a,Gl as b,Hl as c,Il as d,Jl as e,Kl as f,Ll as g,Ml as h,Nl as i,Ol as j,Pl as k,Ql as l,Rl as m,Sl as n}from"./
|
|
3
|
+
v4.33.0-next.157 */
|
|
4
|
+
import{Fl as a,Gl as b,Hl as c,Il as d,Jl as e,Kl as f,Ll as g,Ml as h,Nl as i,Ol as j,Pl as k,Ql as l,Rl as m,Sl as n}from"./UXCNBPUL.js";import"./DMVIP5KG.js";export{a as CancellationTokenSource,b as Emitter,c as KeyCode,d as KeyMod,i as MarkerSeverity,j as MarkerTag,e as Position,f as Range,g as Selection,h as SelectionDirection,l as Token,k as Uri,m as editor,n as languages};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
4
|
-
import a from"./
|
|
3
|
+
v4.33.0-next.157 */
|
|
4
|
+
import a from"./RLCNPMAX.js";import{b as f,c,d as p}from"./5KKQKEM7.js";import{D as u}from"./H2D2PSIU.js";import{i as h,j as x}from"./DCIK6GAB.js";export default $arcgis.t(([{b:g,c:T,d:v,e:y,f:M,g:F,h:A}])=>{async function I(e){let{apiVersion:i,bundles:t,hiddenApiItems:a}=e.toEditorProfileDefinition(),n=await P(e.dictionaryVariables);return{apiVersion:i,bundles:t,variables:n,hiddenApiItems:a?.map(r=>r.toLowerCase())}}async function P(e,i=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await C(t,i);case"feature":return await L(t,i);default:return V(t,i)}}))}function V(e,i){let{name:t,type:a}=e,n=e.getDescription();return{name:t,description:n,type:a,completion:{label:t,detail:t,insertText:t,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:i,documentation:{kind:"markdown",value:n}}}}async function L(e,i){let t=await e.loadSource(),{name:a}=e,n=e.getDescription(),r={label:a,detail:a,insertText:a,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:i},s={name:a,description:n,type:"dictionary",properties:[],completion:r};if(!t)return s;let[o,l]=M(t.fields,n,!0);return s.properties=o,r.documentation={kind:"markdown",value:l},s}async function C(e,i){let{name:t,dictionaryVariables:a}=e,n=e.getDescription(),r=a.reduce((s,o)=>{s!==""&&(s+=`
|
|
5
5
|
|
|
6
6
|
`),s+=`**${o.name}**
|
|
7
7
|
${o.type}`;let l=o.getDescription();return l&&(s+=`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
4
|
-
import{e as b,f as C,g as m,h as u,i as P,j as f,k as v,m as O}from"./
|
|
3
|
+
v4.33.0-next.157 */
|
|
4
|
+
import{e as b,f as C,g as m,h as u,i as P,j as f,k as v,m as O}from"./H2D2PSIU.js";import{k as y,m as E}from"./DCIK6GAB.js";var w=e=>(...i)=>{let t=u(),s=new e(...i),o=s.exports;m(t.at(-1));let r=s.component.manager;r.W(s,o),s.watchExports(r.W.bind(r,s)),P(s);let a=[s.component,...t].reverse();return v(a,n=>n===void 0?void 0:N(s,n,o),o)},N=(e,{host:i,key:t,isReactive:s},o)=>{let r=i,a=r[t]!==e.exports,n=r[t]!==o,c=o!==e.exports;if(a&&!n&&c&&(r[t]=e.exports),i===e.component){if(s){let p=e.component.manager;n&&p.W(e,r[t]),e.onUpdate(h=>{if(h.has(t)){let x=r[t];x!==e.exports&&p.W(e,x)}})}e.O=s?void 0:t}let d=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{r[t]!==e.exports&&(d?f(()=>{r[t]=e.exports}):r[t]=e.exports)})};var L=e=>V(void 0,e);var g=class extends O{constructor(i,t){super(i);let s=this.exports;try{C(this.component);let o=t(this.component,this),r=this.exports!==s;if(b(o)){r||this.setProvisionalExports(o);let a=o.then(n=>{this.exports=n,super.catchUpLifecycle()}).catch(n=>{this.P.reject(n),console.error(n)});this.onLoad(async()=>await a)}else(!r||o!==void 0)&&(this.exports=o),queueMicrotask(()=>super.catchUpLifecycle())}catch(o){this.P.reject(o),console.error(o)}}catchUpLifecycle(){}},V=w(g);var X=L;var Y=e=>(i={})=>L((t,s)=>{let o=y(t.el),r={_lang:o.lang,_t9nLocale:o.t9nLocale,_loading:!0},a=t;s.onLifecycle(()=>E(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:l,lang:d})=>{let p={...l,_lang:d,_t9nLocale:c,_loading:!1};s.exports=p;let h=l.componentLabel;typeof h=="string"&&"label"in t&&t.label==null&&(t.label??=h),n(a.messageOverrides)},i.name));let n=c=>{let l=s.exports,d=l._original??l,p=_(d,c);c&&(p._original=d),s.exports=p};return"messageOverrides"in a&&s.onUpdate(c=>{c.has("messageOverrides")&&n(a.messageOverrides)}),i.blocking?(s.setProvisionalExports(r,!1),s.ready):r}),_=(e,i)=>{if(!i)return e;let t={...e};return Object.entries(i).forEach(([s,o])=>{typeof o=="object"?t[s]=_(e[s],o):t[s]=o??e[s]}),t};export{X as a,Y as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
4
|
-
import{b as u}from"./
|
|
3
|
+
v4.33.0-next.157 */
|
|
4
|
+
import{b as u}from"./ICCAXRYM.js";import{a as f}from"./JNFBWA7U.js";import"./44ZQZJW7.js";import{C as m,a as d,b as i,l as a,y as h}from"./H2D2PSIU.js";import{e as c,o as n}from"./DCIK6GAB.js";import"./DMVIP5KG.js";var g=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-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;function b(l){l.key==="Enter"&&l.stopPropagation()}var o=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this.removeLastPanelRenderer(),this._filterValue=""},this.messages=f(),this._filterValue="",this._flowItemRenderers=[],this._mode="profile",this._mutationCounter=1,this.loading=!1,this.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mode:16,_mutationCounter:16,loading:5,modelId:1,closed:5,variable:0}}static{this.styles=g}load(){this._variableChanged()}willUpdate(e){e.has("modelId")&&(this._flowItemRenderers=[]),e.has("variable")&&this._variableChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_variableChanged(){this._mode=this.variable?.type==="featureSet"?"featureSet":"profile"}addPanelRenderer(e){this._flowItemRenderers=[...this._flowItemRenderers,e]}removeLastPanelRenderer(){this._flowItemRenderers=this._flowItemRenderers.slice(0,-1)}_isMode(e){return this._mode===e}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{c(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget.value}_emitClose(){this.arcgisClose.emit()}_backToTop(){this._flowItemRenderers=[]}_emitItemSelected(e,t){if(t.nonInteractive)return;let s=e;(!s.key||s.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.snippet))}_showCollectionPanel(e,t){e.stopPropagation(),this.addPanelRenderer(s=>this.renderCollectionBasedVariable(t,!1,s))}_getHeadingForCollection(e){if(!e)return"";switch(this._mode){case"profile":return this.messages.profilevariables??"";case"featureSet":return this.messages.fields??""}}_getDescriptionForCollection(e){if(!e)return"";switch(this._mode){case"profile":return e.breadcrumb;case"featureSet":return e.variables[0]?.getLabel()??""}}renderCollectionBasedVariable(e,t=!1,s=!1){if(!e)return null;let r=this.loading;return!r&&!e.loaded&&(e.loadSource().then(()=>setTimeout(()=>{this._mutationCounter+=1})).catch(()=>{console.error("Error loading collection"),r=!1}),r=!0),i`<calcite-flow-item .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${s}><calcite-action slot=header-actions-end .text=${this.messages.backtotop??""} scale=m .hidden=${t||this._isMode("featureSet")} icon=chevrons-left icon-flip-rtl @click=${this._backToTop}></calcite-action><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${r?i`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??""}></calcite-loader>`:i`<calcite-list label=variables>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`}renderEditorVariables(e){let t=n(this._filterValue),s=e.variables.filter(r=>r.passFilter(t));return s.length?s.map(r=>this.renderEditorVariable(r)):i`<div class="notice-container">${this.messages.noitems}</div>`}renderEditorVariable(e){switch(e.type){case"group":return this._isMode("featureSet")&&e.isHeader?i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>`:this._isMode("featureSet")&&e._label?.code==="fields"?this.renderEditorVariables(e):i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>`;default:return i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${t=>this._emitItemSelected(t,e)} @keydown=${t=>this._emitItemSelected(t,e)}>${e.isCollection?i`<calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${t=>this._showCollectionPanel(t,e)} @keydown=${b}></calcite-action>`:null}${e.icon?i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>`:null}</calcite-list-item>`}}render(){return this.closed?null:!this.loading&&this.variable?.loaded&&!this.variable?.variables.length?i`<calcite-flow><calcite-flow-item .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>`:i`<calcite-flow ${u(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable,!0,this._flowItemRenderers.length===0)}${this._flowItemRenderers.map((e,t,s)=>e(t===s.length-1))}</calcite-flow>`}};m("arcgis-editor-variables",o);export{o as ArcgisEditorVariables};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
3
|
+
v4.33.0-next.157 */
|
|
4
4
|
export default $arcgis.t(([l])=>{function u(){return!!window.MonacoEnvironment?.getWorkerUrl}var a="",p=new Map;async function c(t,e){let r=await l(t,{responseType:"text"});return new Worker(URL.createObjectURL(new Blob([r.data],{type:"text/javascript"})),{type:"module"})}function k(t){if(u())return;a=t;let e=`${a}/code-editor`,r={arcade:`${e}/arcade.worker.js`,"arcgis-sql-expression":`${e}/sql-expr.worker.js`,html:`${e}/html.worker.js`,css:`${e}/css.worker.js`,typescript:`${e}/ts.worker.js`,json:`${e}/json.worker.js`,default:`${e}/editor.worker.js`},s={arcade:{url:r.arcade},"arcgis-sql-expression":{url:r["arcgis-sql-expression"]},html:{url:r.html},css:{url:r.css},typescript:{url:r.typescript},javascript:{url:r.typescript},json:{url:r.json},default:{url:r.default}};window.MonacoEnvironment={getWorker:async(w,o)=>{let n=p.get(o);if(n)return await c(n);let{url:i,localWorker:d}=s[o]||s.default;return await c(i)}}}return k},"request")
|