@arcgis/coding-components 6.0.0-next.2 → 6.0.0-next.21

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.
Files changed (56) hide show
  1. package/dist/cdn/{AFPDVDE4.js → 33G24YP5.js} +1 -1
  2. package/dist/cdn/4APBBNML.js +2 -0
  3. package/dist/cdn/4MR4EZL5.js +2 -0
  4. package/dist/cdn/{S3HNLKHY.js → 5ETXQTFV.js} +1 -1
  5. package/dist/cdn/65O2GRVU.js +2 -0
  6. package/dist/cdn/{DGJ7J5FA.js → 6X5E2FQY.js} +1 -1
  7. package/dist/cdn/{D6IZDRAG.js → 7BYBL64S.js} +1 -1
  8. package/dist/cdn/{T3ZUZZY2.js → AOSAUASU.js} +1 -1
  9. package/dist/cdn/BOPEWHCY.js +2 -0
  10. package/dist/cdn/EDIKES26.js +2 -0
  11. package/dist/cdn/ELFZ2HPG.js +3 -0
  12. package/dist/cdn/FJUNA7R5.js +66 -0
  13. package/dist/cdn/H4EXVF6I.js +2 -0
  14. package/dist/cdn/HJQELFBQ.js +2 -0
  15. package/dist/cdn/HNY5HG5D.js +2 -0
  16. package/dist/cdn/LRDZSZW3.js +2 -0
  17. package/dist/cdn/O7IT7ZNK.js +4 -0
  18. package/dist/cdn/{QAELK3EI.js → OXS6MSEY.js} +1 -1
  19. package/dist/cdn/{YEFVOAFD.js → PVLAI7SG.js} +1 -1
  20. package/dist/cdn/{OJKCX7KO.js → Q65ZQT4X.js} +1 -1
  21. package/dist/cdn/{7IPPBEPF.js → QDGDDIZG.js} +1 -1
  22. package/dist/cdn/RYQS3S5A.js +2 -0
  23. package/dist/cdn/T7TLTXT2.js +4 -0
  24. package/dist/cdn/{A4GZ33K7.js → U4RRLHUQ.js} +1 -1
  25. package/dist/cdn/U7RK2UUX.js +2 -0
  26. package/dist/cdn/{KLUYWWAO.js → UDIKBS5V.js} +1 -1
  27. package/dist/cdn/UWA7I2DG.js +2 -0
  28. package/dist/cdn/{GLGGJTZV.js → VHRD4SVJ.js} +5 -5
  29. package/dist/cdn/{DWVVNZOV.js → WQYP2QLK.js} +1 -1
  30. package/dist/cdn/{T4YNKW5K.js → XEH5I4IM.js} +1 -1
  31. package/dist/cdn/YZF3CMPQ.js +2 -0
  32. package/dist/cdn/assets/code-editor/editor.worker.js +5 -1
  33. package/dist/cdn/assets/code-editor/sql-expr.worker.js +5552 -5552
  34. package/dist/cdn/index.js +1 -1
  35. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  36. package/dist/docs/api.json +1 -1
  37. package/dist/docs/docs.json +1 -1
  38. package/dist/docs/web-types.json +1 -1
  39. package/package.json +9 -9
  40. package/dist/cdn/2K2DUTEX.js +0 -3
  41. package/dist/cdn/33VE4JBP.js +0 -2
  42. package/dist/cdn/5M4Y6BPH.js +0 -2
  43. package/dist/cdn/FEQYLZXB.js +0 -2
  44. package/dist/cdn/JTDC4MHL.js +0 -2
  45. package/dist/cdn/JUVALRBX.js +0 -2
  46. package/dist/cdn/M76B3W3Y.js +0 -4
  47. package/dist/cdn/N4JLGDFS.js +0 -4
  48. package/dist/cdn/NSOQN5L7.js +0 -2
  49. package/dist/cdn/P4SMRR2P.js +0 -2
  50. package/dist/cdn/QS6XQXBD.js +0 -2
  51. package/dist/cdn/RT5UOROF.js +0 -68
  52. package/dist/cdn/S52OMKJQ.js +0 -2
  53. package/dist/cdn/S5M6I2QL.js +0 -2
  54. package/dist/cdn/TOIOFT2S.js +0 -2
  55. package/dist/cdn/UH3YO32A.js +0 -2
  56. package/dist/cdn/Y735OZSU.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import c from"./GLGGJTZV.js";import a from"./VFCQQ2QW.js";import{i as m}from"./P4SMRR2P.js";import{b as h,c as g,d as b}from"./BQAEB2CG.js";import{a as F}from"./XUZB7XNL.js";import{L as f}from"./N4JLGDFS.js";import{El as w}from"./P3M7MP34.js";export default $arcgis.t(([{i:y,n:l},{l:M,o:v,p:P}])=>{var E={allowAllRootBinaryOperators:!1,requiresPredicateRootNode:!1},x={"field-calculation":E,"where-clause":{allowAllRootBinaryOperators:!0,requiresPredicateRootNode:!0,allowGeometryFields:!0}};function S(e){return e&&e in x?x[e]:void 0}var R=e=>{let t=e.variables[0],r=t?.type==="featureSet"?V(t):void 0,{apiVersion:i,bundles:s,hiddenApiItems:a}=e.toEditorProfileDefinition();return{apiVersion:i,bundles:s,variables:r?[r]:[],hiddenApiItems:a?.map(o=>o.toLowerCase())}};function V(e){let{name:t}=e,r=e.getDescription(),{definition:i}=e.toProfileVariableDefinition(),s={label:t,detail:t,insertText:t,insertTextMode:b.asIs,insertTextFormat:g.PlainText,kind:h.Field},a={name:t,description:r,type:"dictionary",properties:[],completion:s};if(!i||!("fields"in i))return a;let[o,n]=M(i.fields,r,{includeAliases:!1,supportGeometryFields:!0});return a.properties=o,s.documentation={kind:"markdown",value:n},a}var A=[{name:"$layer",type:"featureSet",description:"The layer being calculated."}],$={"field-calculation":{id:"field-calculation",variables:A},"where-clause":{id:"where-clause",variables:A}};function k(e){return $[e]??null}function C(e){if(!l(e))return;let t=k(e.id);if(!t)return;let r={variables:[],hiddenApiItems:e.hiddenApiItems?.map(i=>i.toLowerCase())};return t.variables.forEach(i=>{if(e.disabledVariables?.includes(i.name))return;let s=e.definitions[i.name];if(i.type==="featureSet")return y(s)?r.variables.push({...i,type:i.type,definition:s}):void 0;throw Error(`sdkVariable type not supported (yet) type: ${i.type}`)}),r}var q="arcgis-sql-expression",p=class extends P{constructor(){super(q,{apiPath:"./assets/sql-language/api",apiPrefix:"sql-api.t9n."}),this._languageId=q,this._layerMap=new Map}updateFeatureLayerForModel(t,r){let i=this._getApiKey(t);this._layerMap.set(i,r)}getFeatureLayerForModel(t){let r=this._getApiKey(t);return this._layerMap.get(r)}async setProfileForModel(t,r,i={locale:"en"}){let s=l(r)?S(r.id):void 0;l(r)&&(r=C(r));let a=await m(i.locale,f("./assets/editor-profile/t9n"),"messages.");if(!a)throw new Error(`Failed to load the language bundle for ${i.locale}`);this.disposeForModel(t);let o=this._getApiKey(t),n=new v(r,a,i.locale,s);this._modelToProfileMap.set(o,n);let L=R(n);this.updateApiContextForModel(t,{locale:i.locale,profile:L,...s?{profilePolicy:s}:{}});let u=r?.variables?.find(_=>_.name==="$layer");u&&this.updateFeatureLayerForModel(t,u.definition)}},d=new p,U={setProfileForModel:d.setProfileForModel.bind(d),getApiLibraryForModel:d.getApiLibraryForModel.bind(d)};var D=["arcade","arcgis-sql-expression","sql-layer-sql-server","sql-layer-postgres","sql-layer-bigquery"],c=new Set,T=new Map;function I(e){let t=T.get(e);return t||(t=Promise.withResolvers(),T.set(e,t)),t}function J(e){I(e).resolve()}function Q(e){return D.includes(e)?I(e).promise:Promise.resolve()}function W(e,t){return()=>{c.has(e)||c.add(e),t()}}async function X(e){c.has(e)||(await F()).createModel("",e,w.parse("")).dispose()}async function Y(){return await import("./S5M6I2QL.js").then(m=>m.default)}return{a:d,b:J,c:Q,d:W,e:X,f:Y}},a,c)
