@arcgis/common-components 5.1.0-next.9 → 5.1.0-next.91

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 (121) hide show
  1. package/README.md +24 -1
  2. package/dist/cdn/{7HQMPKZO.js → 3G2YIQ2H.js} +1 -1
  3. package/dist/cdn/3XQ2BXVZ.js +2 -0
  4. package/dist/cdn/{AXTSUI2Q.js → 4VTQRD35.js} +3 -3
  5. package/dist/cdn/BKYTDR46.js +2 -0
  6. package/dist/cdn/{7PB2GGQH.js → BZM2IT6I.js} +1 -1
  7. package/dist/cdn/{23DDMSOB.js → EUASID5E.js} +1 -1
  8. package/dist/cdn/{7CI55VCH.js → HYLC5GEB.js} +1 -1
  9. package/dist/cdn/IFVBIQTC.js +2 -0
  10. package/dist/cdn/{ZLXAKPUH.js → IRNUEFLU.js} +1 -1
  11. package/dist/cdn/K7ZYVDSB.js +2 -0
  12. package/dist/cdn/{4CW7U27R.js → M4VPJH2A.js} +1 -1
  13. package/dist/cdn/MB7UDGWW.js +2 -0
  14. package/dist/cdn/NJDJB5PA.js +2 -0
  15. package/dist/cdn/{4DCAUWTC.js → O6URHY4T.js} +1 -1
  16. package/dist/cdn/{ZOWIFVL3.js → OCSJN2DD.js} +1 -1
  17. package/dist/cdn/{7Y42J3JI.js → ODQFCCON.js} +1 -1
  18. package/dist/cdn/OTH3D6VO.js +2 -0
  19. package/dist/cdn/RKCOXVOG.js +2 -0
  20. package/dist/cdn/TFC6EZUO.js +2 -0
  21. package/dist/cdn/THRWQA3M.js +4 -0
  22. package/dist/cdn/{C6JAR4IN.js → YNZWIV4G.js} +1 -1
  23. package/dist/cdn/{YVSTPEPS.js → YXVSNI5R.js} +1 -1
  24. package/dist/cdn/{J5X5TNVW.js → Z2BJWRNF.js} +1 -1
  25. package/dist/cdn/assets/field-pick-list/t9n/messages.no.json +1 -1
  26. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ar.json +1 -0
  27. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.bg.json +1 -0
  28. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.bs.json +1 -0
  29. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ca.json +1 -0
  30. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.cs.json +1 -0
  31. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.da.json +1 -0
  32. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.de.json +1 -0
  33. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.el.json +1 -0
  34. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.en-US.json +1 -0
  35. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.en.json +1 -0
  36. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.es.json +1 -0
  37. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.et.json +1 -0
  38. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.fi.json +1 -0
  39. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.fr.json +1 -0
  40. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.he.json +1 -0
  41. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.hr.json +1 -0
  42. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.hu.json +1 -0
  43. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.id.json +1 -0
  44. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.it.json +1 -0
  45. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ja.json +1 -0
  46. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ko.json +1 -0
  47. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.lt.json +1 -0
  48. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.lv.json +1 -0
  49. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.nl.json +1 -0
  50. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.no.json +1 -0
  51. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pl.json +1 -0
  52. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pt-BR.json +1 -0
  53. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pt-PT.json +1 -0
  54. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ro.json +1 -0
  55. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ru.json +1 -0
  56. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sk.json +1 -0
  57. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sl.json +1 -0
  58. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sr.json +1 -0
  59. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sv.json +1 -0
  60. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.th.json +1 -0
  61. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.tr.json +1 -0
  62. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.uk.json +1 -0
  63. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.vi.json +1 -0
  64. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-CN.json +1 -0
  65. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-HK.json +1 -0
  66. package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-TW.json +1 -0
  67. package/dist/cdn/index.js +1 -1
  68. package/dist/cdn/main.css +1 -1
  69. package/dist/chunks/commonFunctions.js +7 -3
  70. package/dist/components/arcgis-ckeditor5/customElement.js +11 -11
  71. package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
  72. package/dist/components/arcgis-field-info/customElement.d.ts +2 -2
  73. package/dist/components/arcgis-field-info/utils/basic.d.ts +20 -2
  74. package/dist/components/arcgis-field-pick-list/customElement.d.ts +3 -3
  75. package/dist/components/arcgis-field-pick-list/customElement.js +1 -1
  76. package/dist/components/arcgis-field-pick-list/utils/types.d.ts +20 -2
  77. package/dist/components/arcgis-histogram/customElement.d.ts +10 -10
  78. package/dist/components/arcgis-histogram/customElement.js +81 -90
  79. package/dist/components/arcgis-histogram/types.d.ts +1 -3
  80. package/dist/components/arcgis-label-input/customElement.d.ts +5 -6
  81. package/dist/components/arcgis-label-input/customElement.js +22 -17
  82. package/dist/components/arcgis-picker-input/customElement.js +11 -11
  83. package/dist/components/arcgis-slider/customElement.d.ts +72 -67
  84. package/dist/components/arcgis-slider/customElement.js +349 -304
  85. package/dist/components/arcgis-slider-input/customElement.d.ts +6 -0
  86. package/dist/components/arcgis-slider-input/customElement.js +12 -12
  87. package/dist/components/arcgis-spatial-reference-picker/customElement.d.ts +327 -0
  88. package/dist/components/arcgis-spatial-reference-picker/customElement.js +7702 -0
  89. package/dist/components/arcgis-spatial-reference-picker/index.d.ts +1 -0
  90. package/dist/components/arcgis-spatial-reference-picker/index.js +3 -0
  91. package/dist/components/arcgis-spatial-reference-picker-tree/customElement.d.ts +35 -0
  92. package/dist/components/arcgis-spatial-reference-picker-tree/customElement.js +77 -0
  93. package/dist/components/arcgis-spatial-reference-picker-tree/index.d.ts +1 -0
  94. package/dist/components/arcgis-spatial-reference-picker-tree/index.js +3 -0
  95. package/dist/components/arcgis-ticks/customElement.d.ts +20 -23
  96. package/dist/components/arcgis-ticks/customElement.js +7 -7
  97. package/dist/components/arcgis-ticks/types.d.ts +23 -0
  98. package/dist/components/arcgis-unique-values-list/customElement.d.ts +9 -4
  99. package/dist/components/arcgis-unique-values-list/customElement.js +158 -151
  100. package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +13 -2
  101. package/dist/docs/api.json +1 -1
  102. package/dist/docs/docs.json +1 -1
  103. package/dist/docs/vscode.html-custom-data.json +1 -1
  104. package/dist/docs/web-types.json +1 -1
  105. package/dist/index.d.ts +20 -0
  106. package/dist/loader.js +4 -2
  107. package/dist/types/lumina.d.ts +14 -2
  108. package/dist/types/preact.d.ts +16 -2
  109. package/dist/types/react.d.ts +18 -2
  110. package/dist/types/stencil.d.ts +14 -2
  111. package/dist/utils/spatial-references.d.ts +1 -0
  112. package/dist/utils/types.d.ts +3 -0
  113. package/package.json +5 -6
  114. package/dist/cdn/2BDHDUXG.js +0 -2
  115. package/dist/cdn/3O7GAC23.js +0 -2
  116. package/dist/cdn/57I35HLF.js +0 -2
  117. package/dist/cdn/6DQVLQL6.js +0 -2
  118. package/dist/cdn/EKKJN7WZ.js +0 -2
  119. package/dist/cdn/UTXWKXMT.js +0 -4
  120. package/dist/cdn/XEB2RUND.js +0 -2
  121. package/dist/cdn/ZL3E4ZGE.js +0 -2
