@arcgis/common-components 5.2.0-next.6 → 5.2.0-next.60
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/README.md +2 -2
- package/dist/cdn/4S3TDYPJ.js +2 -0
- package/dist/cdn/5HXH344K.js +2 -0
- package/dist/cdn/6DGHVYTV.js +2 -0
- package/dist/cdn/7SJH7FOK.js +2 -0
- package/dist/cdn/ADYTRVI3.js +2 -0
- package/dist/cdn/BMAH7QBK.js +2 -0
- package/dist/cdn/{232BH3SJ.js → BOSIIV32.js} +1 -1
- package/dist/cdn/DFDXMCOB.js +2 -0
- package/dist/cdn/DWUHV2MR.js +2 -0
- package/dist/cdn/EJYLPUWU.js +2 -0
- package/dist/cdn/G3IYOM43.js +2 -0
- package/dist/cdn/HY65JC4L.js +2 -0
- package/dist/cdn/I6VYJHWH.js +2 -0
- package/dist/cdn/J2J3YRCY.js +2 -0
- package/dist/cdn/JZRBBRRT.js +2 -0
- package/dist/cdn/L5RQNCAS.js +2 -0
- package/dist/cdn/NNP2GXAL.js +2 -0
- package/dist/cdn/{OOBX2C2L.js → PECTYCLV.js} +1 -1
- package/dist/cdn/PFBJ5AAH.js +2 -0
- package/dist/cdn/PMV2N3L3.js +2 -0
- package/dist/cdn/{YVCGEEMG.js → SQL3PEL7.js} +1 -1
- package/dist/cdn/T62KUQBN.js +2 -0
- package/dist/cdn/{YG4PY2H3.js → TJ7PO6GP.js} +1 -1
- package/dist/cdn/TTH3HGVV.js +2 -0
- package/dist/cdn/TWW63D32.js +2 -0
- package/dist/cdn/UI52HM3O.js +2 -0
- package/dist/cdn/WLDOB2AM.js +2 -0
- package/dist/cdn/{MINFRX4Y.js → XCIAOWMG.js} +1 -1
- package/dist/cdn/{6XE5JNJ7.js → XG35NKST.js} +3 -3
- package/dist/cdn/{WJ3TYWP2.js → XRQOTHR7.js} +1 -1
- package/dist/cdn/Z5QBBHLD.js +2 -0
- package/dist/cdn/assets/slider-field/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-utils.js +52 -40
- package/dist/chunks/locale.js +14 -6
- package/dist/components/arcgis-ckeditor5/customElement.d.ts +6 -1
- package/dist/components/arcgis-ckeditor5/customElement.js +2 -2
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.js +6 -6
- package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +6 -1
- package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
- package/dist/components/arcgis-field-info/customElement.js +245 -213
- package/dist/components/arcgis-field-info/index.js +1 -0
- package/dist/components/arcgis-field-info/utils/basic.d.ts +3 -1
- package/dist/components/arcgis-field-pick-list/customElement.js +43 -51
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
- package/dist/components/arcgis-histogram/customElement.d.ts +30 -0
- package/dist/components/arcgis-histogram/customElement.js +103 -90
- package/dist/components/arcgis-picker-input/customElement.d.ts +6 -2
- package/dist/components/arcgis-picker-input/customElement.js +7 -7
- package/dist/components/arcgis-slider/customElement.d.ts +4 -3
- package/dist/components/arcgis-slider/customElement.js +308 -288
- package/dist/components/arcgis-slider-field/customElement.d.ts +292 -0
- package/dist/components/arcgis-slider-field/customElement.js +375 -0
- package/dist/components/arcgis-slider-field/index.d.ts +1 -0
- package/dist/components/arcgis-slider-field/index.js +2 -0
- package/dist/components/arcgis-ticks/customElement.js +100 -79
- package/dist/components/arcgis-unique-values-list/customElement.js +26 -26
- package/dist/components/arcgis-value-picker/customElement.d.ts +377 -0
- package/dist/components/arcgis-value-picker/customElement.js +87 -0
- package/dist/components/arcgis-value-picker/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker/index.js +3 -0
- package/dist/components/arcgis-value-picker/types.d.ts +69 -0
- package/dist/components/arcgis-value-picker-collection/customElement.d.ts +113 -0
- package/dist/components/arcgis-value-picker-collection/customElement.js +43 -0
- package/dist/components/arcgis-value-picker-collection/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-collection/index.js +1 -0
- package/dist/components/arcgis-value-picker-combobox/customElement.d.ts +90 -0
- package/dist/components/arcgis-value-picker-combobox/customElement.js +55 -0
- package/dist/components/arcgis-value-picker-combobox/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-combobox/index.js +3 -0
- package/dist/components/arcgis-value-picker-label/customElement.d.ts +81 -0
- package/dist/components/arcgis-value-picker-label/customElement.js +51 -0
- package/dist/components/arcgis-value-picker-label/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-label/index.js +1 -0
- package/dist/components/arcgis-value-picker-slider/customElement.d.ts +173 -0
- package/dist/components/arcgis-value-picker-slider/customElement.js +60 -0
- package/dist/components/arcgis-value-picker-slider/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-slider/index.js +3 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +60 -0
- package/dist/loader.js +11 -5
- package/dist/types/lumina.d.ts +46 -1
- package/dist/types/preact.d.ts +52 -1
- package/dist/types/react.d.ts +58 -1
- package/dist/types/stencil.d.ts +46 -1
- package/package.json +5 -5
- package/dist/cdn/2MN6S2HH.js +0 -2
- package/dist/cdn/4BJYJUMR.js +0 -2
- package/dist/cdn/5I5ODGDD.js +0 -2
- package/dist/cdn/AGGCAE6P.js +0 -2
- package/dist/cdn/BDF4ZLUF.js +0 -2
- package/dist/cdn/F45Q3BRT.js +0 -2
- package/dist/cdn/GEWXC2ZR.js +0 -2
- package/dist/cdn/HWEOBUAY.js +0 -2
- package/dist/cdn/IRIB5DXG.js +0 -2
- package/dist/cdn/KPJCYYYQ.js +0 -2
- package/dist/cdn/NKMDS2IH.js +0 -2
- package/dist/cdn/ORSF6IOL.js +0 -2
- package/dist/cdn/QEW7H22O.js +0 -2
- package/dist/cdn/UMIMGOKS.js +0 -2
- package/dist/cdn/VUQJROFR.js +0 -2
- package/dist/cdn/YSXFXVP6.js +0 -2
- package/dist/cdn/YVWFGK4M.js +0 -2
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.en-US.json +0 -1
- /package/dist/cdn/{ECNI2A4K.js → XEK22IDA.js} +0 -0
- /package/dist/chunks/{commonFunctions.js → general.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
var o=new WeakMap,f=new WeakMap;function m(n,t){let{formatter:r,lang:e}=o.get(t)??{};if(e===n&&r)return r;let a=new Intl.NumberFormat(n,t);return o.set(t,{lang:n,formatter:a}),a}function s(n,t){let{formatter:r,lang:e}=f.get(t)??{};if(e===n&&r)return r;let a=new Intl.DateTimeFormat(n,t);return f.set(t,{lang:n,formatter:a}),a}export{m as a,s as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{D as p,J as m,h as l,j as e}from"./PECTYCLV.js";export default $arcgis.t(([t])=>{var h=l`: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}`,c=new t([0,121,193]),o=class extends p{constructor(){super(...arguments),this._rampStops=[],this.fillColor=c.clone(),this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={fillColor:1,layout:1,min:9,max:9,stops:0}}static{this.styles=h}willUpdate(s){if(super.willUpdate(s),s.has("fillColor")||s.has("stops")){let{stops:n,fillColor:i}=this,r=(i instanceof t?i:t.fromString(i)??c).toRgb();this._rampStops=n.map(a=>({color:new t(r&&[...r,a.opacity]),value:a.value}))}}render(){return e`<arcgis-ramp-color .layout=${this.layout} .stops=${this._rampStops} .min=${this.min} .max=${this.max}></arcgis-ramp-color>`}};m("arcgis-ramp-opacity",o);return o},"Color")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{D as $,E as o,F as k,G as b,J as M,h as w,j as h,s as _}from"./PECTYCLV.js";export default $arcgis.t(([{formatNumber:T}])=>{var l={container:"container",ticksContainer:"ticks-container",labelsContainer:"labels-container",tick:"tick",tickMin:"tick--min",tickMax:"tick--max",tickLabel:"tick-label",tickLabelFocused:"tick-label--focused",tickLabelText:"tick-label-text",baseline:"baseline"},B=w`:host{display:flex;--arcgis-ticks-font-size: var(--calcite-font-size--2);--arcgis-ticks-font-weight: var(--calcite-font-weight-medium);--arcgis-ticks-gap: 1em;--arcgis-ticks-tick-color: var(--calcite-color-border-input);--arcgis-ticks-tick-length: .5rem;--arcgis-ticks-tick-transform: translateX(-50%);--arcgis-ticks-tick-width: .125rem}.container{align-items:stretch;display:flex;color:var(--calcite-color-text-2);flex:1;font-weight:var(--arcgis-ticks-font-weight);font-size:var(--arcgis-ticks-font-size);line-height:1em;position:relative;user-select:none;word-wrap:normal;word-break:normal}.baseline{background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick{position:absolute;background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick-label{position:absolute;text-align:var(--arcgis-ticks-label-text-align, center);width:var(--arcgis-ticks-label-width, var(--labels-container-width, "auto"))}.tick-label-text:hover{text-decoration:underline}.tick-label-text{display:inline-block;line-height:1}.tick-label--focused .tick-label-text{outline:2px solid var(--calcite-color-focus, var(--calcite-color-brand));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:dir(rtl){.tick-label{direction:rtl}}:host([layout="horizontal"]){.ticks-container{height:var(--arcgis-ticks-tick-length)}.labels-container{height:var(--labels-container-height, "auto")}.tick{width:var(--arcgis-ticks-tick-width);height:var(--arcgis-ticks-tick-length);transform:var(--arcgis-ticks-tick-transform)}.tick-label{transform:translate(-50%)}.tick--min{transform:unset}.tick--max{transform:translate(-100%)}}:host([layout="vertical"]){.ticks-container{width:var(--arcgis-ticks-tick-length)}.labels-container{width:var(--labels-container-width)}.tick{width:var(--arcgis-ticks-tick-length);height:var(--arcgis-ticks-tick-width);transform:translateY(50%)}.tick-label{text-align:right;transform:translateY(50%)}.tick--min{transform:unset}.tick--max{transform:translateY(100%)}}:host([layout="horizontal"][mirrored]){.tick,.tick-label{transform:translate(50%)}.tick--min{transform:unset}.tick--max{transform:translate(100%)}}:host([layout="vertical"][mirrored]){.tick,.tick-label{transform:translateY(-50%)}.tick--min{transform:unset}.tick--max{transform:translateY(-100%)}}:host([layout="horizontal"][label-placement="start"]){.container{flex-direction:column;justify-content:flex-end}.labels-container{margin-bottom:var(--arcgis-ticks-gap)}}:host([layout="horizontal"][label-placement="end"]){.container{flex-direction:column-reverse;justify-content:flex-end}.labels-container{margin-top:var(--arcgis-ticks-gap)}}:host([layout="vertical"][label-placement="start"]){.container{flex-direction:row;justify-content:flex-end}:dir(ltr){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right}}:dir(rtl){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left;unicode-bidi:plaintext}}}:host([layout="vertical"][label-placement="end"]){.container{flex-direction:row-reverse;justify-content:flex-end}:dir(ltr){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left}}:dir(rtl){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right;unicode-bidi:plaintext}}}:host([interactive]){pointer-events:none;.tick,.tick-label{pointer-events:auto;cursor:pointer}.tick:focus{background-color:var(--calcite-color-brand);outline:2px solid var(--calcite-color-focus, var(--calcite-color-brand));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}`,g=class extends ${constructor(){super(...arguments),this._formatValue=t=>T(t,this._formatOptions),this._activeTick=null,this._formatOptions={style:"decimal",useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:2},this.interactive=!1,this.interpolationExponent=0,this.labelPlacement="end",this.layout="horizontal",this.max=100,this.min=0,this.mirrored=!1,this.mode="count",this.showLabels=!1,this.showBaseline=!1,this.values=[],this.arcgisTickClick=_({cancelable:!1})}static{this.properties={_activeTick:16,_formatOptions:16,interactive:7,interpolationExponent:9,labelFormatter:0,labelPlacement:3,layout:3,max:9,min:9,mirrored:7,mode:1,showLabels:5,showBaseline:5,values:[9,{converter:{fromAttribute(t){if(t.includes(","))return t.split(",").filter(e=>e.trim()!=="").map(parseFloat).filter(e=>Number.isFinite(e));{let e=parseFloat(t);return Number.isFinite(e)?[e]:[]}}}}]}}static{this.styles=B}updated(){let t=this.renderRoot.querySelector(`.${l.labelsContainer}`);if(t){t.style.removeProperty("--labels-container-width"),t.style.removeProperty("--labels-container-height");let e=0,i=0;for(let a of this.renderRoot.querySelectorAll(`.${l.tickLabel}`)){let r=a.getBoundingClientRect();e=Math.max(e,r.width),i=Math.max(i,r.height)}e=Math.ceil(e),i=Math.ceil(i),e&&i&&(t.style.setProperty("--labels-container-width",`${e}px`),t.style.setProperty("--labels-container-height",`${i}px`))}}_handleBlur(){this._activeTick=null}_handleClick(t){if(!this.interactive)return;let e=t.currentTarget.dataset.value;e&&this.arcgisTickClick.emit({value:Number(e)})}_handleFocus(t){this._activeTick=t.currentTarget.dataset.value??null}_handleKeyDown(t){t.key==="Enter"&&this._handleClick(t)}_handleMouseDown(t){this.interactive&&t.preventDefault()}_internalLabelFormatter(t){let e=this.labelFormatter;return e?e(t,this._formatValue)??this._formatValue(t):this._formatValue(t)}render(){return h`<div class=${o(l.container)} touch-action=none>${this._renderContent()}${this._renderBaseline()}</div>`}_renderContent(){let{interpolationExponent:t,max:e,min:i,mode:a,values:r,layout:c,mirrored:s,showLabels:F,interactive:m}=this,p=[],x=[];for(let[f,u]of A(a,i,e,t,r)){let y={[c==="horizontal"?s?"right":"left":s?"top":"bottom"]:`${f}%`},L={[l.tick]:!0,[l.tickMin]:f===0,[l.tickMax]:f===100};if(p.push(h`<div class=${o(L)} .role=${m?"button":void 0} .ariaLabel=${m?this._internalLabelFormatter(u):void 0} style=${k(y)} data-value=${u??b} .tabIndex=${m?0:-1} @blur=${this._handleBlur} @click=${this._handleClick} @focus=${this._handleFocus} @keydown=${this._handleKeyDown} @mousedown=${this._handleMouseDown}></div>`),F){let z={[l.tickLabel]:!0,[l.tickLabelFocused]:this._activeTick===String(u)};x.push(h`<div class=${o(z)} style=${k(y)} data-value=${u??b} @click=${this._handleClick}><span class=${o(l.tickLabelText)}>${this._internalLabelFormatter(u)}</span></div>`)}}return[h`<div class=${o(l.labelsContainer)}>${x}</div>`,h`<div class=${o(l.ticksContainer)}>${p}</div>`]}_renderBaseline(){let{showBaseline:t,layout:e}=this;return t&&h`<div class=${o(l.baseline)} style=${k({[e==="horizontal"?"width":"height"]:"100%",[e==="horizontal"?"height":"width"]:"0.125rem"})}></div>`||""}};function*A(n,t,e,i,a){switch(n){case"value":{let r=Array.isArray(a)?a:[a];for(let c of r){let s=D(t,e,c,i)*100;s>=0&&s<=100&&(yield[s,c])}break}case"percent":{if(Array.isArray(a))for(let r of a)r>=0&&r<=100&&(yield[r,d(t,e,r/100,i)]);else if(a>0)for(let r=0;r<=100;r+=a)yield[r,d(t,e,r/100,i)];break}case"count":{let r=Array.isArray(a)?a[0]:a;if(r<=1)yield[50,d(t,e,.5,i)];else for(let c=0;c<r;c++){let s=c*100/(r-1);yield[s,d(t,e,s/100,i)]}break}}}function v(n,t,e){return e<n?n:e>t?t:e}function C(n,t,e){return n+(t-n)*e}function D(n,t,e,i=0){let a=(e-n)/(t-n);if(a=v(0,1,a),Math.abs(i)<1e-9)return a;let r=1+Math.expm1(i)*a;return a=Math.log(r)/i,v(0,1,a)}function d(n,t,e,i=0){if(e=v(0,1,e),Math.abs(i)<1e-9)return C(n,t,e);let a=Math.expm1(i*e)/Math.expm1(i);return C(n,t,a)}M("arcgis-ticks",g);return g},"intl")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{A as o,l as r,y as s,z as i}from"./PECTYCLV.js";var u=s(class extends i{constructor(){super(...arguments),this.key=r}render(t,e){return this.key=t,e}update(t,[e,m]){return e!==this.key&&(o(t),this.key=e),m}});export{u as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{B as l,C as t,D as a,F as r,J as c,h as n,j as o,s as i}from"./PECTYCLV.js";var d=n`:host{display:flex}:host([disabled]){opacity:.25;pointer-events:none}button{overflow:hidden;background-color:transparent;align-items:center;border:none;border-radius:0;box-sizing:border-box;cursor:pointer;display:flex;font-family:inherit;gap:var(--calcite-space-sm);height:100%;justify-content:center;outline-color:transparent;outline-offset:0;padding:3px 0;padding-inline:3px var(--calcite-space-sm);position:relative;text-decoration:none;user-select:none;text-align:center;-webkit-appearance:none;width:100%;&:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-brand);outline-offset:var(--calcite-border-width-md)}&:hover{text-decoration:none}}.preview{border:var(--calcite-border-width-sm) solid #949494;display:flex;align-items:center;flex-grow:1}.container{display:flex;gap:5px;width:100%}::slotted([slot="preview"]){flex-grow:1;display:flex}calcite-icon{color:var(--calcite-color-text-3)}`,s=class extends a{constructor(){super(),this.panelEl=l(),this.open=!1,this.disabled=!1,this.iconEnd="pencil",this.label="",this.arcgisPopoverOpen=i(),this.arcgisPopoverClose=i(),this.listenOn(document.body,"arcgisPopoverOpen",this.onPopoverOpen)}static{this.properties={open:16,disabled:7,heading:1,iconEnd:1,intlDone:1,label:1,popoverProps:0}}static{this.styles=d}async close(e){this.onPopoverClose(e)}async setFocus(){this.buttonEl?.focus()}setPreviewContainerRef(e){this.previewContainerEl=e}setButtonRef(e){this.buttonEl=e}handlePopoverOpen(e){this.panelEl.value.closed=!1,this.arcgisPopoverOpen.emit(),e.stopPropagation()}handlePopoverKeyUp({key:e}){e==="Escape"&&this.onPopoverClose({focus:!0})}onPopoverOpen(e){this.open&&(e.composedPath().includes(this.el)||(this.open=!1))}onPopoverClose(e){this.open=!1,this.arcgisPopoverClose.emit(),e?.focus&&setTimeout(()=>this.buttonEl?.focus(),300)}handlePanelClose(e){e.stopPropagation(),this.onPopoverClose({focus:!0})}handleButtonClick(){this.open=!this.open,this.open&&setTimeout(()=>{this.panelEl.value?.setFocus()},300)}render(){let{popoverProps:e}=this;return o`<calcite-popover pointer-disabled trigger-disabled @keyup=${this.handlePopoverKeyUp} .label=${this.label} .offsetDistance=${e?.offsetDistance??0} .offsetSkidding=${e?.offsetSkidding??0} .flipDisabled=${e?.flipDisabled??!1} .open=${this.disabled?!1:this.open} .overlayPositioning=${e?.overlayPositioning??"fixed"} .placement=${e?.placement??"bottom"} @calcitePopoverOpen=${this.handlePopoverOpen} @calcitePopoverClose=${p=>p.stopPropagation()} .referenceElement=${e?.refElement??this.previewContainerEl}><calcite-panel closable .heading=${this.heading} style=${r(e?.maxHeight?{maxHeight:e.maxHeight}:void 0)} @calcitePanelClose=${this.handlePanelClose} ${t(this.panelEl)}><slot name=content></slot><calcite-button appearance=solid slot=footer width=full .label=${this.intlDone} @click=${()=>this.onPopoverClose({focus:!0})}>${this.intlDone}</calcite-button></calcite-panel></calcite-popover><div class="container"><div class="preview" ${t(this.setPreviewContainerRef)}><button .disabled=${this.disabled} @click=${this.handleButtonClick} type=button .ariaLabel=${this.label} ${t(this.setButtonRef)}><slot name=preview></slot>${this.iconEnd?o`<calcite-icon .icon=${this.iconEnd} scale=s></calcite-icon>`:null}</button></div><slot name=content-end></slot></div>`}};c("arcgis-picker-input",s);export{s as ArcgisPickerInput};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
function p(s){return u(s).length>0}function u(s,t){return g(s.target,t)}function g(s,t){let e=s.assignedElements({flatten:!0});return t?e.filter(n=>n.matches(t)):e}var h=(...s)=>{let t=[];for(let n=0;n<s.length;++n){let o=s[n];if(typeof o=="string")t.push(o);else if(Array.isArray(o))t.push.apply(t,o);else if(typeof o=="object")for(let a in o)o[a]&&t.push(a)}let e=t.join(" ");return t.length=0,e},m=(s,t)=>{let e=s;for(;e;){if(e===t)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},f=(s,t,e)=>{let n=C(t).subscribe;return n(o=>{o.some(r=>m(s,r.target))&&e()})},l={},C=s=>{let t=s.join(","),e=l[t];if(e!==void 0)return e;let n=new Set,o=new MutationObserver(r=>n.forEach(d=>d(r)));globalThis.document&&o.observe(document.documentElement,{attributes:!0,attributeFilter:s,subtree:!0});let a={subscribe:r=>(n.add(r),()=>{n.delete(r),n.size===0&&(o.disconnect(),l[t]=void 0)})};return l[t]=a,a},i=(s,t)=>{let e=s;for(;e;){let n=e.closest?.(t);if(n)return n;let o=e.getRootNode?.();if(o===globalThis.document)return;e=o?.host}};var E=s=>c(s,"dir","ltr"),c=(s,t,e)=>i(s,`[${t}]`)?.getAttribute(t)??e;export{p as a,g as b,h as c,f as d,i as e,E as f,c as g};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as k}from"./PMV2N3L3.js";import{a as C}from"./BMAH7QBK.js";import"./DWUHV2MR.js";import"./TWW63D32.js";import{D as V,E as _,F as $,G as u,J as D,h as w,j as v,k as g}from"./PECTYCLV.js";export default $arcgis.t(([{substitute:z}])=>{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;width:100%;height:100%}.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,r,e,a){let[i,s]=a;if(!t||s===0||i===0||r==null||n==null)return null;let o=r-n,c=(t.length>1?t[t.length-1].maxValue-t[0].minValue:0)/o,[l,h]=e==="vertical"?[s*c,i]:[s,i*c],m=t?t.map(d=>d.count):[],p=Math.max(...m);return t.map(d=>{let[f,b]=e==="vertical"?[l/t.length,p!==0?d.count/p*h:0]:[p!==0?d.count/p*l:0,h/t.length],{maxValue:F}=d,y=r-F,[I,S]=e==="vertical"?[0,y*(s/o)]:[i-b-y*(i/o),s-f];return[I,S,b,f]})}function O(t,n,r,e,a,i){let s=[];return t!=null&&s.push({value:t,symbol:"x\u0304",lineClass:"average-data-line"}),n!=null&&e!=null&&a!=null&&s.push(...H(e,a,n,r,t)),i&&s.push(...i),s}function A(t,n,r,e,a){if(r==null)return[0,0,0,0];let i=Math.round((a-r)/e*100)/100,[s,o]=t;if(n==="vertical"){let l=o-i*o||1;return l=Math.round(l)+.5,[0,"100%",l,l]}let c=i*s||1;return c=Math.round(c)+.5,[c,c,"100%",0]}function P(t,n,r,e,a){if(r==null)return[0,0];let i=Math.round((a-r)/e*100)/100,[s,o]=t;return n==="vertical"?[s,o-i*o]:[0,i*s]}function T(t,n,r){if(!t||t.length===0)return null;if(M(t)){let e=t.map(a=>({...a,color:E(a.color??r)}));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??r)}))}function R(t,n,r,e){if(!t||t.length===0)return r;if(M(t)){let a=G(t,n);if(a.length===0)return r;if(e){let{color:i=r,weight:s}=a[0],{color:o=r,weight:c}=a[1]??a[0],l=s+c;return`color-mix(in srgb, ${i} ${s/l*100}%, ${o} ${c/l*100}%)`}return a[0].color??r}return Y(t,n)}function G(t,n){let r=[];for(let e of t){let a=Math.max(0,Math.min(n.maxValue,e.maxValue)-Math.max(n.minValue,e.minValue));a>0&&r.push({color:e.color,weight:a})}return r.sort((e,a)=>a.weight-e.weight)}function Y(t,n){let r=(n.maxValue-n.minValue)/2+n.minValue;if(r>t[t.length-1].value)return t[t.length-1].color;for(let e=0;e<t.length-1;e++){let a=t[e],i=t[e+1];if(r<=a.value)return a.color;if(r<i.value){let s=(r-a.value)/(i.value-a.value)*100;return`color-mix(in srgb, ${a.color}, ${i.color} ${s}%)`}}return t[t.length-1].color}function M(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:r,b:e,a=1}=t;return`rgba(${n}, ${r}, ${e}, ${a})`}function H(t,n,r,e,a){let i=.06*(n-t);return U(r,e,a).map((s,o,c)=>{let l=c.length/2,h=s>a?"+":"-",m=o>=l?o-l+1:l-o;return{symbol:`${h}${m===1?"":m}\u03C3`,value:s}}).filter(({value:s})=>Math.abs(a-s)>i)}function U(t,n,r){if(r==null||t==null)return[];let e=n,a=[];for(let i=e*-1;i<=e;i++)i!==0&&a.push(r+i*t);return a}var L="var(--arcgis-histogram-bar-color)",q="var(--arcgis-histogram-stop-color)",x=class extends V{constructor(){super(...arguments),this._messages=C(),this._normalizedStops=null,this.#t=(n,r)=>{let e=a=>k(this._messages._lang,this._numberFormatterOptions).format(a);return this.labelFormatter?.(n,r,e)??e(n)},this._numberFormatterOptions={maximumFractionDigits:2},this.containerDimensions=[0,0],this.icon="graph-histogram",this.layout="horizontal",this.colorBlendingEnabled=!1,this.standardDeviationCount=1}static{this.properties={containerDimensions:16,colorStops:0,icon:3,labelFormatter:0,average:11,messageOverrides:0,standardDeviation:11,bins:0,dataLines:0,label:1,layout:3,max:11,min:11,colorBlendingEnabled:5,standardDeviationCount:9}}static{this.styles=N}#t;loaded(){let n=new ResizeObserver(a=>{for(let i of a){let{width:s,height:o}=i.contentRect;this.containerDimensions=[s,o]}}),{width:r,height:e}=this.el.getBoundingClientRect();this.containerDimensions=[r,e],n.observe(this.el)}willUpdate(n){n.has("colorStops")&&(this._normalizedStops=T(this.colorStops,L,q))}render(){let{label:n}=this;return v`<div role=img .ariaLabel=${n??void 0} class="content">${this._renderContent()}</div>`}_renderContent(){let{containerDimensions:[n,r]}=this,e="bg-fill",a=n?[g`<defs><clipPath id=${e}><rect height=${r??u} width=${n??u} x=0 y=0 /></clipPath></defs>`,g`<g style=${$({clipPath:`url(#${e})`})}><g>${this._renderBars()}</g></g>`,g`<g>${this._renderLines()}</g>`]:[];return v`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${a}</svg>`}_renderBars(){let{bins:n,_messages:r}=this,e=B(this.bins,this.min,this.max,this.layout,this.containerDimensions);return!e||!n?null:e.map((a,i)=>{let[s,o,c,l]=a,h=n[i],m=r?.barLabel?z(r.barLabel,h):"";return g`<rect style=${$({fill:R(this._normalizedStops,h,L,this.colorBlendingEnabled)})} .ariaLabel=${m} data-index=${i??u} height=${l??u} role=img shape-rendering=crispEdges stroke-width=0 width=${c??u} x=${s??u} y=${o??u} />`})}_renderLines(){return O(this.average,this.standardDeviation,this.standardDeviationCount,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.#t}))}},W=t=>{let{containerDimensions:n,layout:r,min:e,max:a,dataLine:i,labelFormatter:s}=t,o=a!=null&&e!=null?a-e:0,[c,l,h,m]=A(n,r,e,o,i.value),[p,d]=P(n,r,e,o,i.value),f="symbol"in i?[g`<tspan class="data-line-symbol">${i.symbol}</tspan>`,g`<tspan>${s(i.value,i.lineClass==="average-data-line"?"average":"standard-deviation")}</tspan>`]:i.label,b="lineClass"in i&&i.lineClass?i.lineClass:"data-line";return g`<g><title>${i.value}</title><line class=${_(b)} shape-rendering=crispEdges x1=${c??u} x2=${l??u} y1=${h??u} y2=${m??u} /><text class="label" text-anchor=end transform=${(r==="horizontal"?"rotate(270)":void 0)??u} x=${p??u} y=${d-2}>${f}</text></g>`};D("arcgis-histogram",x);return x},"intl")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as x,b as j,c as k,d as R,e as v,f as z,g as b,h as y,i as B,j as K,k as I,l as P,m as F,n as X,o as Y,p as E,q as w,r as $,s as L}from"./Z5QBBHLD.js";import{a as J,b as p}from"./XRQOTHR7.js";import{a as Q}from"./BMAH7QBK.js";import"./DWUHV2MR.js";import"./TWW63D32.js";import{a as S}from"./TJ7PO6GP.js";import{C as V,D as U,E as N,J as G,h as H,j as d,n as _,o as C,s as D}from"./PECTYCLV.js";export default $arcgis.t(([se,O,f,M,q,ae,re,ee,ne])=>{function oe(a){return a.associatedLayer?.url}var le={dateStyle:"short",timeStyle:"short"},de={timeStyle:"medium"};function ue(a){let{layer:e,fieldName:t}=a,i,r=M.supportsFieldConfiguration(e),s;"popupTemplate"in e&&(s=e.popupTemplate);let n=s?s.fieldInfos:[];return ie(a)?.filter(l=>l.name===t).forEach(l=>{let u=!r&&n?n.filter(m=>m.fieldName===l.name):void 0,c=r?e.getFieldAlias(t):u?.length?u[0].label:l.alias;/^raster.(item|service)pixelvalue/iu.test(t)&&(l.type="double");let o={layerField:l,label:c||l.name};o.codedValues=fe(t,a),pe(o),o.simpleFieldType&&(i=o)}),i}function ie(a){let{layer:e}=a;return y(e)||$(e)||b(e)&&e.rasterFields.length?e.rasterFields:e.fields}async function te(a){a.statisticsStatus="in-progress";let{layer:e,view:t}=a;if(y(e)||$(e)||F(e)||w(e))throw new Error("could not get feature count");try{return await ge(e,t)}catch{return}}async function ce(a){let{layer:e,view:t,fieldName:i,fieldInfo:r}=a;if(y(e)||$(e)||w(e))throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");if(!r||r.layerField.type==="oid"||r.layerField.type==="guid"||r.layerField.type==="global-id")return{totalCount:await te(a),nullcount:0};try{let s=await ae({layer:e,view:t,field:i,outStatisticTypes:{exclude:["median"]}});if(!p(s.count))throw new Error("could not get statistics");let n="sourceJSON"in e&&e.sourceJSON.maxRecordCount===s.count;if(p(s.nullcount)&&!n)return{...s,totalCount:s.count+s.nullcount};{let l=await te(a);return{...s,totalCount:l}}}catch{throw new Error("could not get statistics")}}async function me(a){let{layer:e,view:t,fieldName:i}=a;if(y(e)||$(e)||w(e))throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");R(e)&&(e.outFields=["*"]);try{return await re({layer:e,view:t,field:i})}catch{throw new Error("could not get unique values")}}function pe(a){switch(a.layerField.type){case"string":a.simpleFieldType="string";break;case"date":a.simpleFieldType="date";break;case"timestamp-offset":a.simpleFieldType="timestamp-offset";break;case"date-only":a.simpleFieldType="date-only";break;case"time-only":a.simpleFieldType="time-only";break;case"oid":a.simpleFieldType="oid";break;case"guid":case"global-id":a.simpleFieldType="guid";break;case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":a.simpleFieldType="number";break;default:a.simpleFieldType="string"}}function fe(a,e){let{layer:t}=e;if(E(t)&&t.subtypeField===a){let u=t.parent?.subtypes?.find(c=>c.code===t.subtypeCode);if(u)return[new ee({code:u.code,name:u.name})]}if(!v(t)&&!b(t))return;let i=v(t)?t.typeIdField:void 0,r=v(t)?t.types:void 0,s,n=ie(e)?.find(u=>u.name===a),l=n?.domain;return v(t)&&i&&r?(i===a?s=r.map(u=>new ee({code:u.id,name:u.name})):(s=[],r.forEach(u=>{if(!u.domains[a]||u.domains[a].type==="inherited"){let c=l;c?.codedValues&&c.codedValues.forEach(o=>{let m=!1;s.forEach(g=>{g.code===o.code&&(m=!0,`, ${g.name},`.includes(`, ${o.name},`)||(g.name+=`, ${o.name}`))}),m||s.push(q.clone(o))})}else u.domains[a].codedValues&&u.domains[a].codedValues.forEach(c=>{let o=!1;s.forEach(m=>{m.code===c.code&&(o=!0,`, ${m.name},`.includes(`, ${c.name},`)||(m.name+=`, ${c.name}`))}),o||s.push(q.clone(c))})})),!s.length&&l?.codedValues&&(s=q.clone(l.codedValues))):l?.codedValues&&(s=n?.domain?.codedValues),s?.length?s:void 0}async function he(a){let{view:e,layer:t}=a;if(b(t)||y(t)||$(t))throw new Error("could not get feature");if(v(t)&&!t.url||L(t)){let i=t.createQuery();i.start=0,i.num=5,i.outFields=["*"];let r=await t.queryFeatures(i);if(r.features.length)return r;throw new Error("could not get feature")}else{if(!e)return await A(a);let i;if(E(t)||X(t)){let s=t.parent;for(;Y(s)||K(s);)s=s.parent;B(s)&&(i=await e.whenLayerView(s))}else i=await e.whenLayerView(t);let r=i.availableFields.length===t.fields.length;if(i&&(r||(F(t)||I(t))&&i.availableFields.length>0)){let s=i.createQuery();s.start=0,s.num=5,s.outFields=["*"];let n=await i.queryFeatures(s);return n.features?.length?n:await A(a)}else return await A(a)}}async function A(a){let{layer:e}=a;if(b(e)||y(e)||F(e)||I(e))throw new Error("cannot get feature from service");let t=new ne({where:"1=1",outFields:["*"],returnGeometry:!1});return"sourceJSON"in e&&e.sourceJSON?.advancedQueryCapabilities?.supportsPagination&&(t.num=1),await e.queryFeatures(t)}async function ge(a,e){if(R(a))return await ve(a);if(v(a)||j(a)||P(a)||L(a)||z(a))return await a.queryFeatureCount();if(e&&(F(a)||I(a)))return await ye(a,e)}async function ve(a){let e=a.createQuery();e.outFields=["*"];let t=await a.queryFeatures(e);if(t.features.length)return t.features.length;throw new Error("could not get feature count")}async function ye(a,e){return await(await e.whenLayerView(a)).queryFeatureCount()}var Fe=H`:host{height:100%}.container{padding:var(--calcite-space-xs);background-color:var(--calcite-color-surface-2)}.title{font-weight:700;padding:5px 0}.missing,.data{color:#a9a9a9}.count{white-space:nowrap}.section{padding:var(--calcite-space-xs) 0}.statistics-row{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);padding:var(--calcite-space-xs) 0;display:flex;justify-content:space-between}.statistics-row-top-values{border-top:var(--calcite-border-width-sm) solid var(--calctie-color-border-2);padding:20px 0 var(--calcite-space-xs) 0;display:flex;justify-content:space-between}`,Z=class extends U{constructor(){super(...arguments),this._messages=Q({blocking:!0}),this.initialized=!1,this._propWatcherTask=new J(this,{task:async([e,t])=>{let i=p(e)&&p(t);if(p(e)||_("error",this,C("layer")),p(t)||_("error",this,C("fieldName")),!i)throw new Error;await this.processProps(),this._propWatcherTask.autoRun=!1},args:()=>[this.layer,this.fieldName]}),this.oneFeatureResponseStatus="missing",this.statisticsStatus="missing",this.uniqueValuesStatus="missing",this.hideAlias=!1,this.hideNumericFormat=!1,this.hideStatistics=!1,this.arcgisComplete=D(),this.arcgisFieldInfoComplete=D()}static{this.properties={oneFeatureResponseStatus:16,oneFeatureResponse:16,statisticsStatus:16,statistics:16,uniqueValuesStatus:16,uniqueValues:16,view:0,layer:0,fieldName:1,hideAlias:5,hideNumericFormat:5,hideStatistics:5}}static{this.styles=Fe}async refresh(){await this.processProps(),this.requestUpdate()}async willUpdate(e){this.initialized&&(e.has("fieldName")||e.has("layer"))&&await this.processProps()}disconnectedCallback(){super.disconnectedCallback(),this.timeZoneHandle?.remove()}async processProps(){let{view:e,layer:t,fieldName:i,hideStatistics:r}=this;if(!t||!i)return;let s;if(t.declaredClass==="esri.layers.support.Sublayer"){let n=t;e&&await O.whenOnce(()=>!e.updating),s=await n.createFeatureLayer(),await s?.load()}if(this.oneFeatureResponseStatus="missing",this.oneFeatureResponse=void 0,this.statisticsStatus="missing",this.statistics=void 0,this.uniqueValuesStatus="missing",this.uniqueValues=void 0,this.props={view:e,layer:s??t,fieldName:i,hideStatistics:r},this.props.fieldInfo=ue(this.props),!this.props.fieldInfo){_("error",this,`Field ${i} does not exist in layer.`);return}P(t)&&se.request.interceptors?.push({urls:`${oe(t)}/${t.layerId}`,before(n){n.requestOptions.authMode="no-prompt"}}),this.processPropsPart2()}async processPropsPart2(){let{layer:e,hideStatistics:t}=this;if(await this.requestOneFeature(),F(e)||x(e)||k(e)){this.uniqueValuesStatus="failed",this.statisticsStatus="failed";return}t?this.uniqueValuesStatus="failed":await this.requestUniqueValues(),t?this.statisticsStatus="failed":await this.requestStatistics(),this.setUpTimeZoneHandle(),this.initialized=!0}async requestOneFeature(){this.oneFeatureResponseStatus="in-progress";try{let e=await he(this.props);this.oneFeatureResponse=e,this.oneFeatureResponseStatus="success"}catch{this.oneFeatureResponseStatus="failed"}}async requestUniqueValues(){return this.uniqueValuesStatus="in-progress",await new Promise(async e=>{try{let t=await me(this.props);this.uniqueValues=t,t?.uniqueValueInfos?.length?this.uniqueValuesStatus="success":this.uniqueValuesStatus="failed"}catch{this.uniqueValuesStatus="failed"}finally{e()}})}async requestStatistics(){return await new Promise(async e=>{try{let t=await ce(this.props);if(!p(t.totalCount)&&p(t.count)&&this.uniqueValuesStatus==="success"){let i=this.uniqueValues?.uniqueValueInfos??[];for(let r=0;r<i.length;r++){let s=i[r];if(s.value===null){t.totalCount=s.count+t.count;break}}t.totalCount??=t.count}this.statistics=t,this.statisticsStatus="success"}catch{this.statisticsStatus="failed"}finally{e()}})}setUpTimeZoneHandle(){this.timeZoneHandle?.remove();let{props:e}=this,{view:t,fieldInfo:i}=e;["date","timestamp-offset"].includes(this._getStatisticsType(i))&&(this.timeZoneHandle=O.watch(()=>t?.timeZone,()=>{this.requestUpdate()}))}_getFieldTypeLabel(e){let{_messages:t}=this,i=t.fieldTypes;switch(e){case"big-integer":return i.bigInteger;case"date":return i.date;case"date-only":return i.dateOnly;case"double":return i.double;case"global-id":return i.globalId;case"guid":return i.guid;case"integer":return i.integer;case"long":return i.long;case"oid":return i.oid;case"single":return i.single;case"small-integer":return i.smallInteger;case"string":return i.string;case"time-only":return i.timeOnly;case"timestamp-offset":return i.timestampOffset;default:return i.string}}_getStatisticsType(e){switch(e.layerField.type){case"big-integer":case"double":case"integer":case"single":case"small-integer":{if(e.codedValues)return"string";switch(e.layerField.valueType){case"url":case"binary":case"description":case"location-or-place-name":case"name-or-title":case"ordered-or-ranked":case"type-or-category":return"string";default:return"number"}}case"date":return"date";case"date-only":return"date-only";case"string":return"string";case"time-only":return"time-only";case"timestamp-offset":return"timestamp-offset";default:return"string"}}_getFieldValueTypeCamelCase(e){switch(e.layerField.valueType){case"count-or-amount":return"countOrAmount";case"date-and-time":return"dateAndTime";case"location-or-place-name":return"locationOrPlaceName";case"name-or-title":return"nameOrTitle";case"ordered-or-ranked":return"orderedOrRanked";case"percentage-or-ratio":return"percentageOrRatio";case"type-or-category":return"typeOrCategory";case"unique-identifier":return"uniqueIdentifier";case"phone-number":return"phoneNumber";case"email-address":return"emailAddress";default:return e.layerField.valueType??void 0}}_getDisplayString(e,t){let{props:i}=this,{fieldInfo:r}=i;switch(r.simpleFieldType){case"date":return this._getDateString(e,t);case"date-only":return this._getDateOnlyString(e,t);case"guid":return this._getGuidString(e);case"number":return this._getNumberString(e,t);case"time-only":return this._getTimeOnlyString(e,t);case"timestamp-offset":return this._getTimestampOffsetString(e,t);default:return`${e}`}}_getDateString(e,t){let{view:i}=this.props;return i&&i.timeZone==="unknown"?f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"})}_getTimestampOffsetString(e,t){let{view:i}=this.props;return typeof e=="string"?i&&i.timeZone==="unknown"?f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"}):this._getDateString(e,t)}_getDateOnlyString(e,t){return f.formatDateOnly(e,this.getIntlDateTimeFormattingOptions("short-date",t))}_getTimeOnlyString(e,t){return typeof e=="string"?f.formatTimeOnly(e,this.getIntlDateTimeFormattingOptions("short-date-long-time",t)):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("long-time",{...t,isTimeOnly:!0}),timeZone:"utc"})}_getGuidString(e){return e.startsWith("{")?e:`{${e}}`}_getNumberString(e,t){let i=t?.useFieldFormatting?e:Math.round(e*100)/100;return f.formatNumber(i,this.getIntlNumberFormattingOptions(t))}_printNumValue(e,t){return p(e)?this._getNumberString(e,t):"--"}_setCompleteRef(e){if(this.completeRefHandler&&clearInterval(this.completeRefHandler),e){let t=0;this.completeRefHandler=setInterval(()=>{(t>130||this.isFinished(this.uniqueValuesStatus)&&this.isFinished(this.statisticsStatus))&&(clearInterval(this.completeRefHandler),this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit()),t++},1e3)}}getCurrentFieldFormat(){let{props:e}=this,{layer:t,fieldName:i}=e;return(this.originalLayerSupportsFieldConfigs()?t.getFieldConfiguration(i):void 0)?.fieldFormat??void 0}getIntlNumberFormattingOptions(e){let t=this.getCurrentFieldFormat();if(!e?.useFieldFormatting)return t?{useGrouping:["always","auto"].includes(t.useGrouping)}:f.convertNumberFormatToIntlOptions({digitSeparator:this.getPopupTemplateFieldInfo()?.format?.digitSeparator??!0});let i=t?{minimumFractionDigits:t.minimumFractionDigits,maximumFractionDigits:t.maximumFractionDigits,useGrouping:["always","auto"].includes(t.useGrouping)}:void 0;if(i)return i;let r=this.getPopupTemplateFieldInfo();return f.convertNumberFormatToIntlOptions({digitSeparator:r?.format?.digitSeparator??!0,places:r?.format?.places??2})}getIntlDateTimeFormattingOptions(e,t){let i=this.getCurrentFieldFormat();if(!t?.useFieldFormatting)return i?t?.isTimeOnly?de:le:f.convertDateFormatToIntlOptions(e);let r=i?{dateStyle:t?.isTimeOnly?void 0:i.dateStyle??void 0,year:i.dateStyle?void 0:i.year??void 0,month:i.dateStyle?void 0:i.month??void 0,timeStyle:i.timeStyle??void 0,hourCycle:i.hour12==="never"?"h23":"h11"}:void 0;if(r)return r;let s=this.getPopupTemplateFieldInfo();return f.convertDateFormatToIntlOptions(s?.format?.dateFormat??e)}originalLayerSupportsFieldConfigs(){let{layer:e}=this;return M.supportsFieldConfiguration(e)}getPopupTemplateFieldInfo(){let{props:e}=this,{layer:t,fieldName:i}=e;return("popupTemplate"in t?t.popupTemplate:void 0)?.fieldInfos?.find(r=>r.fieldName===i)}isFinished(e){return["success","failed"].includes(e)}render(){return this._propWatcherTask.render({pending:()=>d`<calcite-scrim loading></calcite-scrim>`,complete:()=>{let{props:e}=this,{fieldInfo:t}=e;return t?d`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>`:""},error:()=>""})}renderFieldType(){let{_messages:e,props:t}=this,{fieldInfo:i}=t,r=this._getFieldTypeLabel(i.layerField.type);return d`<div class="section"><div class="title">${e.fieldType}</div><div>${r}</div></div>`}renderFieldAlias(){let{_messages:e,props:t,hideAlias:i}=this,{fieldInfo:r}=t;return i?"":d`<div class="section"><div class="title">${e.fieldAlias}</div><div>${r.label}</div></div>`}renderFieldDescription(){let{_messages:e,props:t}=this,{layer:i}=t;if(!v(i))return"";let{fieldInfo:r}=t,s=r.layerField.description;return d`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${N({missing:!s})}>${s||e.fieldDescriptionNotSet}</div></div>`}renderFieldValueType(){let{_messages:e,props:t}=this,{layer:i}=t;if(!v(i))return"";let{fieldInfo:r}=t,s=this._getFieldValueTypeCamelCase(r);return d`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${N(s?"":"missing")}>${s?e.fieldValueTypes[s]:e.fieldValueTypeNotSet}</div></div>`}renderFieldSampleValue(){let{oneFeatureResponse:e,oneFeatureResponseStatus:t,statisticsStatus:i,statistics:r,uniqueValuesStatus:s,uniqueValues:n,_messages:l,props:u}=this,{layer:c,fieldName:o,fieldInfo:m}=u,{statistics:g}=l,h;if(y(c)||w(c)||!F(c)&&["string","oid","guid"].includes(this._getStatisticsType(m))&&s!=="failed")return"";t==="success"?e.features.forEach(T=>{(h===void 0||h===null&&T.attributes[o]!==null)&&(h=T.attributes[o])}):i==="success"?h=r?.min??void 0:s==="success"&&(h=n?.uniqueValueInfos?.[0]?.value??n?.uniqueValueInfos?.[1]?.value??void 0);let W=m.codedValues;return p(h)&&(W?h=W.find(T=>h===T.code)?.name||h:h=this._getDisplayString(h,{useFieldFormatting:!0})),d`<div class="section"><div class="title">${l.fieldSampleValue}</div><div class=${N(t==="failed"&&i==="failed"&&s==="failed"||!p(h)?"missing":"")}>${t==="success"||i==="success"||s==="success"?h?.toString()??g.allNulls:t==="failed"&&i==="failed"&&s==="failed"?l.fieldSampleNotAvailable:l.fieldSampleRetrieving}</div></div>`}renderFieldNumericFormat(){let{_messages:e,props:t,hideNumericFormat:i}=this,{fieldName:r,fieldInfo:s,layer:n}=t;if(i||!["double","long","single"].includes(s.layerField.type))return"";let l=this.originalLayerSupportsFieldConfigs()?n.getFieldConfiguration(r):void 0;if(l?.fieldFormat){let{minimumFractionDigits:c,maximumFractionDigits:o}=l.fieldFormat;return d`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}",c.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}",o.toString())}</div></div>`}let u="popupTemplate"in n?n.popupTemplate:void 0;if(u?.fieldInfos){let c=u.fieldInfos?.filter(o=>o.fieldName===r);if(c?.length){let o=c[0];if(p(o?.format?.places)){let m=o.format.places;return d`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}",m.toString())}</div></div>`}}}return d`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`}renderFieldStatistics(){let{statisticsStatus:e,uniqueValuesStatus:t,hideStatistics:i,_messages:r,props:s}=this,{layer:n,fieldInfo:l}=s;return i?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):x(n)||k(n)||F(n)||y(n)||w(n)||["long"].includes(l.layerField.type)?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):d`<div class="section"><div class="title">${r.fieldStatistics}</div>${!this.isFinished(t)&&!this.isFinished(e)?this.renderWaitingForStatistics():e==="failed"&&t==="failed"?this.renderNoStatistics():this.renderStatistics()}</div>`}renderWaitingForStatistics(){let{_messages:e}=this;return S("field-info-statistics-content",d`<div class="missing">${e.fieldStatisticsRetrieving}</div>`)}renderNoStatistics(){let{_messages:e}=this;return S("field-info-statistics-content",d`<div class="missing" ${V(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`)}renderStatistics(){let{props:e}=this,{fieldInfo:t}=e;switch(this._getStatisticsType(t)){case"number":return this.renderNumberStatistics();case"guid":case"oid":case"string":return this.renderStringStatistics();case"date":case"date-only":case"time-only":case"timestamp-offset":return this.renderDateStatistics();default:return""}}renderNumberStatistics(){let{statistics:e,_messages:t}=this;if(!e)return this.renderWaitingForStatistics();let{statistics:i}=t;return S("field-info-statistics-content",d`<div ${V(this._setCompleteRef)}><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${p(e.sum)?d`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>`:null}${p(e.min)?d`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>`:null}${p(e.max)?d`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>`:null}${p(e.avg)?d`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>`:null}${p(e.stddev)?d`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>`:null}${this.renderNullValues()}</div>`)}renderStringStatistics(){let{statistics:e,uniqueValuesStatus:t,_messages:i}=this,{statistics:r}=i;return S("field-info-statistics-content",d`<div ${V(this._setCompleteRef)}><div class="statistics-row"><div>${r.numberOfValues}</div>${t!=="success"?d`<div class="missing">--</div>`:d`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`)}renderDateStatistics(){let{statistics:e,view:t,props:i,_messages:r}=this,{fieldInfo:s}=i;if(!e||!p(e.max)||!p(e.min))return this.renderWaitingForStatistics();let{statistics:n}=r,l=e.max-e.min,u=Math.floor(l/31536e6),c=Math.floor((l-u*31536e6)/2628e6),o=Math.ceil((l-c*2628e6)/864e5);o>=30&&(c+=1,o=0);let m=u===1?n.timeSpanOptions.year:u>1?n.timeSpanOptions.years.replace("${years}",u.toString()):"";m+=u>0&&(c>0||o>0)?", ":"",m+=c===1?n.timeSpanOptions.month:c>1?n.timeSpanOptions.months.replace("${months}",c.toString()):"",m+=c>0&&o>0?", ":"",m+=o===1?n.timeSpanOptions.day:o>1?n.timeSpanOptions.days.replace("${days}",o.toString()):"";let g=s.simpleFieldType!=="timestamp-offset"||!t||t.timeZone!=="unknown",h=s.simpleFieldType==="time-only";return S("field-info-statistics-content",d`<div ${V(this._setCompleteRef)}><div class="statistics-row"><div>${n.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${g&&p(e.min)?d`<div class="statistics-row"><div>${h?n.minimumTime:n.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>`:null}${g&&p(e.max)?d`<div class="statistics-row"><div>${h?n.maximumTime:n.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>`:null}${g&&p(e.avg)?d`<div class="statistics-row"><div>${h?n.averageTime:n.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>`:null}${g&&!h&&p(e.min)&&p(e.max)&&l>0?d`<div class="statistics-row"><div>${n.timespan}</div><div class="data">${m}</div></div>`:null}${this.renderNullValues()}</div>`)}renderTopValues(){let{uniqueValues:e,uniqueValuesStatus:t,_messages:i,props:r}=this,{fieldInfo:s}=r,{statistics:n}=i;if(e?.uniqueValueInfos?.length){let l=e.uniqueValueInfos;l.sort((o,m)=>o.count<m.count?1:o.count>m.count?-1:0);let u=s.codedValues,c=l.filter(o=>o.value!==null).filter((o,m)=>o&&m<10).map(o=>{let m=o.value;return u?u.forEach(g=>{m===g.code&&(m=g.name)}):m=this._getDisplayString(m),d`<div class="statistics-row"><div class="data">${`${m}`}</div><div class="count">${this._printNumValue(o.count)}</div></div>`});return c.length?d`<div><div class="statistics-row-top-values"><div>${l.length>10?n.topTenValues:n.topValues}</div><div>${n.count}</div></div>${c}</div>`:""}else return d`<div><div class="statistics-row-top-values"><div>${n.topValues}</div><div>${n.count}</div></div><div class="statistics-row"><div class="missing">${t==="failed"?i.fieldUniqueValuesNotAvailable:i.fieldSampleRetrieving}</div></div></div>`}renderNullValues(){let{statistics:e,uniqueValues:t,_messages:i}=this,{statistics:r}=i,s=e?.nullcount;if(!p(s)&&t){let n=t.uniqueValueInfos;for(let l=0;l<n.length;l++){let u=n[l];if(u.value===null){s=u.count;break}}}return d`<div class="statistics-row"><div>${r.numberOfNulls}</div>${p(s)?d`<div class="data">${this._printNumValue(s)}</div>`:d`<div class="missing">--</div>`}</div>`}};G("arcgis-field-info",Z);return Z},"config","core/reactiveUtils","intl","applications/PortalApp/layerUtils","core/lang","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","layers/support/CodedValue","rest/support/Query")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{D as l,J as e,h as r,j as a}from"./PECTYCLV.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};
|