2
+ import c from"./VHRD4SVJ.js";import a from"./VFCQQ2QW.js";import{c as m}from"./RYQS3S5A.js";import{b as h,c as g,d as b}from"./BQAEB2CG.js";import{a as F}from"./XUZB7XNL.js";import{L as f}from"./O7IT7ZNK.js";import{El as w}from"./P3M7MP34.js";export default $arcgis.t(([{i:y,n:l},{l:M,o:v,p:P}])=>{var E={allowAllRootBinaryOperators:!1,requiresPredicateRootNode:!1},x={"field-calculation":E,"where-clause":{allowAllRootBinaryOperators:!0,requiresPredicateRootNode:!0,allowGeometryFields:!0}};function S(e){return e&&e in x?x[e]:void 0}var R=e=>{let t=e.variables[0],r=t?.type==="featureSet"?V(t):void 0,{apiVersion:i,bundles:s,hiddenApiItems:a}=e.toEditorProfileDefinition();return{apiVersion:i,bundles:s,variables:r?[r]:[],hiddenApiItems:a?.map(o=>o.toLowerCase())}};function V(e){let{name:t}=e,r=e.getDescription(),{definition:i}=e.toProfileVariableDefinition(),s={label:t,detail:t,insertText:t,insertTextMode:b.asIs,insertTextFormat:g.PlainText,kind:h.Field},a={name:t,description:r,type:"dictionary",properties:[],completion:s};if(!i||!("fields"in i))return a;let[o,n]=M(i.fields,r,{includeAliases:!1,supportGeometryFields:!0});return a.properties=o,s.documentation={kind:"markdown",value:n},a}var A=[{name:"$layer",type:"featureSet",description:"The layer being calculated."}],$={"field-calculation":{id:"field-calculation",variables:A},"where-clause":{id:"where-clause",variables:A}};function k(e){return $[e]??null}function C(e){if(!l(e))return;let t=k(e.id);if(!t)return;let r={variables:[],hiddenApiItems:e.hiddenApiItems?.map(i=>i.toLowerCase())};return t.variables.forEach(i=>{if(e.disabledVariables?.includes(i.name))return;let s=e.definitions[i.name];if(i.type==="featureSet")return y(s)?r.variables.push({...i,type:i.type,definition:s}):void 0;throw Error(`sdkVariable type not supported (yet) type: ${i.type}`)}),r}var q="arcgis-sql-expression",p=class extends P{constructor(){super(q,{apiPath:"./assets/sql-language/api",apiPrefix:"sql-api.t9n."}),this._languageId=q,this._layerMap=new Map}updateFeatureLayerForModel(t,r){let i=this._getApiKey(t);this._layerMap.set(i,r)}getFeatureLayerForModel(t){let r=this._getApiKey(t);return this._layerMap.get(r)}async setProfileForModel(t,r,i={locale:"en"}){let s=l(r)?S(r.id):void 0;l(r)&&(r=C(r));let a=await m(i.locale,f("./assets/editor-profile/t9n"),"messages.");if(!a)throw new Error(`Failed to load the language bundle for ${i.locale}`);this.disposeForModel(t);let o=this._getApiKey(t),n=new v(r,a,i.locale,s);this._modelToProfileMap.set(o,n);let L=R(n);this.updateApiContextForModel(t,{locale:i.locale,profile:L,...s?{profilePolicy:s}:{}});let u=r?.variables?.find(_=>_.name==="$layer");u&&this.updateFeatureLayerForModel(t,u.definition)}},d=new p,U={setProfileForModel:d.setProfileForModel.bind(d),getApiLibraryForModel:d.getApiLibraryForModel.bind(d)};var D=["arcade","arcgis-sql-expression","sql-layer-sql-server","sql-layer-postgres","sql-layer-bigquery"],c=new Set,T=new Map;function I(e){let t=T.get(e);return t||(t=Promise.withResolvers(),T.set(e,t)),t}function J(e){I(e).resolve()}function Q(e){return D.includes(e)?I(e).promise:Promise.resolve()}function W(e,t){return()=>{c.has(e)||c.add(e),t()}}async function X(e){c.has(e)||(await F()).createModel("",e,w.parse("")).dispose()}async function Y(){return await import("./HNY5HG5D.js").then(m=>m.default)}return{a:d,b:J,c:Q,d:W,e:X,f:Y}},a,c)
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import b from"./GLGGJTZV.js";import a from"./VFCQQ2QW.js";import{h as v,i as T}from"./P4SMRR2P.js";import{b as f,c,d as p}from"./BQAEB2CG.js";import{L as m}from"./N4JLGDFS.js";export default $arcgis.t(([{getDeclaredPixelMembers:$},{G:w,f:M,g:F,h:k,i:P,j:A,n:b},{k:I,l:L,m:V,o:C,p:D}])=>{async function K(e){let{apiVersion:r,bundles:t,hiddenApiItems:n}=e.toEditorProfileDefinition(),s=await j(e.dictionaryVariables.filter(w));return{apiVersion:r,bundles:t,variables:s,hiddenApiItems:n?.map(o=>o.toLowerCase())}}async function j(e,r=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await O(t,r);case"pixel":return await B(t,r);case"voxel":case"feature":return await q(t,r);default:return _(t,r)}}))}function _(e,r){let{name:t,type:n}=e,s=e.getDescription(),o=r===f.Field?I(t,!1):t;return{name:t,description:s,type:n,completion:{label:t,detail:t,insertText:o,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r,documentation:{kind:"markdown",value:s}}}}async function q(e,r){let t=await e.loadSource(),{name:n}=e,s=e.getDescription(),o={label:n,detail:n,insertText:n,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},a={name:n,description:s,type:"dictionary",properties:[],completion:o};if(!t)return a;let[i,l]=L(t.fields,s,{includeAliases:!0});return a.properties=i,o.documentation={kind:"markdown",value:l},a}async function B(e,r){let t=await e.loadSource(),n=e.toProfileVariableDefinition();if(n.type!=="pixel")throw new Error("Incorrect definition passed to pixel variable");let{name:s}=e,o=e.getDescription(),a={label:s,detail:s,insertText:s,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},i={name:s,description:o,type:"dictionary",properties:[],completion:a};if(!t||!n.definition)return i;let l=await $(t),[d,u]=V(l,o);return i.properties=d,a.documentation={kind:"markdown",value:u},i}async function O(e,r){let{name:t,dictionaryVariables:n}=e,s=e.getDescription(),o=n.reduce((a,i)=>{a!==""&&(a+=`
2
+ import b from"./VHRD4SVJ.js";import a from"./VFCQQ2QW.js";import{a as v,c as T}from"./RYQS3S5A.js";import{b as f,c,d as p}from"./BQAEB2CG.js";import{L as m}from"./O7IT7ZNK.js";export default $arcgis.t(([{getDeclaredPixelMembers:$},{G:w,f:M,g:F,h:k,i:P,j:A,n:b},{k:I,l:L,m:V,o:C,p:D}])=>{async function K(e){let{apiVersion:r,bundles:t,hiddenApiItems:n}=e.toEditorProfileDefinition(),s=await j(e.dictionaryVariables.filter(w));return{apiVersion:r,bundles:t,variables:s,hiddenApiItems:n?.map(o=>o.toLowerCase())}}async function j(e,r=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await O(t,r);case"pixel":return await B(t,r);case"voxel":case"feature":return await q(t,r);default:return _(t,r)}}))}function _(e,r){let{name:t,type:n}=e,s=e.getDescription(),o=r===f.Field?I(t,!1):t;return{name:t,description:s,type:n,completion:{label:t,detail:t,insertText:o,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r,documentation:{kind:"markdown",value:s}}}}async function q(e,r){let t=await e.loadSource(),{name:n}=e,s=e.getDescription(),o={label:n,detail:n,insertText:n,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},a={name:n,description:s,type:"dictionary",properties:[],completion:o};if(!t)return a;let[i,l]=L(t.fields,s,{includeAliases:!0});return a.properties=i,o.documentation={kind:"markdown",value:l},a}async function B(e,r){let t=await e.loadSource(),n=e.toProfileVariableDefinition();if(n.type!=="pixel")throw new Error("Incorrect definition passed to pixel variable");let{name:s}=e,o=e.getDescription(),a={label:s,detail:s,insertText:s,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},i={name:s,description:o,type:"dictionary",properties:[],completion:a};if(!t||!n.definition)return i;let l=await $(t),[d,u]=V(l,o);return i.properties=d,a.documentation={kind:"markdown",value:u},i}async function O(e,r){let{name:t,dictionaryVariables:n}=e,s=e.getDescription(),o=n.reduce((a,i)=>{a!==""&&(a+=`
3
3
 
4
4
  `),a+=`**${i.name}**
5
5
  ${i.type}`;let l=i.getDescription();return l&&(a+=`
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as w}from"./FJUNA7R5.js";import{b as _,c as n,d as v}from"./VVFPLSXK.js";import{a as f,b}from"./33G24YP5.js";import{a as p}from"./AOSAUASU.js";import{c as m,e as r}from"./65O2GRVU.js";import"./RYQS3S5A.js";import"./BQAEB2CG.js";import"./XUZB7XNL.js";import"./N3TIODOB.js";import"./SVYY36W2.js";import{F as c,G as u,K as h,h as d,j as s,l,n as a}from"./O7IT7ZNK.js";import"./C3LWMJ56.js";import"./P3M7MP34.js";import"./TAVTDQ6S.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=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}}}`,g=class extends u{constructor(){super(...arguments),this._beforeBack=()=>new Promise(e=>{this._selectedSuggestion=void 0,e()}),this.messages=p(),this._shouldIgnoreDoubleClick=f(),this._colorizeStyle="",this._filterValue="",this.closed=!1,this.arcgisInternalClosePanel=a({bubbles:!1,composed:!1}),this.arcgisInternalItemSelected=a({bubbles:!1,composed:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}static{this.styles=$}load(){this._colorizeStyle=n(),this._themeChangedListener=v(()=>this._colorizeStyle=n())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{r(m(e.querySelector("calcite-flow-item:last-child")??e,"calcite-input"))}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e}_emitItemSelected(e,t){if(this._shouldIgnoreDoubleClick(e))return;let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisInternalItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisInternalClosePanel.emit()}_colorizeCode(e){e!==void 0&&_(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=b(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??l}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??l}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??l} ${c(r)}>${this.messages.insert}</calcite-button><calcite-block expanded .heading=${e.label} .description=${e.description}><div .innerHTML=${w(e.documentation)??""}></div><pre><code ${c(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return this.closed?null:s`<style>${this._colorizeStyle}</style><calcite-flow ${c(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=${e=>this._updateFilterValue(e.currentTarget.value)} class="sticky" scale=m></calcite-input><calcite-list .label=${this.messages.suggestions??"Suggestions"}>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};h("arcgis-arcade-suggestions",g);export{g as ArcgisArcadeSuggestions};
@@ -9947,6 +9947,10 @@ function n1(t) {
9947
9947
  });
9948
9948
  return e;
9949
9949
  }
9950
+ let r1 = !1;
9951
+ function s1() {
9952
+ return r1;
9953
+ }
9950
9954
  self.onmessage = () => {
9951
- n1(() => ({}));
9955
+ s1() || n1(() => ({}));
9952
9956
  };