package/README.md CHANGED
@@ -1,6 +1,29 @@
1
1
  # ArcGIS Maps SDK for JavaScript - Common Components
2
2
 
3
- The ArcGIS Maps SDK for JavaScript provides a suite of ready-to-use UI components that simplify the process of creating GIS web applications. This package contains the `arcgis-slider` and `arcgis-histogram` components, which can be used as common components to build web mapping applications.
3
+ The ArcGIS Maps SDK for JavaScript provides a suite of ready-to-use UI components that simplify the process of creating GIS web applications. This package contains the [Histogram](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-histogram/), [Slider](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/), and [Ticks](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/) components.
4
+
5
+ Want to get started immediately? See [Get started](https://developers.arcgis.com/javascript/latest/get-started/) or try out the [sample applications](https://developers.arcgis.com/javascript/latest/sample-code/?tagged=common-components).
6
+
7
+ ## Documentation
8
+
9
+ - [Key Features](https://developers.arcgis.com/javascript/latest/key-features/)
10
+ - [Build with npm](https://developers.arcgis.com/javascript/latest/get-started/#use-arcgiscreate)
11
+ - [API and component references](https://developers.arcgis.com/javascript/latest/references/)
12
+ - [Functionality samples](https://developers.arcgis.com/javascript/latest/sample-code/)
13
+ - [TypeScript setup](https://developers.arcgis.com/javascript/latest/get-started/#typescript)
14
+
15
+ ## Resources
16
+
17
+ - [ArcGIS blog](https://blogs.esri.com/esri/arcgis/tag/javascript/)
18
+ - [System Requirements](https://developers.arcgis.com/javascript/latest/system-requirements/)
19
+ - [Terms of Use](https://www.esri.com/en-us/legal/terms/product-specific-scope-of-use)
20
+ - [Licensing](https://developers.arcgis.com/javascript/latest/licensing/)
21
+ - [Working with `next` versions](https://github.com/Esri/feedback-js-api-next/blob/main/README.md)
22
+
23
+ ## Issues
24
+
25
+ - General questions about using this package or the ArcGIS Maps SDK for JavaScript? See the [Esri developer community](https://community.esri.com/t5/arcgis-api-for-javascript/ct-p/arcgis-api-for-javascript).
26
+ - [Technical support](https://support.esri.com/).
4
27
 
5
28
  ## License
6
29
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{B as l,H as e,g as r,i as a}from"./UTXWKXMT.js";var h=r`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}arcgis-ramp-color{block-size:inherit;inline-size:inherit}`,s=class extends l{constructor(){super(...arguments),this._rampStops=[],this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={layout:1,min:9,max:9,stops:0}}static{this.styles=h}willUpdate(t){if(super.willUpdate(t),t.has("stops")){let{stops:p}=this,i=[];p.forEach(c=>{let{color:o,max:m,min:n}=c;i.push({value:n,color:o},{value:m,color:o})}),this._rampStops=i}}render(){return a`<arcgis-ramp-color .layout=${this.layout} .min=${this.min} .max=${this.max} .stops=${this._rampStops}></arcgis-ramp-color>`}};e("arcgis-ramp-color-break",s);export{s as ArcgisRampColorBreak};
2
+ import{B as l,H as e,g as r,i as a}from"./THRWQA3M.js";var h=r`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}arcgis-ramp-color{block-size:inherit;inline-size:inherit}`,s=class extends l{constructor(){super(...arguments),this._rampStops=[],this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={layout:1,min:9,max:9,stops:0}}static{this.styles=h}willUpdate(t){if(super.willUpdate(t),t.has("stops")){let{stops:p}=this,i=[];p.forEach(c=>{let{color:o,max:m,min:n}=c;i.push({value:n,color:o},{value:m,color:o})}),this._rampStops=i}}render(){return a`<arcgis-ramp-color .layout=${this.layout} .min=${this.min} .max=${this.max} .stops=${this._rampStops}></arcgis-ramp-color>`}};e("arcgis-ramp-color-break",s);export{s as ArcgisRampColorBreak};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as k}from"./EPX7DYFW.js";import{b as D}from"./BZM2IT6I.js";import"./HYLC5GEB.js";import{B as V,C as _,D as v,E as u,H as L,g as w,i as $,j as d}from"./THRWQA3M.js";export default $arcgis.t(([{substitute:F}])=>{var N=w`:host{display:block;--arcgis-histogram-bar-color: var(--calcite-color-border-1);--arcgis-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:block;direction:ltr}.svg{display:block;width:100%;height:100%}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;function B(t,n,i,e,r){let[s,a]=r;if(!t||a===0||s===0||i==null||n==null)return null;let o=i-n,l=(t.length>1?t[t.length-1].maxValue-t[0].minValue:0)/o,[c,h]=e==="vertical"?[a*l,s]:[a,s*l],p=t?t.map(m=>m.count):[],g=Math.max(...p);return t.map(m=>{let[f,b]=e==="vertical"?[c/t.length,g!==0?m.count/g*h:0]:[g!==0?m.count/g*c:0,h/t.length],{maxValue:C}=m,y=i-C,[S,z]=e==="vertical"?[0,y*(a/o)]:[s-b-y*(s/o),a-f];return[S,z,b,f]})}function O(t,n,i,e,r){let s=[];return t!=null&&s.push({value:t,symbol:"x\u0304",lineClass:"average-data-line"}),n!=null&&i!=null&&e!=null&&s.push(...H(i,e,n,t)),r&&s.push(...r),s}function A(t,n,i,e,r){if(i==null)return[0,0,0,0];let s=Math.round((r-i)/e*100)/100,[a,o]=t;if(n==="vertical"){let c=o-s*o||1;return c=Math.round(c)+.5,[0,"100%",c,c]}let l=s*a||1;return l=Math.round(l)+.5,[l,l,"100%",0]}function P(t,n,i,e,r){if(i==null)return[0,0];let s=Math.round((r-i)/e*100)/100,[a,o]=t;return n==="vertical"?[a,o-s*o]:[0,s*a]}function T(t,n,i){if(!t||t.length===0)return null;if(I(t)){let e=t.map(r=>({...r,color:E(r.color??i)}));return e.unshift({color:n,minValue:Number.NEGATIVE_INFINITY,maxValue:e[0].minValue}),e.push({color:n,minValue:e[e.length-1].maxValue,maxValue:Number.POSITIVE_INFINITY}),e}else return t.map(e=>({...e,color:E(e.color??i)}))}function R(t,n,i,e){if(!t||t.length===0)return i;if(I(t)){let r=G(t,n);if(r.length===0)return i;if(e){let{color:s=i,weight:a}=r[0],{color:o=i,weight:l}=r[1]??r[0],c=a+l;return`color-mix(in srgb, ${s} ${a/c*100}%, ${o} ${l/c*100}%)`}return r[0].color??i}return Y(t,n)}function G(t,n){let i=[];for(let e of t){let r=Math.max(0,Math.min(n.maxValue,e.maxValue)-Math.max(n.minValue,e.minValue));r>0&&i.push({color:e.color,weight:r})}return i.sort((e,r)=>r.weight-e.weight)}function Y(t,n){let i=(n.maxValue-n.minValue)/2+n.minValue;if(i>t[t.length-1].value)return t[t.length-1].color;for(let e=0;e<t.length-1;e++){let r=t[e],s=t[e+1];if(i<=r.value)return r.color;if(i<s.value){let a=(i-r.value)/(s.value-r.value)*100;return`color-mix(in srgb, ${r.color}, ${s.color} ${a}%)`}}return t[t.length-1].color}function I(t){return t[0]!=null&&"minValue"in t[0]}function E(t){if(typeof t=="string")return t;if(Array.isArray(t))return`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]??1})`;let{r:n,g:i,b:e,a:r=1}=t;return`rgba(${n}, ${i}, ${e}, ${r})`}function H(t,n,i,e){let r=.06*(n-t);return U(i,e).filter(s=>Math.abs(e-s)>r).map((s,a,o)=>{let l=o.length/2,c=s>e?"+":"-",h=a>=l?a-l+1:l-a;return{symbol:`${c}${h===1?"":h}\u03C3`,value:s}})}function U(t,n){if(n==null||t==null)return[];let i=1,e=[];for(let r=i*-1;r<=i;r++)r!==0&&e.push(n+r*t);return e}var M="var(--arcgis-histogram-bar-color)",q="var(--arcgis-histogram-stop-color)",x=class extends V{constructor(){super(...arguments),this._messages=D(),this._normalizedStops=null,this._formatLabel=n=>k(this._messages._lang,this._numberFormatterOptions).format(n),this._numberFormatterOptions={maximumFractionDigits:2},this.containerDimensions=[0,0],this.icon="graph-histogram",this.layout="horizontal",this.colorBlendingEnabled=!1}static{this.properties={containerDimensions:16,colorStops:0,icon:3,average:11,messageOverrides:0,standardDeviation:11,bins:0,dataLines:0,label:1,layout:3,max:11,min:11,colorBlendingEnabled:5}}static{this.styles=N}loaded(){let n=new ResizeObserver(r=>{for(let s of r){let{width:a,height:o}=s.contentRect;this.containerDimensions=[a,o]}}),{width:i,height:e}=this.el.getBoundingClientRect();this.containerDimensions=[i,e],n.observe(this.el)}willUpdate(n){n.has("colorStops")&&(this._normalizedStops=T(this.colorStops,M,q))}render(){let{label:n}=this;return $`<div role=img .ariaLabel=${n??void 0} class="content">${this._renderContent()}</div>`}_renderContent(){let{containerDimensions:[n,i]}=this,e="bg-fill";return n?$`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${d`<defs><clipPath id=${e}><rect height=${i??u} width=${n??u} x=0 y=0 /></clipPath></defs><g style=${v({clipPath:`url(#${e})`})}><g>${this._renderBars()}</g></g><g>${this._renderLines()}</g>`}</svg>`:null}_renderBars(){let{bins:n,_messages:i}=this,e=B(this.bins,this.min,this.max,this.layout,this.containerDimensions);return!e||!n?null:e.map((r,s)=>{let[a,o,l,c]=r,h=n[s],p=i?.barLabel?F(i.barLabel,h):"";return d`<rect style=${v({fill:R(this._normalizedStops,h,M,this.colorBlendingEnabled)})} .ariaLabel=${p} data-index=${s??u} height=${c??u} role=img shape-rendering=crispEdges stroke-width=0 width=${l??u} x=${a??u} y=${o??u} />`})}_renderLines(){return O(this.average,this.standardDeviation,this.min,this.max,this.dataLines)?.map(n=>W({dataLine:n,containerDimensions:this.containerDimensions,layout:this.layout,min:this.min,max:this.max,labelFormatter:this._formatLabel}))}},W=t=>{let{containerDimensions:n,layout:i,min:e,max:r,dataLine:s,labelFormatter:a}=t,o=r!=null&&e!=null?r-e:0,[l,c,h,p]=A(n,i,e,o,s.value),[g,m]=P(n,i,e,o,s.value),f="symbol"in s?[d`<tspan class="data-line-symbol">${s.symbol}</tspan>`,d`<tspan>${a(s.value)}</tspan>`]:s.label,b="lineClass"in s&&s.lineClass?s.lineClass:"data-line";return d`<g><title>${s.value}</title><line class=${_(b)} shape-rendering=crispEdges x1=${l??u} x2=${c??u} y1=${h??u} y2=${p??u} /><text class="label" text-anchor=end transform=${(i==="horizontal"?"rotate(270)":void 0)??u} x=${g??u} y=${m-2}>${f}</text></g>`};L("arcgis-histogram",x);return x},"intl")