@arcgis/common-components 5.2.0-next.106 → 5.2.0-next.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{IXISGCNR.js → 2JQ6OEBP.js} +2 -2
- package/dist/cdn/{JLF6J4PV.js → 2ZQLPGO6.js} +2 -2
- package/dist/cdn/{BQCBHDME.js → 34O5NI3L.js} +2 -2
- package/dist/cdn/{CKBWHADN.js → 3KVQXK6I.js} +2 -2
- package/dist/cdn/{H4B7RWSC.js → 3KZKOKL3.js} +2 -2
- package/dist/cdn/{27EUJ42B.js → 3YTGG7RF.js} +2 -2
- package/dist/cdn/{FCIUMZTZ.js → 44GHRHDT.js} +2 -2
- package/dist/cdn/46YOWKVP.js +2 -0
- package/dist/cdn/4Z3W4SLN.js +2 -0
- package/dist/cdn/{EXBLSHSY.js → 5I46DP72.js} +2 -2
- package/dist/cdn/{HPNII7DL.js → 6G2BA5R6.js} +2 -2
- package/dist/cdn/{CEXP5DLE.js → 73LCJZI5.js} +2 -2
- package/dist/cdn/{Y5Y7IXOV.js → 74MDECVO.js} +1 -1
- package/dist/cdn/AHWD5KV4.js +2 -0
- package/dist/cdn/B2QFPLR5.js +2 -0
- package/dist/cdn/{WJZHHIWO.js → DLOQSM4T.js} +2 -2
- package/dist/cdn/{L6V3WKUI.js → E4CBJIXT.js} +2 -2
- package/dist/cdn/{XEK22IDA.js → E4NVOXNZ.js} +1 -1
- package/dist/cdn/EWHSIDUL.js +2 -0
- package/dist/cdn/{AY6QNI6M.js → FH6M3L5Q.js} +2 -2
- package/dist/cdn/FMIYRWWD.js +2 -0
- package/dist/cdn/{RYAF2CEQ.js → G2DVIZZJ.js} +2 -2
- package/dist/cdn/{WOZ7IPPQ.js → GB5FMYCZ.js} +2 -2
- package/dist/cdn/GPRF6QZC.js +2 -0
- package/dist/cdn/{NQRDB6LM.js → GQBGVIQF.js} +2 -2
- package/dist/cdn/{J6YVJVSN.js → GQCIBJZF.js} +2 -2
- package/dist/cdn/{7XSCHHGO.js → IBJHDNP3.js} +2 -2
- package/dist/cdn/{H7JRH53Q.js → ISCASG7C.js} +2 -2
- package/dist/cdn/{4TZVXSQZ.js → LE43VGSR.js} +2 -2
- package/dist/cdn/LRG23IGC.js +2 -0
- package/dist/cdn/{PMV2N3L3.js → NMDESY3T.js} +1 -1
- package/dist/cdn/O2DY73RF.js +2 -0
- package/dist/cdn/OHMQBUUM.js +2 -0
- package/dist/cdn/{OADKJRMQ.js → OVOUEXKG.js} +2 -2
- package/dist/cdn/{Z5QBBHLD.js → P3DCEHGK.js} +1 -1
- package/dist/cdn/{7CY3QEZW.js → QH4CFJEJ.js} +2 -2
- package/dist/cdn/{TWW63D32.js → QJJFF4PI.js} +1 -1
- package/dist/cdn/{H66SBHKJ.js → QKRBQ2F5.js} +2 -2
- package/dist/cdn/{VJDK62KV.js → RT25KW2T.js} +2 -2
- package/dist/cdn/RZEJ56RX.js +2 -0
- package/dist/cdn/S3XLEJSQ.js +2 -0
- package/dist/cdn/SBVCJDLD.js +2 -0
- package/dist/cdn/{4D7RVA5N.js → UIHTW6OA.js} +2 -2
- package/dist/cdn/UIKQQY3N.js +2 -0
- package/dist/cdn/{LLKF5IUE.js → UWHPPNTE.js} +2 -2
- package/dist/cdn/VIBCKXUC.js +2 -0
- package/dist/cdn/{4DL4CQMD.js → WUGJFP7P.js} +2 -2
- package/dist/cdn/{UGWLCTVM.js → YJTI6KPW.js} +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/element-reference-controller.js +8 -6
- package/dist/chunks/general.js +1 -1
- package/dist/chunks/internal-types.js +1 -1
- package/dist/chunks/layer-utils.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/strategies.js +1 -1
- package/dist/chunks/toolbar.js +9 -0
- package/dist/chunks/types.js +16 -0
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +18 -28
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +4 -4
- package/dist/components/arcgis-ckeditor5/customElement.js +1 -1
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.js +1 -1
- package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
- package/dist/components/arcgis-coordinate-system-picker-tree/customElement.js +1 -1
- package/dist/components/arcgis-field-info/customElement.d.ts +1 -1
- package/dist/components/arcgis-field-info/customElement.js +73 -80
- package/dist/components/arcgis-field-pick-list/customElement.d.ts +7 -7
- package/dist/components/arcgis-field-pick-list/customElement.js +49 -45
- package/dist/components/arcgis-histogram/customElement.js +1 -1
- package/dist/components/arcgis-label-input/customElement.js +1 -1
- package/dist/components/arcgis-picker-input/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color-break/customElement.js +1 -1
- package/dist/components/arcgis-ramp-opacity/customElement.js +1 -1
- package/dist/components/arcgis-slider/customElement.js +1 -1
- package/dist/components/arcgis-slider-field/customElement.js +1 -1
- package/dist/components/arcgis-slider-histogram-range/customElement.js +1 -1
- package/dist/components/arcgis-slider-input/customElement.js +1 -1
- package/dist/components/arcgis-ticks/customElement.js +1 -1
- package/dist/components/arcgis-toolbar/customElement.d.ts +26 -6
- package/dist/components/arcgis-toolbar/customElement.js +61 -35
- package/dist/components/arcgis-toolbar/types.d.ts +32 -1
- package/dist/components/arcgis-toolbar-action/customElement.d.ts +1 -1
- package/dist/components/arcgis-toolbar-action/customElement.js +17 -22
- package/dist/components/arcgis-toolbar-group/customElement.js +18 -17
- package/dist/components/arcgis-toolbar-item/customElement.d.ts +1 -1
- package/dist/components/arcgis-toolbar-item/customElement.js +7 -7
- package/dist/components/arcgis-toolbar-more-button/customElement.js +8 -8
- package/dist/components/arcgis-toolbar-split-button/customElement.js +16 -15
- package/dist/components/arcgis-toolbar-stack/customElement.d.ts +48 -0
- package/dist/components/arcgis-toolbar-stack/customElement.js +174 -0
- package/dist/components/arcgis-toolbar-stack/index.d.ts +1 -0
- package/dist/components/arcgis-toolbar-stack/index.js +1 -0
- package/dist/components/arcgis-unique-values-list/customElement.js +3 -3
- package/dist/components/arcgis-value-picker/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-collection/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-combobox/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-label/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-slider/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.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 +6 -0
- package/dist/index.js +3 -1
- package/dist/loader.js +3 -2
- package/dist/types/lumina.d.ts +5 -0
- package/dist/types/preact.d.ts +6 -0
- package/dist/types/react.d.ts +7 -0
- package/dist/types/stencil.d.ts +5 -0
- package/package.json +4 -4
- package/dist/cdn/4S7M7IP7.js +0 -2
- package/dist/cdn/A2QOOQYR.js +0 -2
- package/dist/cdn/DM57UJMG.js +0 -2
- package/dist/cdn/EO2W4XX2.js +0 -2
- package/dist/cdn/HBTHCFTX.js +0 -2
- package/dist/cdn/K2W2X3P7.js +0 -2
- package/dist/cdn/NUJU53OQ.js +0 -2
- package/dist/cdn/RBBKKELV.js +0 -2
- package/dist/cdn/RYTUSPBA.js +0 -2
- package/dist/cdn/SM5735TW.js +0 -2
- package/dist/cdn/VCZLD7ZT.js +0 -2
- package/dist/cdn/VOBBBIYC.js +0 -2
- package/dist/cdn/XPZQ4XIH.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
var n=(e,o=100)=>{let t;return(...c)=>{let i=()=>{clearTimeout(t),e(...c)};clearTimeout(t),t=setTimeout(i,o)}};export{n as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as N}from"./74MDECVO.js";import{a as K,b as Q}from"./3KZKOKL3.js";import{a as X}from"./O2DY73RF.js";import"./RT25KW2T.js";import"./QJJFF4PI.js";import{a as _}from"./2ZQLPGO6.js";import{A as V,B as z,C as S,D as $,E as U,F as j,G as I,J as w,K as u,L as q,M as E,N as k,O as v,P,R as J,h as H,j as a,l as R,o as b,p as G,t as F,z as W}from"./DLOQSM4T.js";var Y=(l,e,t)=>{let s=new Map;for(let i=e;i<=t;i++)s.set(l[i],i);return s},D=V(class extends z{constructor(l){if(super(l),l.type!==W.CHILD)throw Error("repeat() can only be used in text expressions")}dt(l,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);let i=[],o=[],n=0;for(let r of l)i[n]=s?s(r,n):n,o[n]=t(r,n),n++;return{values:o,keys:i}}render(l,e,t){return this.dt(l,e,t).values}update(l,[e,t,s]){let i=j(l),{values:o,keys:n}=this.dt(e,t,s);if(!Array.isArray(i))return this.ut=n,o;let r=this.ut??=[],f=[],x,A,d=0,p=i.length-1,c=0,m=o.length-1;for(;d<=p&&c<=m;)if(i[d]===null)d++;else if(i[p]===null)p--;else if(r[d]===n[c])f[c]=$(i[d],o[c]),d++,c++;else if(r[p]===n[m])f[m]=$(i[p],o[m]),p--,m--;else if(r[d]===n[m])f[m]=$(i[d],o[m]),S(l,f[m+1],i[d]),d++,m--;else if(r[p]===n[c])f[c]=$(i[p],o[c]),S(l,i[d],i[p]),p--,c++;else if(x===void 0&&(x=Y(n,c,m),A=Y(r,d,p)),x.has(r[d]))if(x.has(r[p])){let g=A.get(n[c]),T=g!==void 0?i[g]:null;if(T===null){let M=S(l,i[d]);$(M,o[c]),f[c]=M}else f[c]=$(T,o[c]),S(l,i[d],T),i[g]=null;c++}else I(i[p]),p--;else I(i[d]),d++;for(;c<=m;){let g=S(l,f[m+1]);$(g,o[c]),f[c++]=g}for(;d<=p;){let g=i[d++];g!==null&&I(g)}return this.ut=n,U(l,f),R}});var h=new Map;h.set("oid","key");h.set("guid","key");h.set("global-id","key");h.set("blob","binary");h.set("integer","integer");h.set("small-integer","integer");h.set("big-integer","integer");h.set("single","number");h.set("double","number");h.set("long","number");h.set("number","number");h.set("date","date-time");h.set("date-only","calendar");h.set("time-only","clock");h.set("timestamp-offset","time-zone");h.set("string","string");var Z=({fieldType:l})=>a`<calcite-icon scale=s .icon=${h.get(l)}></calcite-icon>`;function ee(l){return!!l.length&&"fields"in l[0]}function y(l){return!!l.length&&"subFieldInfos"in l[0]}function te(l){return l.filter(e=>y(e.fields))}function ie(l){return l.flatMap(e=>e.fields)}function se(l){return l.flatMap(e=>y(e.fields)?[]:e.fields)}function C(l){return l.flatMap(e=>y(e.fields)?e.fields.flatMap(t=>t.subFieldInfos):e.fields)}function le(l,e){return l.flatMap(t=>y(t.fields)?t.fields.flatMap(s=>s.subFieldInfos.filter(i=>L(i,e,!0))):t.fields.filter(s=>B(s,e)))}function B(l,e){return e?"subFieldInfos"in l?L(l,e)||l.subFieldInfos.some(t=>L(t,e,!0)):L(l,e):!0}function L(l,e,t=!1){return[t?l.name.split("/").pop():l.name,l.alias,l.description].some(s=>s?.toLocaleLowerCase().includes(e.toLocaleLowerCase()))}var oe=H`.panel{min-height:250px}.list-wrapper{max-height:50vh;overflow:auto}.list-controls{display:grid;grid-template-columns:1fr auto}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,O=class extends q{constructor(){super(...arguments),this._messages=X({blocking:!0}),this.popoverNode=w(),this.listWrapper=w(),this.listNode=w(),this.flowElement=w(),this.panelElement=w(),this.dropdownNode=w(),this.fieldInfoFlowItemEl=w(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this.initialized=!1,this._propWatcherTask=new K(this,{task:async([e])=>{if(!this.listOnly&&!Q(e?.refElement))throw b("error",this,G("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=F(),this.arcgisClose=F(),this.arcgisDeleteField=F(),this.arcgisEditField=F(),this.arcgisFieldPickListChange=F(),this.arcgisFieldPickListDismissed=F(),this.arcgisFieldPickListSortByChange=F(),this.arcgisSortByChange=F()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=oe}async reposition(){await this.popoverNode.value?.reposition()}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,b("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists(),this.initialized=!0}willUpdate(e){this.initialized&&(e.has("fields")||e.has("sortBy")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&(e.has("sortBy")&&(this.lastSortBy=this.sortBy??this.lastSortBy),this.updateGroupedLists())}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listWrapper.value?.getBoundingClientRect();t&&(this.listWrapper.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],s=t.filter(i=>i.type==="none");return t=t.filter(i=>i.type!=="none"),this.lastSortBy==="display"?t.sort((i,o)=>i.alias.localeCompare(o.alias)):this.lastSortBy==="field"?t.sort((i,o)=>i.name.localeCompare(o.name)):this.lastSortBy==="type"&&t.sort((i,o)=>i.type.localeCompare(o.type)),t=t.concat(s),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(N.expression)}canDeselectAll(){let e=C(this.allLists);return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(N.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],ee(this.fields))for(let e of this.fields){if(this.listOnly&&y(e.fields)){b("error",this,"subFieldInfos are not supported if listOnly is true.");continue}this.allLists.push({title:e.title,fields:this.getSortedGroupFields(e.fields)})}else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:this.getSortedList(this.fields)}]}getSortedGroupFields(e){return y(e)?this.getSortedList(e).map(t=>({...t,subFieldInfos:this.getSortedList(t.subFieldInfos).map(s=>({...s,name:`${t.name}/${s.name}`}))})):this.getSortedList(e)}addFieldInfoFlowItem(e,t){let s=this.flowElement.value,i=P(a`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${k(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${o=>{o.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${u(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??v} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);s.appendChild(i),this.panelElement.value.selected=!1,setTimeout(()=>{this.fieldInfoFlowItemEl?.value.setFocus()},1)}addSubFieldInfoFlowItem(e,t){let s=this.flowElement.value,i=e.subFieldInfos.filter(n=>L(n,this.filterText,!0)),o=P(a`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.description??void 0} class="panel" style=${k(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${n=>{n.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${u(this.fieldInfoFlowItemEl)}><calcite-list .label=${e.alias??e.name} .selectionMode=${this.multiple?"multiple":"single"} @calciteListChange=${n=>{this.updateSelectedFieldsForList(n.currentTarget,e.subFieldInfos),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}}>${i.map(n=>this.renderCalciteListItem(n,!1))}</calcite-list>${this.filterText&&!i.length&&this.filterNoResultsText?.length!==0?a`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}</calcite-flow-item>`);s.appendChild(o),this.panelElement.value.selected=!1,setTimeout(()=>{this.fieldInfoFlowItemEl.value?.setFocus()},1)}shouldRenderSelectionButton(e){return this.multiple&&this.showSelectionAll&&(!e||!this.filterText||!!this.filterFields?.length)}handleListSelectionChange(e){this.updateSelectedFieldsForList(this.listNode.value,e),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}updateSelectedFieldsForList(e,t){let s=new Set(t.map(r=>r.name)),i=e.selectedItems.map(r=>r.value),o=this.selectedFields.filter(r=>!s.has(r)||i.includes(r)),n=i.filter(r=>!this.selectedFields.includes(r));this.selectedFields=this.multiple?[...new Set([...o,...n])]:i,this.reorderSelectedFieldsByCurrentListOrder()}setSortBy(e){this.lastSortBy=e,this.updateGroupedLists(),this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy),this.reorderSelectedFieldsByCurrentListOrder()&&(this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}))}reorderSelectedFieldsByCurrentListOrder(){if(!this.selectedFields.length)return!1;let e=C(this.allLists).map(o=>o.name),t=new Set(this.selectedFields),s=e.filter(o=>t.has(o)),i=s.length!==this.selectedFields.length||s.some((o,n)=>o!==this.selectedFields[n]);return i&&(this.selectedFields=[...s]),i}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),_(`${t.autoClose}`,a`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${u(this.popoverNode)}><calcite-flow style=${k({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${u(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${u(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple||!this.hideCancel)&&a`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?a`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:a`${this.renderAddButton()}${this.renderCancelButton()}`}</div>`||""}</calcite-flow-item></calcite-flow></calcite-popover>`)},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=se(this.allLists),s=te(this.allLists),i=C(this.allLists).length>=this.showFilterLength;return t.length||s.length?s.length?this.renderSplitLists(t,s,i):this.renderTopLevelOnlyFieldList(e,t,i):a`<slot name=no-fields></slot>`}renderSplitLists(e,t,s){let i=C(this.allLists),o=ie(this.allLists).some(n=>B(n,this.filterText));return a`${s?a`<div class="list-controls"><calcite-filter .items=${i} .filterProps=${["name","alias","description"]} .placeholder=${this.filterPlaceholderText??this._messages.filter} @calciteFilterChange=${n=>{this.filterText=n.currentTarget.value,this.filterFields=this.filterText?le(this.allLists,this.filterText).map(r=>r.name):void 0}}></calcite-filter>${this.renderSortButton()}</div>`:null}<div class=${E(this.listOnly?"":"list-wrapper")} ${u(this.listWrapper)}>${this.shouldRenderSelectionButton(s)?this.renderSelectionButton():null}${this.renderSplitSubFieldLists(t)}${e.length?this.renderSplitTopLevelFieldList(e,!0):null}</div>${this.filterText&&!o&&this.filterNoResultsText?.length!==0?a`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSplitSubFieldLists(e){let t=e.map(s=>({...s,fields:s.fields.filter(i=>B(i,this.filterText))})).filter(s=>!!s.fields.length);return D(t,s=>s.title,s=>a`<calcite-list selection-mode=none .label=${s.title??this.heading??""}><calcite-list-item-group .heading=${s.title}>${D(s.fields,i=>i.name,i=>a`<calcite-list-item .label=${i.alias||i.name} .description=${this.multiple?this._messages.subFieldsSelected.replace("${count}",`${i.subFieldInfos.filter(o=>this.selectedFields.includes(o.name)).length}`):void 0} .value=${i.name} @click=${o=>this.addSubFieldInfoFlowItem(i,o.currentTarget)} @keydown=${o=>{o.key==="Enter"&&this.addSubFieldInfoFlowItem(i,o.currentTarget)}}><calcite-icon slot=actions-end icon=chevron-right flip-rtl scale=s></calcite-icon></calcite-list-item>`)}</calcite-list-item-group></calcite-list>`)}renderSplitTopLevelFieldList(e,t){return a`<calcite-list .label=${this.heading||(this.multiple?this._messages.headerSelect:this._messages.header)} .selectionMode=${this.multiple?"multiple":"single"} @calciteListChange=${()=>this.handleListSelectionChange(e)} ${u(this.listNode)}><slot name=content-center></slot>${this.renderGroupedListItems(t)}</calcite-list>`}renderTopLevelOnlyFieldList(e,t,s){return a`<div class=${E(this.listOnly?"":"list-wrapper")} ${u(this.listWrapper)}><calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>this.handleListSelectionChange(t)} @calciteListFilter=${i=>{i.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(o=>o.value),this.filterText=this.listNode.value.filterText}} ${u(this.listNode)}>${this.renderSortButton("filter-actions-end")}${this.shouldRenderSelectionButton(s)?this.renderSelectionButton():null}<slot name=content-center></slot>${this.renderGroupedListItems(!1)}</calcite-list></div>`}renderSortButton(e){let t=C(this.allLists);if(!(t.length>=this.showFilterLength&&!this.hideSort))return"";let s=t.every(i=>!!i.type);return a`<calcite-dropdown slot=${e??v} placement=bottom-end overlay-positioning=fixed @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${u(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??v}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @calciteDropdownItemSelect=${()=>this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @calciteDropdownItemSelect=${()=>this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${s&&a`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @calciteDropdownItemSelect=${()=>this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @calciteDropdownItemSelect=${()=>this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return a`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=C(this.allLists);this.selectedFields=e.map(t=>t.name)}this.reorderSelectedFieldsByCurrentListOrder(),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderGroupedListItems(e){let t=this.allLists.filter(s=>!!s.fields.length&&!y(s.fields)).map(s=>({...s,fields:e?s.fields.filter(i=>B(i,this.filterText)):s.fields})).filter(s=>!!s.fields.length);return t.length===1&&!t[0].title?this.renderListItems(t[0].fields):t.map(s=>a`<calcite-list-item-group .heading=${s.title}>${this.renderListItems(s.fields)}</calcite-list-item-group>`)}renderListItems(e){return e.map(t=>this.renderCalciteListItem(t))}renderCalciteListItem(e,t=!0){let s=t&&this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return _(e.name,a`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&a`<div slot=actions-end class="field-icons">${Z({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,s)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:s}=this;return t?a`<calcite-action slot=actions-end .text=${s.info} title=${s.info??v} scale=s icon=information @click=${i=>{i.stopPropagation();let o=i.currentTarget;this.addFieldInfoFlowItem(e,o)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?a`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??v} scale=s icon=pencil @click=${s=>{s.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?a`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??v} scale=s icon=trash @click=${s=>{s.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){return this.multiple?a`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`:""}renderCancelButton(){return this.hideCancel?"":a`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};J("arcgis-field-pick-list",O);export{O as ArcgisFieldPickList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as i}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as i}from"./YJTI6KPW.js";import{a as u,b as m}from"./3KZKOKL3.js";import{f as g}from"./QJJFF4PI.js";import{J as o,K as a,L as d,M as e,O as p,R as h,h as l,j as n,t as s,w as c}from"./DLOQSM4T.js";var v=l`.arcgis-app-ckeditor-popover-footer{display:flex;justify-content:flex-end;margin-top:var(--calcite-space-sm);padding:0 var(--calcite-space-lg)}.arcgis-app-ckeditor-popover-container{margin:0 var(--calcite-space-md) 0 0;padding-bottom:var(--calcite-space-lg);box-shadow:val(--calcite-shadow-1)}`,r=class extends d{constructor(){super(),this.okButton=o(),this.popoverNode=o(),this._propWatcherTask=new u(this,{task:async([t])=>{if(!m(t)){console.error("[ckeditor5] Required properties are missing.");return}},args:()=>[this.refElement]}),this.guid=c(),this.intlOk="Ok",this.intlCancel="Cancel",this.arcgisCkeditor5PopoverClosed=s(),this.arcgisPopoverClosed=s(),this.listen("arcgisCreated",this.afterEditorCreated),this.listen("arcgisSourceEditingChanged",this.onSourceEditingStatusChanged)}static{this.properties={guid:1,refElement:0,intlOk:1,intlCancel:1,intlLabel:1}}static{this.styles=v}async reposition(){this.popoverNode.value?.reposition()}afterEditorCreated(t){this.editor=t.target,this.reposition(),this.requestUpdate()}onSourceEditingStatusChanged(t){this.okButton.value&&(this.okButton.value.disabled=t.detail)}render(){return this.el.classList.add("js-app-flyout"),this._propWatcherTask.render({complete:()=>n`<calcite-popover class=${e(i.popover)} dir=${g(this.el)??p} placement=leading-start open pointer-disabled .referenceElement=${this.refElement} .offsetDistance=${-Math.round(this.refElement.getBoundingClientRect().width)} offset-skidding=50 .label=${this.intlLabel??""} focus-trap-disabled trigger-disabled top-layer-disabled ${a(this.popoverNode)}><div class=${e(i.arcgisAppCkeditorPopoverContainer)}><slot></slot><div class=${e(i.arcgisAppCkeditorPopoverFooter)}><calcite-button .label=${this.intlOk} @click=${async t=>{this.okButton.value?.disabled||(t.stopPropagation(),this.arcgisCkeditor5PopoverClosed.emit({guid:this.guid,data:await this.editor?.getData()}),this.arcgisPopoverClosed.emit({guid:this.guid,data:await this.editor?.getData()}))}} ${a(this.okButton)}>${this.intlOk}</calcite-button><calcite-button appearance=outline-fill .label=${this.intlCancel} @click=${t=>{t.stopPropagation(),this.arcgisCkeditor5PopoverClosed.emit({guid:this.guid}),this.arcgisPopoverClosed.emit({guid:this.guid})}}>${this.intlCancel}</calcite-button></div></div></calcite-popover>`})}};h("arcgis-ckeditor5-popover",r);export{r as ArcgisCkeditor5Popover};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{e as w,g as x,o as E,p as D}from"./P3DCEHGK.js";import{a as B,b as f,c as T}from"./3KZKOKL3.js";import{a as A}from"./O2DY73RF.js";import"./RT25KW2T.js";import"./QJJFF4PI.js";import{a as C}from"./2ZQLPGO6.js";import{J as R,K as U,L as H,R as _,h as O,j as Z,o as $,p as F,t as I}from"./DLOQSM4T.js";export default $arcgis.t(([{formatDate:N,convertDateFormatToIntlOptions:y,formatDateOnly:ie,formatTimeOnly:se,formatTimestamp:M,formatNumber:ae},ne,K,{clone:S}])=>{function W(i){return new Date(`1970-01-01T${i}Z`).getTime()}function P(i){return new Date(`${i} 00:00:00`).getTime()}function oe(i,e,s){let t;return e==="unknown"?t=N(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=N(i,{...y("short-date-short-time"),timeZone:e}),t}function le(i){return i?ie(i,y("short-date")):""}function re(i){let e;return typeof i=="string"?e=se(i,y("short-date-long-time")):e=N(i,{...y("long-time"),timeZone:"utc"}),e}function ue(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?M(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):M(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?N(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):N(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function j(i,e,s){if(!w(i)&&!D(i)&&!E(i)&&!x(i))return;let t;return T(i,s).fields.forEach(l=>{let a=l.name,c="domain"in l?l.domain:void 0;if(!x(i)&&i.subtypeField===a){let m;E(i)||w(i)?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{D(i)&&i.subtypeCode!==r.code||(e.name===a&&(t=t||[],t.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(n=>{if(e.name===n){let o=r.domains[n];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let d=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(d=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),d||t.push({code:u.code,name:u.name})})}}))})}if(e.name===a&&(w(i)||x(i))){let m=w(i)?i.typeIdField:void 0,r=w(i)?i.types:void 0;w(i)&&m&&r?(m===a?t=r.map(n=>({code:n.id,name:n.name})):(t=t||[],r.forEach(n=>{if(!n.domains?.[a]||n.domains[a].type==="inherited"){let o=c;o?.codedValues&&o.codedValues.forEach(u=>{let d=!1;t.forEach(g=>{g.code===u.code&&(d=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),d||t.push(S(u))})}else n.domains?.[a]?.codedValues&&n.domains[a].codedValues.forEach(o=>{let u=!1;t.forEach(d=>{d.code===o.code&&(u=!0,`| ${d.name} |`.includes(`| ${o.name} |`)||(d.name+=` | ${o.name}`))}),u||t.push(S(o))})})),!t?.length&&c?.codedValues&&(t=S(c.codedValues))):c?.codedValues&&(t=c.codedValues)}}),t}function L(i,e){let s=e;if(s){let t="";for(let l=0;l<s.length;l++){let a=s[l];a.code==i&&(t+=(t.length?" | ":"")+a.name)}return t.length||(t=`${i}`),t}return i}function G(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function J(i){switch(i.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"blob":case"geometry":case"global-id":case"guid":case"oid":case"raster":case"xml":return;default:return i.type}}var de=O`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`,k=class extends H{constructor(){super(...arguments),this.dropdownNode=R(),this.initialized=!1,this._messages=A({blocking:!0}),this._propWatcherTask=new B(this,{task:async([e,s,t])=>{let l=f(e)&&f(s)||f(t);if(!f(t)&&!f(e)&&!f(s)?$("error",this,F("uniqueValues")):f(t)||(f(e)||$("error",this,F("layer")),f(s)||$("error",this,F("fieldName"))),f(e)&&f(s)){let{visualizationSource:a}=this;if(!T(e,a).fields?.filter(c=>c.name===s))throw $("error",this,"Field could not be found."),new Error}if(!l)throw new Error;await this.processProps(),this._propWatcherTask.autoRun=!1},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=I(),this.arcgisSortByChange=I(),this.arcgisLoad=I()}static{this.properties={initialRender:16,view:0,layer:0,visualizationSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=de}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(f(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:t}=e;return{uniqueValues:s,partialUniqueValues:t}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}willUpdate(e){this.initialized&&(e.has("layer")||e.has("visualizationSource")||e.has("fieldName")||e.has("uniqueValues"))&&this.processProps().then(()=>this.requestUpdate()),e.has("maxHeight")&&this.maxHeight&&this.listNode?.setAttribute("style",`max-height: ${this.maxHeight||400}px`)}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,a=(e?T(e,l):void 0)?.fields?.filter(c=>c.name===s)?.[0];if(!a){$("error",this,`Field '${s}' not found in layer`),this.fieldInfo={layerField:a,fieldDomains:void 0,simpleType:void 0,partialUniqueValues:!1,uniqueValueInfos:[]};return}if(f(this.uniqueValues))this.fieldInfo={layerField:a,fieldDomains:e&&a?j(e,a,l):void 0,simpleType:e&&a?J(a):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&a){this.fieldInfo={layerField:a,fieldDomains:j(e,a,l),simpleType:J(a),partialUniqueValues:!1};let{fieldInfo:c}=this;try{let m=await ne({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:l==="feature-reduction"}),r=G(a),n=m.uniqueValueInfos.filter(o=>f(o.value)?a.type==="string"&&!r||a.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(G(a)||a.type,o.value!=="<Null>"&&o.value!==""):!1);n.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),c.fieldDomains?.length&&c.fieldDomains.forEach(o=>{n.find(u=>u.value===o.code)||n.push({value:o.code,count:0})}),c.uniqueValueInfos=n,c.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.initialized||this.arcgisLoad.emit(),this.setUpTimeZoneHandle(),this.initialized=!0}catch(m){if($("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(c)){let r=[];c.fieldDomains.forEach(n=>{r.find(o=>o.value===n.code)||r.push({value:n.code,count:void 0})})}this.initialized=!0}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:s}=this;this.listNode=e,s&&e?.setAttribute("style",`max-height: ${s||400}px`)}onSortMenuSelect(e){let s=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=s||void 0,this.arcgisSortByChange.emit(s||void 0)}setUpTimeZoneHandle(){this.timeZoneHandle?.remove();let{view:e,fieldInfo:s}=this;s.simpleType&&["date","timestamp-offset"].includes(s.simpleType)&&(this.timeZoneHandle=K.watch(()=>e?.timeZone,()=>this.requestUpdate()))}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==s[t])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:t,multiple:l,initialRender:a,showFilterLength:c,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:n,partialUniqueValues:o,layerField:u}=e,d=u?.type;if(!n?.length)return"";let g=d?["small-integer","big-integer","integer","single","double","long","oid"].includes(d):!1,Q=d?["date","date-only","time-only"].includes(d):!1,X=v=>{v.sort((h,p)=>h.count<=p.count?1:-1)},Y=v=>{let h=r?.length;v.sort((p,V)=>{if(!h&&g)return(typeof p.value=="string"?Number.parseFloat(p.value):p.value)-(typeof V.value=="string"?Number.parseFloat(V.value):V.value);{let q=h?L(p.value,r):p.label??p.value,b=h?L(V.value,r):V.label??V.value;return`${q}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${q}`.localeCompare(`${b}`)}})},ee=(v,h)=>{v.sort((p,V)=>{let q=h?.indexOf(p.value)??-1,b=h?.indexOf(V.value)??-1;return q===b||q>-1&&b>-1?0:q>b?-1:1})};Y(n),!t||t==="count"?X(n):t==="selected"&&ee(n,s);let te=n.map(v=>this.renderUniqueValue(v)),z;return o&&!a&&(z=Z`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),Z`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${n.length>=c} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${v=>{let h=v.currentTarget.selectedItems.map(p=>p.value);!r&&d==="date-only"?h=h?.map(p=>P(p)):!r&&d==="time-only"?h=h?.map(p=>W(p)):d&&["date","oid","small-integer","big-integer","integer","long"].includes(d)?h=h?.map(p=>Number.parseInt(p)):d&&["single","double"].includes(d)&&(h=h?.map(p=>Number.parseFloat(p))),!this.isSameLists(h,this.selectedValues)&&(this.selectedValues=h,this.arcgisChange.emit(h))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${U(this.setListRef)}>${n.length>=c&&!a?this.renderSort(g,Q):null}${te}</calcite-list>${z}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return Z`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${U(this.dropdownNode)}><calcite-action slot=trigger .label=${l.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t==="count"||!f(t)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:t,view:l,fieldInfo:a,numberFormatOptions:c}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:n}=a,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?L(e.value,m):n==="date"?oe(e.value,o):n==="date-only"?le(e.value):n==="time-only"?re(e.value):n==="timestamp-offset"?ue(e.value,l):typeof e.value=="number"?ae(e.value,c):e.label??e.value,d=s?n==="date-only"?s.includes(m?.length?e.value:P(e.value)):n==="time-only"?s.includes(m?.length?e.value:W(e.value)):s.includes(e.value):!1;return C(`list-item_${e.value}`,Z`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${d}>${f(e.count)&&(r.length>200&&!t||r.length<=200)?Z`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};_("arcgis-unique-values-list",k);return k},"intl","smartMapping/statistics/uniqueValues","core/reactiveUtils","core/lang")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as o}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as o}from"./2ZQLPGO6.js";import{L as l,O as m,R as p,h as d,j as i,t as c}from"./DLOQSM4T.js";var b=d`:host{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth;height:100%;width:100%}`,n=class extends l{constructor(){super(...arguments),this.treeItemsOpen=new Set,this.handleMutations=e=>{e.forEach(t=>{if(t.type==="attributes"&&t.attributeName==="expanded"){let s=t.target;"key"in s.dataset&&s.dataset.key!==void 0&&this.treeItemsOpen.has(s.dataset.key)!==s.expanded&&this.toggleTreeItem(s.dataset.key)}})},this.renderedTree=[],this.data={},this.arcgisChange=c()}static{this.properties={renderedTree:16,data:0,value:1}}static{this.styles=b}load(){this.setupComponent()}willUpdate(e){e.has("data")&&(this.hasUpdated||Object.keys(this.data??{}).length>0)&&this.setupComponent()}loaded(){this.manager.onLifecycle(()=>{this.observer=new MutationObserver(this.handleMutations);let e=this.el.shadowRoot??this.el;return this.observer.observe(e,{attributes:!0,subtree:!0,attributeFilter:["expanded"]}),()=>{this.observer?.disconnect(),this.observer=void 0}})}setupComponent(){this.treeItemsOpen.clear(),this.buildJSXTree()}buildJSXTree(){let e=t=>{let s=[];for(let r of Object.keys(t)){let a=t[r],h;typeof a=="object"&&(h=this.treeItemsOpen.has(r)?e(a):[]);let u=typeof a=="object"?r:a;s.push(this.createTreeItem(r,u,h))}return s};this.renderedTree=e(this.data)}toggleTreeItem(e){this.treeItemsOpen.has(e)?this.treeItemsOpen.delete(e):this.treeItemsOpen.add(e),this.buildJSXTree()}createTreeItem(e,t,s){return i`<calcite-tree-item data-key=${e??m} .selected=${this.value===e} .expanded=${this.treeItemsOpen.has(e)}>${t}${s!==void 0&&o(`${e}-child-tree`,i`<calcite-tree slot=children>${s}</calcite-tree>`)||""}</calcite-tree-item>`}handleTreeSelect(e){let t=e.currentTarget?.selectedItems[0]?.dataset.key;t!==void 0&&(this.value=t,this.arcgisChange.emit())}render(){return o("base-tree",i`<calcite-tree scale=s @calciteTreeSelect=${this.handleTreeSelect}>${this.renderedTree}</calcite-tree>`)}};p("arcgis-coordinate-system-picker-tree",n);export{n as ArcgisCoordinateSystemPickerTree};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as p}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{b as p}from"./RT25KW2T.js";import"./QJJFF4PI.js";import{J as a,K as s,L as h,M as c,R as d,h as r,j as n,t as u}from"./DLOQSM4T.js";export default $arcgis.t(([{formatNumber:m}])=>{var _=r`:host{display:block}:host([hidden]){display:none}.content{display:flex;flex-direction:column}.readOnlyLabel{display:block;font-size:var(--calcite-font-size-sm);font-variant-numeric:tabular-nums;line-height:var(--calcite-font-line-height-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:.5rem;padding-block:3px;border-color:var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px);color:var(--calcite-color-text-1)}:host(:not([read-only])) .readOnlyLabel{position:absolute;opacity:0}:host([alignment="start"]){.content{align-items:start}.readOnlyLabel{text-align:start}}:host([alignment="end"]){.content{align-items:end}.readOnlyLabel{text-align:end}}:host([alignment="center"]){.content{align-items:center}.readOnlyLabel{text-align:center}}calcite-button{inline-size:100%;--calcite-offset-invert-focus: 1;--calcite-internal-animation-timing-fast: 0}calcite-input-number{inline-size:100%;--calcite-internal-animation-timing-fast: 0}`,o=class extends h{constructor(){super(),this._buttonRef=a(),this._inputRef=a(),this._labelRef=a(),this._formatOptions={style:"decimal",useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:2},this._formatValue=t=>m(t,this._formatOptions),this._pointerDownPosition=null,this._displayedValue="",this._editing=!1,this.alignment="center",this.readOnly=!1,this.value=0,this.arcgisChange=u({cancelable:!1}),p(["hidden"],()=>this.requestUpdate())}static{this.properties={_displayedValue:16,_editing:16,alignment:3,editing:39,labelFormatter:0,readOnly:7,value:11}}static{this.styles=_}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get editing(){return this._editing}async edit(){this._enterEdit()}getLabelBoundingClientRect(){return this._labelRef.value?this._labelRef.value.getBoundingClientRect():this.el.getBoundingClientRect()}willUpdate(t){if(t.has("value")||t.has("labelFormatter")){let e=this.value;this._displayedValue=this._internalLabelFormatter(e)}}updated(t){this.#t()}#t(){let t=this._inputRef.value,e=this._buttonRef.value,i=this.renderRoot.querySelector(".readOnlyLabel");if(t&&e&&i){let l=i.offsetWidth;l>0&&(e.style.width=`${l}px`,t.style.width=`${l}px`)}}_enterEdit(){this._editing||this.readOnly||(this._editing=!0,this.requestUpdate("editing",!1),this.updateComplete.then(async()=>{let t=this._inputRef.value;await t?.setFocus(),await t?.selectText()}))}_exitEdit(t,e=!1){this._editing&&(t&&this._commitValue(this._inputRef.value),this._displayedValue=this._internalLabelFormatter(this.value),this._inputRef.value&&(this._inputRef.value.value=`${this.value}`),this._editing=!1,this.requestUpdate("editing",!0),e||this.updateComplete.then(async()=>{await this._buttonRef.value?.setFocus()}))}_commitValue(t){let e=this._parseNumber(t?.value??"");e!==null&&this.value!==e&&(this.value=e,this.arcgisChange.emit())}_parseNumber(t){if(t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:this.value??null}_internalLabelFormatter(t){let e=this.labelFormatter;return e?e(t,this._formatValue)??this._formatValue(t):this._formatValue(t)}_onBlur(){this._exitEdit(!0,!0)}_onValueChange(t){this._commitValue(t.currentTarget)}_onKeyDown(t){t.key==="Enter"?(this._exitEdit(!0),t.stopPropagation(),t.preventDefault()):t.key==="Escape"&&(this._exitEdit(!1),t.stopPropagation(),t.preventDefault())}_onPointerDown(t){this._pointerDownPosition={x:t.clientX,y:t.clientY}}_onClick(t){if(this._pointerDownPosition){let e=t.clientX-this._pointerDownPosition.x,i=t.clientY-this._pointerDownPosition.y;if(Math.sqrt(e*e+i*i)>2)return}this._enterEdit(),this._pointerDownPosition=null}_onInput(t){let e=this._parseNumber(t.currentTarget.value??"");if(e===null){this._displayedValue="";return}this._displayedValue=this._internalLabelFormatter(e)}render(){let{alignment:t,_displayedValue:e}=this,i=[n`<span class="readOnlyLabel"><span ${s(this._labelRef)}>${e}</span></span>`];return this.readOnly||i.push(n`<calcite-button .alignment=${t} appearance=transparent .hidden=${this._editing} kind=neutral @pointerdown=${this._onPointerDown} @click=${this._onClick} scale=s width=full ${s(this._buttonRef)}>${e}</calcite-button>`,n`<calcite-input-number .alignment=${t} group-separator .hidden=${!this._editing} number-button-type=none @calciteInputNumberChange=${this._onValueChange} @keydown=${this._onKeyDown} @blur=${this._onBlur} @input=${this._onInput} scale=s status=idle .value=${`${this.value}`} ${s(this._inputRef)}></calcite-input-number>`),n`<div class=${c({content:!0})}>${i}</div>`}};d("arcgis-label-input",o);return o},"intl")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{u as s}from"./DLOQSM4T.js";var r=class extends s{constructor(t){super(t),this.ref=e=>{e!==this._referenceElement&&(this._referenceElement=e,this.exports=void 0,e&&e.componentOnReady().then(()=>{this._referenceElement===e&&(this.exports=e)}))},this.exports=void 0,this.watchExports(()=>{t.el.dispatchEvent(new CustomEvent("arcgisInternalLayoutUpdate",{bubbles:!0,composed:!0}))})}get element(){return this.exports}};export{r as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as o}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as o}from"./O2DY73RF.js";import{e as n}from"./RT25KW2T.js";import"./QJJFF4PI.js";import{L as r,R as l,h as c,j as i}from"./DLOQSM4T.js";var h=c`:host{align-items:center;display:flex;flex:auto;min-width:300px;padding-inline:var(--calcite-space-sm);--calcite-color-border-input: var(--calcite-color-border-3)}calcite-combobox{flex:auto;width:var(--calcite-space-none)}`,a=class extends r{constructor(){super(...arguments),this.messages=o({blocking:!0}),this.autoDestroyDisabled=!1,this.disabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=n()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,disabled:5,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}static{this.styles=h}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.[0]}step(e){if(!this.items||!this.currentValue)return;let t=this.items.findIndex(({value:s})=>s===this.currentValue?.value)+(e==="next"?1:-1);t>=this.items.length||t<0||(this.currentValue=this.items[t],this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(e){(e.has("currentValue")||e.has("items"))&&this.items?.length&&(this.currentValue??=this.items[0]),this.el.hidden=!this.items?.length,this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let e=this.items.findIndex(({value:t})=>t===this.currentValue?.value);this.canNext=e<this.items.length-1,this.canPrevious=e>0}render(){return i`<calcite-combobox .disabled=${this.disabled} selection-mode=single .label=${this.messages.comboboxLabel} @calciteComboboxChange=${({currentTarget:e})=>{let t=e.selectedItems[0]?.value;this.currentValue=this.items?.find(({value:s})=>s===t),this._checkState()}}>${this.items?.map(e=>i`<calcite-combobox-item .value=${e.value} .heading=${e.label} .selected=${e.value===this.currentValue?.value}></calcite-combobox-item>`)}</calcite-combobox>`}};l("arcgis-value-picker-combobox",a);export{a as ArcgisValuePickerCombobox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{e as r}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{e as r}from"./RT25KW2T.js";import"./QJJFF4PI.js";import{L as i,R as a}from"./DLOQSM4T.js";var s=class extends i{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=r()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.at(0)}step(t){if(!this.items||!this.currentValue)return;let e=this.items.indexOf(this.currentValue)+(t==="next"?1:-1);e>=this.items.length||e<0||(this.currentValue=this.items.at(e),this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(t){(t.has("currentValue")||t.has("items"))&&this.items?.length&&(this.currentValue??=this.items.at(0)),this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let t=this.items.indexOf(this.currentValue);this.canNext=t>=0&&t<this.items.length-1,this.canPrevious=t>0}};a("arcgis-value-picker-collection",s);export{s as ArcgisValuePickerCollection};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{L as l,R as e,h as r,j as a}from"./DLOQSM4T.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{e as n}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{e as n}from"./RT25KW2T.js";import"./QJJFF4PI.js";import{L as c,R as l,h as r,j as s}from"./DLOQSM4T.js";var h=r`:host{display:flex;flex:auto;padding-inline:var(--calcite-space-sm)}arcgis-slider{flex:auto}arcgis-ticks{--arcgis-ticks-font-size: var(--calcite-font-size--3);--arcgis-ticks-gap: var(--calcite-space-base)}.content-end-stack{display:flex;flex-direction:column;flex:1}.ticks-stack{height:var(--calcite-space-sm);position:relative}.ticks-stack arcgis-ticks{inset:var(--calcite-space-none);position:absolute}.label-ticks{--arcgis-ticks-tick-length: var(--calcite-space-2xs);--arcgis-ticks-tick-color: transparent}.minor-ticks{--arcgis-ticks-tick-length: var(--calcite-space-2xs)}.major-ticks{--arcgis-ticks-tick-length: var(--calcite-space-sm)}:host([layout="vertical"]){padding-inline:var(--calcite-space-none);width:var(--calcite-size-xl);arcgis-ticks{--arcgis-ticks-gap: var(--calcite-space-sm)}.content-end-stack{position:relative}.ticks-stack{height:100%}.label-ticks{inset:var(--calcite-space-none);position:absolute}}`,a=class extends c{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.disabled=!1,this.layout="horizontal",this.mirrored=!1,this.arcgisPropertyChange=n()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,canNext:5,canPlay:5,canPrevious:5,currentValue:9,disabled:5,labelFormatter:0,labels:0,layout:3,max:9,min:9,mirrored:5,steps:0,majorTicks:0,minorTicks:0}}static{this.styles=h}get _ascending(){return this.layout==="horizontal"&&!this.mirrored||this.layout==="vertical"&&this.mirrored}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this._ascending?this.steps?.at(0):this.steps?.at(-1)}step(t){if(!this.steps||this.currentValue===void 0)return;let e=t==="next"===this._ascending?1:-1,i=this.steps.indexOf(this.currentValue)+e;i>=this.steps.length||i<0||(this.currentValue=this.steps[i],this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(t){t.has("steps")&&this.steps?.length&&(this.min??=this.steps[0],this.max??=this.steps.at(-1)),(t.has("currentValue")||t.has("max"))&&this.max!==void 0&&(this.currentValue??=this.max),this.el.hidden=this.min===void 0||this.max===void 0||this.currentValue===void 0,this._checkState()}_checkState(){if(!this.steps?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let t=this.steps.findIndex(i=>i===this.currentValue),e=this.steps.length-1;this.canNext=this._ascending?t<e:t>0,this.canPrevious=this._ascending?t>0:t<e}_handleSliderChange(t){this.currentValue=t.currentTarget.values[0],this._checkState()}_handleSliderInput(t){this.currentValue=t.currentTarget.values[0],this._checkState()}render(){return this.currentValue===void 0?null:s`<arcgis-slider .disabled=${this.disabled} .layout=${this.layout} .min=${this.min} .max=${this.max} .steps=${this.steps} .mirrored=${this.mirrored} .values=${[this.currentValue]} @arcgisInput=${t=>this._handleSliderInput(t)} @arcgisChange=${t=>this._handleSliderChange(t)}>${(this.majorTicks?.length||this.minorTicks?.length||this.labels?.length)&&s`<div slot=content-end class="content-end-stack">${(this.majorTicks?.length||this.minorTicks?.length)&&s`<div class="ticks-stack">${this.majorTicks?.length&&s`<arcgis-ticks .layout=${this.layout} class="major-ticks" .min=${this.min} .max=${this.max} .mirrored=${this.mirrored} .values=${this.majorTicks} mode=value></arcgis-ticks>`||""}${this.minorTicks?.length&&s`<arcgis-ticks .layout=${this.layout} class="minor-ticks" .min=${this.min} .max=${this.max} .mirrored=${this.mirrored} .values=${this.minorTicks} mode=value></arcgis-ticks>`||""}</div>`||""}${this.labels?.length&&s`<arcgis-ticks .layout=${this.layout} class="label-ticks" .min=${this.min} .max=${this.max} .mirrored=${this.mirrored} .values=${this.labels} mode=value show-labels label-placement=end .labelFormatter=${this.labelFormatter}></arcgis-ticks>`||""}</div>`||""}</arcgis-slider>`}};l("arcgis-value-picker-slider",a);export{a as ArcgisValuePickerSlider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as p}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{b as p}from"./NMDESY3T.js";var l=1440*60*1e3,T=/^(\d{4})-(\d{2})-(\d{2})$/u,F=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/u,o=class{constructor({type:e,editable:t,precision:r,steps:i}){this.type=e,this.editable=t,this.precision=r,this.steps=i}toDateOnly(e){return null}toTimeOnly(e){return null}toTimestampOffset(e){return null}toFieldType(e){return e}},a=class extends o{constructor({type:e,precision:t,integer:r=!1,minimum:i,maximum:m}){super({type:e,editable:!0,precision:t}),this._integer=r,this._minimum=i,this._maximum=m}resolveRange(e,t,r){return{min:t??Math.min(0,...e),max:r??Math.max(100,...e)}}parse(e){let t=Number.parseFloat(e.trim());if(!Number.isFinite(t))return;let r=this._integer?Math.trunc(t):t;return Math.min(this._maximum,Math.max(this._minimum,r))}serialize(e){return this._integer?`${Math.trunc(e)}`:`${e}`}format(e,t,r,i){return i(t)}},h=class extends o{constructor(){super({type:"date",editable:!1,precision:0,steps:1e3}),this._dateTimeFormatOptions={dateStyle:"short"}}resolveRange(e,t,r){return f(e,t,r,Date.now())}parse(e){let t=Number.parseFloat(e.trim());return Number.isFinite(t)?Math.trunc(t):void 0}serialize(e){return`${Math.trunc(e)}`}toDateOnly(e){return new Date(e).toISOString().slice(0,10)}toTimeOnly(e){return new Date(e).toISOString().slice(11,19)}toTimestampOffset(e){return new Date(e).toISOString()}format(e,t){return p(e,this._dateTimeFormatOptions).format(new Date(t))}},g=class extends o{constructor(){super({type:"timestamp-offset",editable:!1,precision:0,steps:1e3}),this._dateTimeFormatOptions={dateStyle:"short"}}resolveRange(e,t,r){return f(e,t,r,Date.now())}parse(e){let t=Date.parse(e.trim());return Number.isFinite(t)?t:void 0}serialize(e){return new Date(e).toISOString()}toDateOnly(e){return new Date(e).toISOString().slice(0,10)}toTimeOnly(e){return new Date(e).toISOString().slice(11,19)}toTimestampOffset(e){return new Date(e).toISOString()}toFieldType(e){return this.serialize(e)}format(e,t){return p(e,this._dateTimeFormatOptions).format(new Date(t))}},x=class extends o{constructor(){super({type:"date-only",editable:!1,precision:0,steps:l}),this._dateFormatOptions={dateStyle:"short",timeZone:"UTC"}}resolveRange(e,t,r){return f(e,t,r,Math.trunc(Date.now()/l)*l)}parse(e){let t=T.exec(e.trim());if(!t)return;let r=Number.parseInt(t[1],10),i=Number.parseInt(t[2],10),m=Number.parseInt(t[3],10),s=Date.UTC(r,i-1,m),u=new Date(s);if(!(u.getUTCFullYear()!==r||u.getUTCMonth()!==i-1||u.getUTCDate()!==m))return s}serialize(e){return new Date(e).toISOString().slice(0,10)}toDateOnly(e){return this.serialize(e)}toTimestampOffset(e){return new Date(e).toISOString()}toFieldType(e){return this.serialize(e)}format(e,t){return p(e,this._dateFormatOptions).format(new Date(t))}},y=class extends o{constructor(){super({type:"time-only",editable:!1,precision:0,steps:1e3}),this._timeFormatOptions={timeStyle:"medium",timeZone:"UTC"}}resolveRange(e,t,r){return{min:t??0,max:r??l-1}}parse(e){let t=F.exec(e.trim());if(!t)return;let r=Number.parseInt(t[1],10),i=Number.parseInt(t[2],10),m=t[3]?Number.parseInt(t[3],10):0,s=t[4]?Number.parseInt(t[4].padEnd(3,"0").slice(0,3),10):0;if(!(r>23||i>59||m>59))return((r*60+i)*60+m)*1e3+s}serialize(e){let t=Math.max(0,Math.min(l-1,Math.floor(e))),r=Math.floor(t/36e5),i=Math.floor(t%36e5/6e4),m=Math.floor(t%6e4/1e3),s=t%1e3,u=`${d(r)}:${d(i)}:${d(m)}`;return s>0?`${u}.${s.toString().padStart(3,"0")}`:u}toTimeOnly(e){return this.serialize(e)}toFieldType(e){return this.serialize(e)}format(e,t){return p(e,this._timeFormatOptions).format(new Date(t))}};function d(n){return n.toString().padStart(2,"0")}function f(n,e,t,r){let i=t??(n.length>0?Math.max(...n):r);return{min:e??Math.min(i-30*l,...n),max:i}}var O={min:-32768,max:32767},c={min:-2147483648,max:2147483647},S={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER},b=(2-2**-23)*2**127,w={min:-b,max:b},D={min:-Number.MAX_VALUE,max:Number.MAX_VALUE},M={min:0,max:c.max},_={"small-integer":()=>new a({type:"small-integer",precision:0,integer:!0,minimum:O.min,maximum:O.max}),integer:()=>new a({type:"integer",precision:0,integer:!0,minimum:c.min,maximum:c.max}),"big-integer":()=>new a({type:"big-integer",precision:0,integer:!0,minimum:S.min,maximum:S.max}),single:()=>new a({type:"single",precision:4,minimum:w.min,maximum:w.max}),double:()=>new a({type:"double",precision:4,minimum:D.min,maximum:D.max}),long:()=>new a({type:"long",precision:0,integer:!0,minimum:c.min,maximum:c.max}),oid:()=>new a({type:"oid",precision:0,integer:!0,minimum:M.min,maximum:M.max}),date:()=>new h,"date-only":()=>new x,"time-only":()=>new y,"timestamp-offset":()=>new g};function I(n){return _[n]()}export{I as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as g,b as _,c as b,d as f}from"./4Z3W4SLN.js";import{b as v,d as o}from"./AHWD5KV4.js";import{c as m}from"./RT25KW2T.js";import"./QJJFF4PI.js";import{a as u}from"./2ZQLPGO6.js";import{K as l,L as d,R as p,j as n,t as c}from"./DLOQSM4T.js";var h=class extends d{constructor(){super(),this.#e=new ResizeObserver(e=>this._updateMeasurement(e)),this.#r=new MutationObserver(()=>this._syncGroups()),this.#a=m(),this._layout="horizontal",this._setRenderedBar=e=>{e==null&&(this._renderedBar=void 0,this._hydratedRenderedBar=void 0),!(e===this._renderedBar||e===this._hydratedRenderedBar)&&(this._renderedBar=e,this._hydratedRenderedBar=void 0,e&&e.componentOnReady().then(()=>{!this.isConnected||this._renderedBar!==e||(this._hydratedRenderedBar=e)}))},this._availableLength=0,this.scale="m",this.tooltipAppearance="native",this.relativePosition="top-left",this.toolbarKind="floating",this.arcgisInternalLayoutUpdate=c(),this.listen("arcgisInternalLayoutUpdate",e=>{e.target!==this.el&&this.requestUpdate(),this.el.parentElement?.localName!=="arcgis-toolbar-stack"&&e.stopPropagation()})}static{this.properties={_availableLength:16,_groups:16,_renderedBar:16,_hydratedRenderedBar:16,layout:3,scale:3,tooltipAppearance:1,relativePosition:1,toolbarKind:3,barElement:32,effectiveRelativeDirection:16}}static{this.styles=[f,g,_,b]}#e;#r;#s;#a;#t;get layout(){return this._layout}set layout(e){e!==this._layout&&(this._layout=e,this._updateMeasurement())}get barElement(){return this._hydratedRenderedBar}get effectiveRelativeDirection(){let[e,t]=this.relativePosition.split("-"),r=this.#a;switch(t){case"left":case"right":return`${e}-${t}`;case"end":return`${e}-${r==="ltr"?"right":"left"}`;case"start":return`${e}-${r==="ltr"?"left":"right"}`}}measure(e){let t=this._groups;if(!t?.length)return[0];let r=t.map(s=>s.measure(e)).reduce((s,a)=>s.flatMap(i=>a.map(y=>i+y)),[0]).map(s=>o(t,e,s).reduce((a,{budget:i})=>a+i,0));return Array.from(new Set(r)).sort((s,a)=>s-a)}allocate(e,t){let r=this._groups;return r?.length?o(r,e,t):[]}proxiedRender(e,t,r=this.toolbarKind){if(!this._groups?.length)return;let s=this.allocate(e,t);return u(this,n`<div class="toolbar-grid-wrapper"><div class="toolbar-shadow-wrapper"><calcite-action-bar expand-toggle-disabled .floating=${r==="floating"} .layout=${e.layout} overflow-mode=none .scale=${e.scale} ${l(this._setRenderedBar)}>${s.map(({group:a,budget:i})=>a.proxiedRender(e,i))}</calcite-action-bar></div></div>`)}connectedCallback(){super.connectedCallback(),this._connectMeasurement(this.#t),this.#r.observe(this.el,{childList:!0}),this._syncGroups()}disconnectedCallback(){this.#e.disconnect(),this.#r.disconnect(),super.disconnectedCallback()}_setRulerEl(e){this.#t!==e&&(this.#t=e,this.isConnected&&this._connectMeasurement(e))}_connectMeasurement(e){this.#e.disconnect(),e&&(this.#e.observe(e),this._updateMeasurement())}_updateMeasurement(e){let t=e?.at(0)?.contentRect??this.#t?.getBoundingClientRect();t&&(this._availableLength=this.layout==="horizontal"?t.width:t.height)}_syncGroups(){this.#s?.abort();let e=Array.from(this.el.children).filter(v),t=new AbortController;this.#s=t,Promise.all(e.map(r=>r.componentOnReady())).then(()=>{!this.isConnected||t.signal.aborted||(this._groups=e,this.arcgisInternalLayoutUpdate.emit())})}render(){if(!this._groups?.length||this.el.parentElement?.localName==="arcgis-toolbar-stack")return;let e={layout:this.layout,relativePosition:this.effectiveRelativeDirection,scale:this.scale,tooltipAppearance:this.tooltipAppearance},[{budget:t}]=o([this],e,this._availableLength);return n`<div class="ruler" ${l(this._setRulerEl)}></div>${this.proxiedRender(e,t)}`}};p("arcgis-toolbar",h);export{h as ArcgisToolbar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as k}from"./B2QFPLR5.js";import{a as R}from"./GPRF6QZC.js";import{a as $,b as w,c as x}from"./3YTGG7RF.js";import{a as h,c as A}from"./AHWD5KV4.js";import"./RT25KW2T.js";import"./QJJFF4PI.js";import{K as f,L as C,M as s,O as d,R as _,j as c}from"./DLOQSM4T.js";var v=class extends C{constructor(){super(...arguments),this._elementReferenceController=new R(this),this._childrenObserver=new MutationObserver(()=>this._syncChildren()),this.priority=h.Medium,this.menuAppearance="dropdown",this.overflowActionLabel="More actions"}static{this.properties={_children:16,priority:9,menuAppearance:1,overflowActionLabel:1}}measure(e){let{priority:i,_children:r}=this,l=r?.length??0;if(!l)return[0];let o=$(e),n=l*o;if(!(i<h.NeverCollapse)||l<=1)return[n];let t=o+M(e);return i<=h.ForceCollapse?[t]:x([t,n])}proxiedRender(e,i){let r=this._children;if(!r)return;let{visible:l,hidden:o}=this._resolveActionsFromBudget(r,e,i,this.menuAppearance==="dropdown"),n=E(e),t=this.overflowActionLabel,m=e.tooltipAppearance,L=m!=="native",b=this._elementReferenceController.element,O=m==="calcite-dark"?"calcite-mode-dark":void 0,g="split-anchor",y=o.length?"split-menu":"",u=w(e),W=this.menuAppearance==="action-menu"?c`<calcite-action-menu class=${s(y)} .label=${t} overlay-positioning=fixed .placement=${u}><calcite-action class=${s(g)} data-layout=${e.layout??d} .icon=${n} .label=${t} .scale=${e.scale} slot=trigger .text=${t} title=${t??d} ${f(this._elementReferenceController.ref)}></calcite-action>${o.map(a=>a.proxiedRender(e,"expanded-action"))}</calcite-action-menu>`:c`<calcite-action class=${s(g)} data-layout=${e.layout??d} .icon=${n} .label=${t} .scale=${e.scale} .text=${m==="native"?t:""} title=${t??d} ${f(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown class=${s(y)} overlay-positioning=fixed .placement=${u} .referenceElement=${b} .scale=${e.scale}><calcite-dropdown-group selection-mode=single>${o.map(a=>a.proxiedRender(e,"dropdown-item",a===l.at(0)))}</calcite-dropdown-group></calcite-dropdown>`;return c`<div class="split-host">${l.map(a=>a.proxiedRender(e,"collapsed-action"))}${o.length?W:void 0}${o.length&&L?c`<calcite-tooltip class=${s(O)} close-on-click overlay-positioning=fixed .placement=${u} .referenceElement=${b}><span>${t}</span></calcite-tooltip>`:void 0}</div>`}connectedCallback(){super.connectedCallback(),this._childrenObserver.observe(this.el,{childList:!0}),this._syncChildren()}disconnectedCallback(){this._childrenObserver.disconnect(),super.disconnectedCallback()}_resolveActionsFromBudget(e,i,r,l){let o=e.find(t=>t.active)??e?.toSorted(k)?.at(0);if(Math.floor(r/$(i))>=e.length)return{visible:[...e],hidden:[]};if(l)return{visible:[o??e[0]],hidden:[...e]};let n=[...e];return{visible:n.splice(n.indexOf(o),1),hidden:n}}_syncChildren(){this._componentWaitAbortController?.abort();let e=Array.from(this.el.querySelectorAll("arcgis-toolbar-item")),i=new AbortController;this._componentWaitAbortController=i,Promise.all(e.map(r=>r.componentOnReady())).then(()=>{!this.isConnected||i.signal.aborted||(this._children=e)})}};function E({layout:p,relativePosition:e}){return p==="horizontal"?e.startsWith("top")?"chevron-down":"chevron-up":e.endsWith("left")?"chevron-right":"chevron-left"}function M({layout:p,scale:e}){return A.splitButtonPart[p][e]}_("arcgis-toolbar-split-button",v);export{v as ArcgisToolbarSplitButton};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{e as n}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{e as n}from"./RT25KW2T.js";import"./QJJFF4PI.js";import{L as r,R as c,h as s,j as a}from"./DLOQSM4T.js";var h=s`:host{display:flex;flex:auto;min-width:300px;padding:var(--calcite-space-sm)}.container{align-items:center;border:solid 1px var(--calcite-color-border-3);display:flex;flex:auto;padding-inline:var(--calcite-space-sm)}.text{color:var(--calcite-color-text-1);flex:auto;font-family:inherit;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--calcite-space-none)}`,i=class extends r{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=n()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}static{this.styles=h}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.[0]}step(t){if(!this.items||!this.currentValue)return;let e=this.items.findIndex(({value:l})=>l===this.currentValue?.value)+(t==="next"?1:-1);e>=this.items.length||e<0||(this.currentValue=this.items[e],this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(t){(t.has("currentValue")||t.has("items"))&&this.items?.length&&!this.currentValue&&(this.currentValue=this.items[0]),this.el.hidden=!this.items?.length,this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let t=this.items.findIndex(({value:e})=>e===this.currentValue?.value);this.canNext=t<this.items.length-1,this.canPrevious=t>0}render(){return a`<div class="container"><div class="text">${this.currentValue?.label}</div></div>`}};c("arcgis-value-picker-label",i);export{i as ArcgisValuePickerLabel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
function t(n,r){return n!=null&&typeof n=="object"&&"type"in n&&n.type===r}function e(n){return t(n,"annotation-feature")}function a(n){return t(n,"csv")}function o(n){return t(n,"dimension-feature")}function s(n){return u(n)&&!n.url}function u(n){return t(n,"feature")}function i(n){return t(n,"geojson")}function f(n){return t(n,"imagery")}function c(n){return t(n,"imagery-tile")}function p(n){return n!=null&&typeof n=="object"&&"type"in n}function y(n){return t(n,"map-image")}function l(n){return t(n,"ogc-feature")}function b(n){return t(n,"scene")}function g(n){return t(n,"stream")}function m(n){return t(n,"sublayer")&&"parent"in n}function j(n){return t(n,"subtype-group")&&"sublayers"in n}function d(n){return t(n,"subtype-sublayer")}function v(n){return t(n,"voxel")}function w(n){return t(n,"wcs")}function x(n){return t(n,"wfs")}export{e as a,a as b,o as c,s as d,u as e,i as f,f as g,c as h,p as i,y as j,l as k,b as l,g as m,m as n,j as o,d as p,v as q,w as r,x as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{L as p,R as m,h as l,j as e}from"./DLOQSM4T.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")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as E}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as E}from"./E4NVOXNZ.js";import{a as k}from"./O2DY73RF.js";import"./RT25KW2T.js";import{f}from"./QJJFF4PI.js";import{a as n}from"./2ZQLPGO6.js";import{J as g,K as l,L as w,R as v,h as C,j as i,k as u,n as m,t as r}from"./DLOQSM4T.js";function y(a,e,t){window.localStorage.setItem(a,JSON.stringify(e))}function S(a,e){let t=window.localStorage.getItem(a);return t&&e?JSON.parse(t):t}var R=C`:host,arcgis-picker-input{display:block}.color-picker-container{display:flex;flex-direction:column}.color-picker{--calcite-color-border-1: transparent;overflow-x:hidden}.preview-swatch{width:100%;height:24px}.recent-colors-container{align-items:center;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-input);display:flex;gap:var(--calcite-space-sm);height:32px;padding:0 var(--calcite-space-xs);transition:outline-offset .1s ease-in-out,outline-color .1s ease-in-out}.preview-recent-swatch{cursor:pointer}.recent-colors-container:focus,.preview-recent-swatch:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-brand);outline-offset:var(--calcite-border-width-md)}.empty-swatch{cursor:default}.end-action{display:flex}`,h=class extends w{constructor(){super(),this._messages=k(),this.actionEl=g(),this.open=!1,this.setRecentColorElement=e=>t=>{switch(e){case 1:this.recentColor1El=t;break;case 2:this.recentColor2El=t;break;default:this.recentColor3El=t}},this.recentColors=[],this.clearable=!1,this.compact=!1,this.disabled=!1,this.placement="auto",this.storageId="arcgis-color-input-storage-colors",this.hideRecentColors=!1,this.showTransparency=!1,this.arcgisChange=r(),this.arcgisColorInputChange=r(),this.arcgisColorInputPopoverClose=r(),this.arcgisColorInputPopoverOpen=r(),this.arcgisColorInputSwatchUpdate=r(),this.arcgisInternalStoredColor=r(),this.arcgisPickerClose=r(),this.arcgisPickerOpen=r(),this.arcgisSwatchUpdate=r(),this.listenOn(document,"arcgisInternalStoredColor",this.handleUpdateRecentColors),this.listenOn(document,"arcgisRecentColorsUpdate",this.handleStoreNewRecentColor)}static{this.properties={recentColors:16,clearable:5,color:1,compact:5,disabled:5,messageOverrides:0,placement:1,popoverProps:0,storageId:1,hideRecentColors:5,showTransparency:5}}static{this.styles=R}async close(){await this.inlineInputEl?.close({focus:!1})}async setFocus(){await this.inlineInputEl?.setFocus()}isOpen(){return this.open}load(){this.setRecentColorsFromStorage()}disconnectedCallback(){super.disconnectedCallback(),this.removeTooltip()}async handleOpen(){await this.colorPickerEl?.setFocus(),this.open=!0,this.arcgisPickerOpen.emit(),this.arcgisColorInputPopoverOpen.emit()}setInlineInputRef(e){this.inlineInputEl=e}setColorPickerRef(e){e&&(this.colorPickerEl=e)}getRecentColorElement(e){switch(e){case 1:return this.recentColor1El;case 2:return this.recentColor2El;default:return this.recentColor3El}}setRecentColorsFromStorage(){let e=S(this.storageId,!0);e&&(this.recentColors=[...e])}handleSwatchClickOrKeyUp(e){if("key"in e&&e.key!=="Enter"&&e.key!=="Space")return;let t=e.currentTarget.color||void 0;this.updateColor(t),this.arcgisSwatchUpdate.emit(t),this.arcgisColorInputSwatchUpdate.emit(t),setTimeout(()=>this.recentColor1El?.focus(),200)}handleRecentColorsKeyDown(e){if(this.recentColors.length===1)return;let t=e.key,o;this.activeColorSwatchEl===this.recentColor1El?o=1:this.activeColorSwatchEl===this.recentColor2El?o=2:this.activeColorSwatchEl===this.recentColor3El&&(o=3),t==="ArrowLeft"&&(!o||o===1?this.getRecentColorElement(this.recentColors.length)?.focus():this.getRecentColorElement(o-1)?.focus()),t==="ArrowRight"&&(!o||o===this.recentColors.length?this.recentColor1El?.focus():this.getRecentColorElement(o+1)?.focus())}handleUpdateActiveSwatch(e){this.activeColorSwatchEl=e.currentTarget}handleStoreNewRecentColor(e){this.storeRecentColorToStorage(e.detail)}handleUpdateRecentColors(e){e.composedPath().includes(this.el)||this.setRecentColorsFromStorage()}handleClearColor(){this.updateColor(void 0)}updateColor(e,t=!0){e!==this.color&&(this.color=e,this.arcgisChange.emit(),this.arcgisColorInputChange.emit(),t&&this.storeRecentColorToStorage(e))}storeRecentColorToStorage(e){if(!e)return;e.length>7&&(e=e.slice(0,7));let t=[e,...this.recentColors.filter(o=>o!==e)].slice(0,3);y(this.storageId,t),this.recentColors=t,this.arcgisInternalStoredColor.emit()}handleClose(e){e.stopPropagation(),this.storeRecentColorToStorage(this.colorPickerEl?.value),this.open=!1,this.arcgisPickerClose.emit(this.colorPickerEl?.value),this.arcgisColorInputPopoverClose.emit(this.colorPickerEl?.value)}addTooltip(e){this.removeTooltip(),this.tooltipContainerEl=document.createElement("div"),m(i`<calcite-tooltip .placement=${e.placement??"auto"} .referenceElement=${e.referenceElement} overlay-positioning=fixed open>${e.innerHTML}</calcite-tooltip>`,this.tooltipContainerEl),document.body.append(this.tooltipContainerEl)}removeTooltip(){this.tooltipContainerEl?.parentNode&&(this.tooltipContainerEl.remove(),this.tooltipContainerEl=void 0)}render(){let{compact:e,disabled:t,recentColors:o,_messages:s}=this,p=[o[0],o[1]],$=f(this.el)==="rtl";return e||p.push(o[2]),i`<arcgis-picker-input .disabled=${t} .intlDone=${s.commitColor} .heading=${s.selectColor} .label=${s.selectColor} @arcgisPopoverOpen=${this.handleOpen} @arcgisPopoverClose=${this.handleClose} .popoverProps=${this.popoverProps} ${l(this.setInlineInputRef)}><div class="color-picker-container" slot=content>${n(`color-picker${e?"--compact":""}`,i`<calcite-color-picker .clearable=${this.clearable} class="color-picker" @calciteColorPickerInput=${E(c=>{c.stopPropagation(),this.updateColor(this.colorPickerEl.value,!1)},500)} .scale=${e?"s":"m"} .storageId=${this.storageId} .alphaChannel=${this.showTransparency} .value=${this.color} ${l(this.setColorPickerRef)}></calcite-color-picker>`)}</div><div slot=preview><calcite-color-picker-swatch class="preview-swatch" .color=${this.color} scale=s></calcite-color-picker-swatch></div>${!this.hideRecentColors&&i`<div slot=content-end class="recent-colors-container" @keydown=${this.handleRecentColorsKeyDown} tabindex=-1>${p.map((c,d)=>c?n(c,i`<calcite-color-picker-swatch class="preview-recent-swatch" role=button scale=s tabindex=0 .active=${c===this.color} .color=${c} @click=${this.handleSwatchClickOrKeyUp} @keyup=${this.handleSwatchClickOrKeyUp} @focus=${this.handleUpdateActiveSwatch} ${l(this.setRecentColorElement(d+1))}></calcite-color-picker-swatch>`):this.renderEmptySwatch(`empty-swatch-${d}`))}</div>`||""}${this.clearable&&i`<div slot=content-end class="end-action"><calcite-action icon=circle-disallowed scale=s .label=${s.clearColor} .text=${s.clearColor??""} @click=${this.handleClearColor} @mouseover=${()=>this.addTooltip({referenceElement:this.actionEl.value,placement:$?"right-start":"left-start",innerHTML:s.noColor??""})} @mouseout=${()=>this.removeTooltip()} ${l(this.actionEl)}></calcite-action></div>`||""}</arcgis-picker-input>`}renderEmptySwatch(e){return n(e,i`<svg class="empty-swatch" viewBox="0 0 20 20" xmlns=http://www.w3.org/2000/svg width=20>${u`<rect width=20 height=20 fill=#f8f8f8 stroke=#000 stroke-dasharray=2 />`}</svg>`)}};v("arcgis-color-input",h);export{h as ArcgisColorInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{d as h,g as f}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{d as h,g as f}from"./QJJFF4PI.js";import{a as O,b as w,c as $,d as g,e as v,f as A,g as N,o as b,r as E,s as _,u as y}from"./DLOQSM4T.js";var j=t=>(...s)=>{let e=v(),o=new t(...s),r=o.exports;g(e.at(-1));let n=o.component.manager;n.W(o,r),o.watchExports(n.W.bind(n,o)),A(o);let a=[o.component,...e].reverse();return E(a,i=>i===void 0?void 0:U(o,i,r),r)},U=(t,{host:s,key:e,isReactive:o},r)=>{let n=s,a=n[e]!==t.exports,i=n[e]!==r,c=r!==t.exports;if(a&&!i&&c&&(n[e]=t.exports),s===t.component){if(o){let l=t.component.manager;i&&l.W(t,n[e]),t.onUpdate(u=>{if(u.has(e)){let P=n[e];P!==t.exports&&l.W(t,P)}})}t.O=o?void 0:e}let d=t.component.constructor.elementProperties.get(e)?.readOnly;t.watchExports(()=>{n[e]!==t.exports&&(d?N(()=>{n[e]=t.exports}):n[e]=t.exports)})};var x=t=>{let s=f(t,"lang",globalThis.navigator?.language||m);return{lang:s,t9nLocale:z(s)}},V=(t,s,e,o)=>{let r,n=()=>F(t,s(),o).then(a=>{(r?.lang!==a.lang||r.t9nLocale!==a.t9nLocale||r.t9nStrings!==a.t9nStrings)&&e(a),r=a}).catch(a=>{b("error","intl","Error updating component locale state",{detail:{error:a}})});return queueMicrotask(n),h(t,["lang"],n)},F=async(t,s,e=t.localName.split("-").slice(1).join("-"))=>{let{lang:o,t9nLocale:r}=x(t),n=`${s}/${e}/t9n`,i=e===null?{}:await R(r,n,"messages.");return{lang:o,t9nLocale:r,t9nStrings:i}};var W="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),K=new Set(W),m="en",q={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},R=async(t,s,e="")=>{let o=`${s}/${e}`,r=`${o}${t}.json`;return D[r]??=k(t,o),await D[r]},D={},k=async(t,s)=>{let e=`${s}${t}.json`;try{let o=await fetch(e);if(o.ok)return await o.json()}catch(o){return b("error","intl",`An unknown error occurred while fetching localization strings at ${e}`,{detail:{error:o}}),{}}return t===m?{}:await k(m,s)},z=t=>{let[s,e]=t.split("-"),o=s.toLowerCase(),r=o;return e&&(r=`${o}-${e.toUpperCase()}`),r=q[r]??r,K.has(r)?r:e?z(o):m};var S=t=>B(void 0,t);var C=class extends y{constructor(s,e){super(s);let o=this.exports;try{w(this.component);let r=e(this.component,this),n=this.exports!==o;if(O(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},B=j(C),ct=(t,s)=>new L(t,s),L=class extends y{#t;#e;#o;constructor(s,e){super(),!!1&&(this.#e=s,this.#o=e,this.#t=new MutationObserver(o=>{o.forEach(r=>{s.includes(r.attributeName)&&e.call(this.component,this.component.el.getAttribute(r.attributeName),r.oldValue,r.attributeName)})}))}hostConnected(){this.#e.forEach(s=>{this.component.el.hasAttribute(s)&&this.#o.call(this.component,this.component.el.getAttribute(s),null,s)}),this.#t.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#e})}hostDisconnected(){this.#t.disconnect()}};var M="ltr",lt=()=>S((t,s)=>{s.exports=M,s.onLifecycle(()=>{let e=()=>{let o=f(t.el,"dir",M);s.exports=o==="rtl"?"rtl":"ltr"};return e(),h(t.el,["dir"],e)})}),pt=t=>(s={})=>S((e,o)=>{let r=x(e.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=e;o.onLifecycle(()=>V(e.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:d})=>{let l={...p,_lang:d,_t9nLocale:c,_loading:!1};o.exports=l;let u=p.componentLabel;typeof u=="string"&&"label"in e&&e.label==null&&(e.label??=u),i(a.messageOverrides)},s.name));let i=c=>{let p=o.exports,d=p._original??p,l=T(d,c);c&&(l._original=d),o.exports=l};return"messageOverrides"in a&&o.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(o.setProvisionalExports(n,!1),o.ready):n}),T=(t,s)=>{if(!s)return t;let e={...t};return Object.entries(s).forEach(([o,r])=>{t[o]!==void 0&&(typeof r=="object"?e[o]=T(t[o],r):e[o]=r??t[o])}),e},dt=t=>H,G="arcgisPropertyChange",H=(...t)=>{let s=$(),e=_(G,void 0,s),o=!0;return s.manager.onUpdated(r=>{if(o||!s.el.isConnected){o=!1;return}for(let n of t)r.has(n)&&e.emit({name:n})}),e};export{j as a,ct as b,lt as c,pt as d,dt as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{c as b}from"./3YTGG7RF.js";import{a as m,b as g,c as i,d as f}from"./AHWD5KV4.js";import{L as d,O as h,R as u,j as p}from"./DLOQSM4T.js";var l=class extends d{constructor(){super(...arguments),this.#r=new MutationObserver(()=>this.#e()),this.preferEndSlot=!1,this.priority=m.Default}static{this.properties={_children:16,preferEndSlot:5,priority:9}}#t;#r;measure(r){let t=this._children;if(!t?.length)return[0];let o=i.groupSeparator+i.groupPadding[r.scale],s=t.map(e=>e.measure(r)).reduce((e,a)=>e.flatMap(n=>a.map(c=>n+c)),[0]);return b(s.map(e=>o+e))}proxiedRender(r,t){let o=this._children;if(!o)return;let s=this.preferEndSlot?"actions-end":void 0,e=t-i.groupPadding[r.scale]-i.groupSeparator,a=f(o,r,e);return p`<calcite-action-group .scale=${r.scale} .layout=${r.layout} slot=${s??h}>${a.map(({group:n,budget:c})=>n.proxiedRender(r,c))}</calcite-action-group>`}connectedCallback(){super.connectedCallback(),this.#r.observe(this.el,{childList:!0}),this.#e()}disconnectedCallback(){this.#r.disconnect(),super.disconnectedCallback()}#e(){this.#t?.abort();let r=Array.from(this.el.children).filter(g),t=new AbortController;this.#t=t,Promise.all(r.map(o=>o.componentOnReady())).then(()=>{!this.isConnected||t.signal.aborted||(this._children=r)})}};u("arcgis-toolbar-group",l);export{l as ArcgisToolbarGroup};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as k,b as j,c as R,d as P,e as y,f as z,g as _,h as F,i as B,j as K,k as q,l as E,m as S,n as X,o as Y,p as L,q as V,r as T,s as Z}from"./P3DCEHGK.js";import{a as J,b as p}from"./3KZKOKL3.js";import{a as Q}from"./O2DY73RF.js";import"./RT25KW2T.js";import"./QJJFF4PI.js";import{a as $}from"./2ZQLPGO6.js";import{K as b,L as U,M as I,R as G,h as H,j as u,o as N,p as D,t as x}from"./DLOQSM4T.js";export default $arcgis.t(([se,C,h,W,O,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=W.supportsFieldConfiguration(e),s;"popupTemplate"in e&&(s=e.popupTemplate);let o=s?s.fieldInfos:[];return ie(a)?.filter(d=>d.name===t).forEach(d=>{let n=!r&&o?o.filter(c=>c.fieldName===d.name):void 0,m=r?e.getFieldAlias(t):n?.length?n[0].label:d.alias;/^raster.(item|service)pixelvalue/iu.test(t)&&(d.type="double");let l={layerField:d,label:m||d.name};l.codedValues=fe(t,a),pe(l),l.simpleFieldType&&(i=l)}),i}function ie(a){let{layer:e}=a;return F(e)||T(e)||_(e)&&e.rasterFields.length?e.rasterFields:e.fields}async function te(a){a.statisticsStatus="in-progress";let{layer:e,view:t}=a;if(F(e)||T(e)||S(e)||V(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(F(e)||T(e)||V(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 o="sourceJSON"in e&&e.sourceJSON.maxRecordCount===s.count;if(p(s.nullcount)&&!o)return{...s,totalCount:s.count+s.nullcount};{let d=await te(a);return{...s,totalCount:d}}}catch{throw new Error("could not get statistics")}}async function me(a){let{layer:e,view:t,fieldName:i}=a;if(F(e)||T(e)||V(e))throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");P(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(L(t)&&t.subtypeField===a){let n=t.parent?.subtypes?.find(m=>m.code===t.subtypeCode);if(n)return[new ee({code:n.code,name:n.name})]}if(!y(t)&&!_(t))return;let i=y(t)?t.typeIdField:void 0,r=y(t)?t.types:void 0,s,o=ie(e)?.find(n=>n.name===a),d=o?.domain;return y(t)&&i&&r?(i===a?s=r.map(n=>new ee({code:n.id,name:n.name})):(s=[],r.forEach(n=>{if(!n.domains[a]||n.domains[a].type==="inherited"){let m=d;m?.codedValues&&m.codedValues.forEach(l=>{let c=!1;s.forEach(g=>{g.code===l.code&&(c=!0,`, ${g.name},`.includes(`, ${l.name},`)||(g.name+=`, ${l.name}`))}),c||s.push(O.clone(l))})}else n.domains[a].codedValues&&n.domains[a].codedValues.forEach(m=>{let l=!1;s.forEach(c=>{c.code===m.code&&(l=!0,`, ${c.name},`.includes(`, ${m.name},`)||(c.name+=`, ${m.name}`))}),l||s.push(O.clone(m))})})),!s.length&&d?.codedValues&&(s=O.clone(d.codedValues))):d?.codedValues&&(s=o?.domain?.codedValues),s?.length?s:void 0}async function he(a){let{view:e,layer:t}=a;if(_(t)||F(t)||T(t))throw new Error("could not get feature");if(y(t)&&!t.url||Z(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(L(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||(S(t)||q(t))&&i.availableFields.length>0)){let s=i.createQuery();s.start=0,s.num=5,s.outFields=["*"];let o=await i.queryFeatures(s);return o.features?.length?o:await A(a)}else return await A(a)}}async function A(a){let{layer:e}=a;if(_(e)||F(e)||S(e)||q(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(P(a))return await ve(a);if(y(a)||j(a)||E(a)||Z(a)||z(a))return await a.queryFeatureCount();if(e&&(S(a)||q(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}`,M=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)||N("error",this,D("layer")),p(t)||N("error",this,D("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=x(),this.arcgisFieldInfoComplete=x()}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()}willUpdate(e){this.initialized&&(e.has("fieldName")||e.has("layer"))&&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 o=t;e&&await C.whenOnce(()=>!e.updating),s=await o.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){N("error",this,`Field ${i} does not exist in layer.`);return}E(t)&&se.request.interceptors?.push({urls:`${oe(t)}/${t.layerId}`,before(o){o.requestOptions.authMode="no-prompt"}}),this.processPropsPart2()}async processPropsPart2(){let{layer:e,hideStatistics:t}=this;if(await this.requestOneFeature(),S(e)||k(e)||R(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(){this.uniqueValuesStatus="in-progress";try{let e=await me(this.props);this.uniqueValues=e,e?.uniqueValueInfos?.length?this.uniqueValuesStatus="success":this.uniqueValuesStatus="failed"}catch{this.uniqueValuesStatus="failed"}}async requestStatistics(){try{let e=await ce(this.props);if(!p(e.totalCount)&&p(e.count)&&this.uniqueValuesStatus==="success"){let t=this.uniqueValues?.uniqueValueInfos??[];for(let i=0;i<t.length;i++){let r=t[i];if(r.value===null){e.totalCount=r.count+e.count;break}}e.totalCount??=e.count}this.statistics=e,this.statisticsStatus="success"}catch{this.statisticsStatus="failed"}}setUpTimeZoneHandle(){this.timeZoneHandle?.remove();let{props:e}=this,{view:t,fieldInfo:i}=e;["date","timestamp-offset"].includes(this._getStatisticsType(i))&&(this.timeZoneHandle=C.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"?h.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):h.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"?h.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):h.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"}):this._getDateString(e,t)}_getDateOnlyString(e,t){return h.formatDateOnly(e,this.getIntlDateTimeFormattingOptions("short-date",t))}_getTimeOnlyString(e,t){return typeof e=="string"?h.formatTimeOnly(e,this.getIntlDateTimeFormattingOptions("short-date-long-time",t)):h.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 h.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)}:h.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 h.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:h.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 h.convertDateFormatToIntlOptions(s?.format?.dateFormat??e)}originalLayerSupportsFieldConfigs(){let{layer:e}=this;return W.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:()=>u`<calcite-scrim loading></calcite-scrim>`,complete:()=>{let{props:e}=this,{fieldInfo:t}=e;return t?u`<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 u`<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?"":u`<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(!y(i))return"";let{fieldInfo:r}=t,s=r.layerField.description;return u`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${I({missing:!s})}>${s||e.fieldDescriptionNotSet}</div></div>`}renderFieldValueType(){let{_messages:e,props:t}=this,{layer:i}=t;if(!y(i))return"";let{fieldInfo:r}=t,s=this._getFieldValueTypeCamelCase(r);return u`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${I(s?"":"missing")}>${s?e.fieldValueTypes[s]:e.fieldValueTypeNotSet}</div></div>`}renderFieldSampleValue(){let{oneFeatureResponse:e,oneFeatureResponseStatus:t,statisticsStatus:i,statistics:r,uniqueValuesStatus:s,uniqueValues:o,_messages:d,props:n}=this,{layer:m,fieldName:l,fieldInfo:c}=n,{statistics:g}=d,f;if(F(m)||V(m)||!S(m)&&["string","oid","guid"].includes(this._getStatisticsType(c))&&s!=="failed")return"";t==="success"?e.features.forEach(v=>{(f===void 0||f===null&&v.attributes[l]!==null)&&(f=v.attributes[l])}):i==="success"?f=r?.min??void 0:s==="success"&&(f=o?.uniqueValueInfos?.[0]?.value??o?.uniqueValueInfos?.[1]?.value??void 0);let w=c.codedValues;return p(f)&&(w?f=w.find(v=>f===v.code)?.name||f:f=this._getDisplayString(f,{useFieldFormatting:!0})),u`<div class="section"><div class="title">${d.fieldSampleValue}</div><div class=${I(t==="failed"&&i==="failed"&&s==="failed"||!p(f)?"missing":"")}>${t==="success"||i==="success"||s==="success"?f?.toString()??g.allNulls:t==="failed"&&i==="failed"&&s==="failed"?d.fieldSampleNotAvailable:d.fieldSampleRetrieving}</div></div>`}renderFieldNumericFormat(){let{_messages:e,props:t,hideNumericFormat:i}=this,{fieldName:r,fieldInfo:s,layer:o}=t;if(i||!["double","long","single"].includes(s.layerField.type))return"";let d=this.originalLayerSupportsFieldConfigs()?o.getFieldConfiguration(r):void 0;if(d?.fieldFormat){let{minimumFractionDigits:m,maximumFractionDigits:l}=d.fieldFormat;return u`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}",m.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}",l.toString())}</div></div>`}let n="popupTemplate"in o?o.popupTemplate:void 0;if(n?.fieldInfos){let m=n.fieldInfos?.filter(l=>l.fieldName===r);if(m?.length){let l=m[0];if(p(l?.format?.places)){let c=l.format.places;return u`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}",c.toString())}</div></div>`}}}return u`<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:o,fieldInfo:d}=s;return i?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):k(o)||R(o)||S(o)||F(o)||V(o)||["long"].includes(d.layerField.type)?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):u`<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 $("field-info-statistics-content",u`<div class="missing">${e.fieldStatisticsRetrieving}</div>`)}renderNoStatistics(){let{_messages:e}=this;return $("field-info-statistics-content",u`<div class="missing" ${b(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,uniqueValuesStatus:t,statisticsStatus:i,_messages:r}=this;if(!e)return this.isFinished(t)&&this.isFinished(i)?this.renderNoStatistics():this.renderWaitingForStatistics();let{statistics:s}=r;return $("field-info-statistics-content",u`<div ${b(this._setCompleteRef)}><div class="statistics-row"><div>${s.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${p(e.sum)?u`<div class="statistics-row"><div>${s.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>`:null}${p(e.min)?u`<div class="statistics-row"><div>${s.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>`:null}${p(e.max)?u`<div class="statistics-row"><div>${s.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>`:null}${p(e.avg)?u`<div class="statistics-row"><div>${s.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>`:null}${p(e.stddev)?u`<div class="statistics-row"><div>${s.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 $("field-info-statistics-content",u`<div ${b(this._setCompleteRef)}><div class="statistics-row"><div>${r.numberOfValues}</div>${t!=="success"?u`<div class="missing">--</div>`:u`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`)}renderDateStatistics(){let{statistics:e,view:t,props:i,uniqueValuesStatus:r,statisticsStatus:s,_messages:o}=this,{fieldInfo:d}=i;if(!e||!p(e.max)||!p(e.min))return this.isFinished(r)&&this.isFinished(s)?this.renderNoStatistics():this.renderWaitingForStatistics();let{statistics:n}=o,m=e.max-e.min,l=Math.floor(m/31536e6),c=Math.floor((m-l*31536e6)/2628e6),g=Math.ceil((m-c*2628e6)/864e5);g>=30&&(c+=1,g=0);let f=l===1?n.timeSpanOptions.year:l>1?n.timeSpanOptions.years.replace("${years}",l.toString()):"";f+=l>0&&(c>0||g>0)?", ":"",f+=c===1?n.timeSpanOptions.month:c>1?n.timeSpanOptions.months.replace("${months}",c.toString()):"",f+=c>0&&g>0?", ":"",f+=g===1?n.timeSpanOptions.day:g>1?n.timeSpanOptions.days.replace("${days}",g.toString()):"";let w=d.simpleFieldType!=="timestamp-offset"||!t||t.timeZone!=="unknown",v=d.simpleFieldType==="time-only";return $("field-info-statistics-content",u`<div ${b(this._setCompleteRef)}><div class="statistics-row"><div>${n.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${w&&p(e.min)?u`<div class="statistics-row"><div>${v?n.minimumTime:n.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>`:null}${w&&p(e.max)?u`<div class="statistics-row"><div>${v?n.maximumTime:n.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>`:null}${w&&p(e.avg)?u`<div class="statistics-row"><div>${v?n.averageTime:n.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>`:null}${w&&!v&&p(e.min)&&p(e.max)&&m>0?u`<div class="statistics-row"><div>${n.timespan}</div><div class="data">${f}</div></div>`:null}${this.renderNullValues()}</div>`)}renderTopValues(){let{uniqueValues:e,uniqueValuesStatus:t,_messages:i,props:r}=this,{fieldInfo:s}=r,{statistics:o}=i;if(e?.uniqueValueInfos?.length){let d=e.uniqueValueInfos;d.sort((l,c)=>l.count<c.count?1:l.count>c.count?-1:0);let n=s.codedValues,m=d.filter(l=>l.value!==null).filter((l,c)=>l&&c<10).map(l=>{let c=l.value;return n?n.forEach(g=>{c===g.code&&(c=g.name)}):c=this._getDisplayString(c),u`<div class="statistics-row"><div class="data">${`${c}`}</div><div class="count">${this._printNumValue(l.count)}</div></div>`});return m.length?u`<div><div class="statistics-row-top-values"><div>${d.length>10?o.topTenValues:o.topValues}</div><div>${o.count}</div></div>${m}</div>`:""}else return u`<div><div class="statistics-row-top-values"><div>${o.topValues}</div><div>${o.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 o=t.uniqueValueInfos;for(let d=0;d<o.length;d++){let n=o[d];if(n.value===null){s=n.count;break}}}return u`<div class="statistics-row"><div>${r.numberOfNulls}</div>${p(s)?u`<div class="data">${this._printNumValue(s)}</div>`:u`<div class="missing">--</div>`}</div>`}};G("arcgis-field-info",M);return M},"config","core/reactiveUtils","intl","applications/PortalApp/layerUtils","core/lang","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","layers/support/CodedValue","rest/support/Query")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as x}from"./B2QFPLR5.js";import{a as y}from"./GPRF6QZC.js";import{a as b,b as _,c as A}from"./3YTGG7RF.js";import{a as m}from"./AHWD5KV4.js";import"./RT25KW2T.js";import"./QJJFF4PI.js";import{K as f,L as $,M as g,O as u,R as C,j as d}from"./DLOQSM4T.js";var v=class extends ${constructor(){super(...arguments),this._elementReferenceController=new y(this),this._childrenObserver=new MutationObserver(()=>{this._syncChildren()}),this.priority=m.Medium,this.menuAppearance="action-menu",this.overflowActionLabel="More actions"}static{this.properties={_children:16,priority:9,menuAppearance:1,overflowActionLabel:1}}measure(e){let o=this._children?.length??0;if(!o)return[0];let i=b(e),l=o*i;if(!(this.priority<m.NeverCollapse&&o>2))return[l];let r=Math.min(o,2)*i,c=[r];if(o<=2||this.priority<=m.ForceCollapse)return c;for(let t=1;t<o-1;t++)c.push(r+i*t);return A(c)}proxiedRender(e,o){let i=this._children;if(!i)return;let{visible:l,hidden:r}=this._resolveActionsFromBudget(i,e,o),c="hamburger",t=this.overflowActionLabel,n=e.tooltipAppearance,s=n!=="native",a=this._elementReferenceController.element,w=n==="calcite-dark"?"calcite-mode-dark":void 0,h=_(e),R=this.menuAppearance==="action-menu"?d`<calcite-action-menu .label=${t} overlay-positioning=fixed .placement=${h}><calcite-action .icon=${c} .scale=${e.scale} slot=trigger .text=${t} title=${(n==="native"?t:"")??u} ${f(this._elementReferenceController.ref)}></calcite-action>${r.map(p=>p.proxiedRender(e,"expanded-action"))}</calcite-action-menu>`:d`<calcite-action .icon=${c} .scale=${e.scale} .text=${t} title=${(n==="native"?t:"")??u} ${f(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown overlay-positioning=fixed .placement=${h} .referenceElement=${a}><calcite-dropdown-group selection-mode=none>${r.map(p=>p.proxiedRender(e,"dropdown-item"))}</calcite-dropdown-group></calcite-dropdown>`;return d`${l.map(p=>p.proxiedRender(e,"collapsed-action"))}${r.length?R:void 0}${r.length&&s?d`<calcite-tooltip class=${g(w)} close-on-click overlay-positioning=fixed .placement=${h} .referenceElement=${a}><span>${t}</span></calcite-tooltip>`:void 0}`}connectedCallback(){super.connectedCallback(),this._childrenObserver.observe(this.el,{childList:!0}),this._syncChildren()}disconnectedCallback(){this._childrenObserver.disconnect(),super.disconnectedCallback()}_syncChildren(){this._componentWaitAbortController?.abort();let e=Array.from(this.el.querySelectorAll("arcgis-toolbar-item")),o=new AbortController;this._componentWaitAbortController=o,Promise.all(e.map(i=>i.componentOnReady())).then(()=>{!this.isConnected||o.signal.aborted||(this._children=e)})}_resolveActionsFromBudget(e,o,i){let l=e.find(s=>s.active)??e?.toSorted(x)?.at(0),r=Math.floor(i/b(o));if(r>=e.length)return{visible:[...e],hidden:[]};let c=r-1,t=e.slice(0,c),n=e.slice(c);if(l&&n.includes(l)){let[s]=n.splice(n.indexOf(l),1),a=t.pop();t.push(s),a&&n.unshift(a)}return{visible:t,hidden:n}}};C("arcgis-toolbar-more-button",v);export{v as ArcgisToolbarMoreButton};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as m}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as m}from"./LE43VGSR.js";import"./NMDESY3T.js";import{a as x}from"./O2DY73RF.js";import"./RT25KW2T.js";import"./QJJFF4PI.js";import{J as p,K as v,L as $,N as f,R as y,h as d,j as b,t as g}from"./DLOQSM4T.js";export default $arcgis.t(([{sqlName:E,sqlLiteral:L}])=>{var C=d`:host{display:block;height:100%;width:100%}arcgis-histogram{align-self:flex-end;height:var(--arcgis-slider-histogram-range-histogram-height, 100%);width:100%}`,c=class extends ${constructor(){super(...arguments),this.#a=p(),this.#e=(a,i,r)=>{let h=e=>m(this.fieldType).format(this.#t._lang,e,"value",r)??r(e);return this.labelFormatter?.(a,i,h)??h(a)},this.#t=x(),this.fieldType="double",this.fillPlacement="start",this.layout="horizontal",this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.showRangeLabels=!1,this.standardDeviationCount=1,this.valueLabelsDisplay="always",this.valueLabelsEditingEnabled=!1,this.arcgisActiveValueChange=g({cancelable:!1}),this.arcgisChange=g({cancelable:!1}),this.arcgisInput=g({cancelable:!1}),this.arcgisRangeChange=g({cancelable:!1})}static{this.properties={activeValue:32,average:9,bins:0,dataLines:0,excludedBarColor:0,fieldType:1,fillPlacement:1,includedBarColor:0,label:1,labelFormatter:0,layout:1,max:1,min:1,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:1,showRangeLabels:5,standardDeviation:9,standardDeviationCount:9,valueLabelsDisplay:1,valueLabelsEditingEnabled:5,values:1}}static{this.styles=C}#a;#e;#t;get activeValue(){return this.#a.value?.activeValue}async destroy(){await this.manager.destroy()}async generateWhereClause(a){let{fillPlacement:i,values:r}=this;if(!r?.length)return;let h=m(this.fieldType),e=r.split(",").map(u=>u.trim()).filter(u=>u.length>0),o=E(a),l=u=>{let s=h.parse(u);return typeof s=="number"?L(h.toFieldType(s),{type:this.fieldType}):void 0},t=e[0]?l(e[0]):void 0,n=e.length>1&&e.at(-1)?l(e.at(-1)):void 0;if(!(t==null||e.length>1&&n==null))switch(i){case"start":return e.length>1?`${o} BETWEEN ${t} AND ${n}`:`${o} <= ${t}`;case"end":return e.length>1?`${o} BETWEEN ${t} AND ${n}`:`${o} >= ${t}`;case"between":return e.length>1?`${o} BETWEEN ${t} AND ${n}`:`${o} <= ${t}`;case"not-between":return e.length>1?`${o} NOT BETWEEN ${t} AND ${n}`:`${o} <= ${t}`;case"none":return"1=0";default:return}}async updateFromHistogramResult(a,i){let r=m(this.fieldType);this.bins=a.bins,a.minValue!=null&&(this.min=r.serialize(a.minValue)),a.maxValue!=null&&(this.max=r.serialize(a.maxValue)),i&&(this.average=i.avg??void 0,this.standardDeviation=i.stddev??void 0)}willUpdate(a){(a.has("fieldType")||a.has("max")||a.has("min")||a.has("values"))&&this.#s()}#i(){let{bins:a,values:i,fillPlacement:r}=this,h=a?.[0],e=a?.at(-1);if(h==null||e==null||!i)return;let o=m(this.fieldType),l=i.split(",").map(u=>o.parse(u)).filter(u=>Number.isFinite(u)).sort((u,s)=>u-s),t=l.at(0),n=l.at(-1);if(!(t==null||n==null))switch(r){case"start":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:h.minValue,maxValue:t}];case"end":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:n,maxValue:e.maxValue}];case"between":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:h.minValue,maxValue:t}];case"not-between":return l.length>1?[{minValue:h.minValue,maxValue:t},{minValue:t,maxValue:n,color:"var(--arcgis-histogram-bar-color)"},{minValue:n,maxValue:e.maxValue}]:[{minValue:h.minValue,maxValue:t}];default:return}}#s(){let a=m(this.fieldType),i=(this.values??"").split(",").map(s=>s.trim()).filter(s=>s.length>0).map(s=>a.parse(s)).filter(s=>Number.isFinite(s)),r=a.parse(this.min??""),h=a.parse(this.max??""),e=Number.isFinite(r)?r:void 0,o=Number.isFinite(h)?h:void 0;e!=null&&o!=null&&e>=o&&(e=void 0,o=void 0);let l=a.resolveRange(i,e,o);l.min>=l.max&&(l=a.resolveRange(i,void 0,void 0));let t=a.serialize(l.min),n=a.serialize(l.max),u=i.map(s=>Math.min(l.max,Math.max(l.min,s))).sort((s,V)=>s-V).map(s=>a.serialize(s)).join(",");t!==this.min&&(this.min=t),n!==this.max&&(this.max=n),u!==this.values&&(this.values=u)}#l(a){a.stopPropagation(),this.values=a.currentTarget.values,this.arcgisInput.emit()}#n(a){a.stopPropagation();let i=a.currentTarget;this.min=i.min,this.max=i.max,this.values=i.values,this.arcgisRangeChange.emit()}#r(a){a.stopPropagation(),this.values=a.currentTarget.values,this.arcgisChange.emit()}#o(a){a.stopPropagation(),this.arcgisActiveValueChange.emit()}render(){let a=m(this.fieldType),i=a.parse(this.min??""),r=a.parse(this.max??"");return b`<arcgis-slider-field .fieldType=${this.fieldType} .fillPlacement=${this.fillPlacement} .label=${this.label} .labelFormatter=${this.labelFormatter} .max=${this.max??""} .min=${this.min??""} .layout=${this.layout} @arcgisActiveValueChange=${this.#o} @arcgisChange=${this.#r} @arcgisInput=${this.#l} @arcgisRangeChange=${this.#n} .rangeLabelsEditingEnabled=${this.rangeLabelsEditingEnabled} .valueLabelsEditingEnabled=${this.valueLabelsEditingEnabled} .rangeLabelsPlacement=${this.rangeLabelsPlacement} .valueLabelsDisplay=${this.valueLabelsDisplay} .showRangeLabels=${this.showRangeLabels} .values=${this.values??""} .valueLabelsPlacement=${this.layout==="horizontal"?"end":"start"} ${v(this.#a)}><arcgis-histogram .slot=${this.layout==="horizontal"?"content-start":"content-end"} .average=${this.average} .bins=${this.bins} .dataLines=${this.dataLines} .max=${r} .min=${i} .label=${this.label} .layout=${this.layout} .standardDeviation=${this.standardDeviation} .standardDeviationCount=${this.standardDeviationCount} color-blending-enabled .colorStops=${this.#i()} style=${f({...this.includedBarColor&&{"--arcgis-histogram-stop-color":this.includedBarColor.toCss()},...this.excludedBarColor&&{"--arcgis-histogram-bar-color":this.excludedBarColor.toCss()}})} .labelFormatter=${this.#e}></arcgis-histogram></arcgis-slider-field>`}};y("arcgis-slider-histogram-range",c);return c},"core/sql")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as g}from"./GPRF6QZC.js";import{b as v}from"./3YTGG7RF.js";import{c as s}from"./AHWD5KV4.js";import"./RT25KW2T.js";import"./QJJFF4PI.js";import{K as h,L as m,M as p,O as l,R as $,j as i,t as d}from"./DLOQSM4T.js";var n=class extends m{constructor(){super(...arguments),this._active=!1,this._elementReferenceController=new g(this),this.icon="question-mark",this.tooltipText="",this.labelText="",this.disabled=!1,this.loading=!1,this.iconFlipRtl=!1,this.arcgisItemSelected=d()}static{this.properties={icon:3,lastActivated:0,active:7,tooltipText:1,labelText:3,disabled:7,loading:7,iconFlipRtl:7,actionElement:32}}get active(){return this._active}set active(e){e!==this._active&&(this._active=e,e&&(this.lastActivated=new Date))}get actionElement(){return this._elementReferenceController.element}measure({scale:e}){return[s.action[e]+s.actionPadding[e]]}proxiedRender(e,a,b){let c=e.tooltipAppearance,r=this._elementReferenceController.element,f=c!=="native"&&a==="collapsed-action",x=c==="calcite-dark"?"calcite-mode-dark":void 0,u=v(e),t=this.tooltipText||this.labelText;return a==="dropdown-item"?i`<calcite-dropdown-item .disabled=${this.disabled} icon-start=${this.icon??l} .iconFlipRtl=${this.iconFlipRtl?"both":void 0} .label=${t} @click=${o=>this._handleDropdownItemClick(o)} .selected=${this.active||b} title=${t??l}>${this.labelText}</calcite-dropdown-item>`:i`<calcite-action .active=${this.active} .disabled=${this.disabled} .icon=${this.icon} .iconFlipRtl=${this.iconFlipRtl} .label=${t} .loading=${this.loading} @click=${o=>this._handleActionClick(o)} .scale=${e.scale} .text=${this.labelText} .textEnabled=${a==="expanded-action"} title=${(c==="native"?t:void 0)??l} ${h(this._elementReferenceController.ref)}></calcite-action>${f&&r?i`<calcite-tooltip class=${p(x)} close-on-click overlay-positioning=fixed .placement=${u} .referenceElement=${r}><span>${t}</span></calcite-tooltip>`:void 0}`}_handleActionClick(e){this.isConnected&&(this.lastActivated=new Date,this.arcgisItemSelected?.emit({element:e.currentTarget}))}_handleDropdownItemClick(e){this.isConnected&&(this.lastActivated=new Date,this.arcgisItemSelected?.emit({element:e.currentTarget}))}};$("arcgis-toolbar-item",n);export{n as ArcgisToolbarItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{L as x,M as C,O as d,R as v,h as f,j as z,k as m}from"./DLOQSM4T.js";export default $arcgis.t(([w])=>{var M=f`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}.hidden{display:none!important}svg{stroke-width:var(--calcite-border-width-sm);stroke:var(--calcite-color-border-input);margin:0;display:block;block-size:100%;inline-size:100%;padding:0}svg .background{fill:#e0e0e0}`,u=class{constructor(i,s,e,a){this.color=i,this.ratio=s,this.opacity=e,this.sizeRatio=a}},D=new w([0,0,0,.5]),I=class extends x{constructor(){super(...arguments),this._minSizeRatio=.2,this._rampStops=[],this._containerDimensions=[0,0],this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={_containerDimensions:16,layout:3,min:9,max:9,stops:0}}static{this.styles=M}willUpdate(i){if(super.willUpdate(i),i.has("min")||i.has("max")||i.has("stops")){let{stops:s,min:e,max:a}=this,r=a-e,o=s.map(n=>n.size??0),c=Math.min(...o),l=Math.max(...o)-c,t=s.map(n=>{let{color:h,value:g,size:$}=n,y=h instanceof w?h:w.fromString(h)??D,b=(g-e)/r;return new u(y.toCss(),b,y.a,$?($-c)/l:void 0)});if(t[0].ratio!==0){let{color:n,opacity:h,sizeRatio:g}=t[0];t.unshift(new u(n,0,h,g))}if(t[t.length-1].ratio!==0){let{color:n,opacity:h,sizeRatio:g}=t[t.length-1];t.push(new u(n,1,h,g))}this._rampStops=t}}loaded(){let i=new ResizeObserver(a=>{for(let r of a){let{width:o,height:c}=r.contentRect;this._containerDimensions=[o,c]}}),{width:s,height:e}=this.el.getBoundingClientRect();this._containerDimensions=[s,e],i.observe(this.el)}render(){let i=this._rampStops,[s,e]=this._containerDimensions,a=this.layout==="horizontal",r="rampFillId",o="rampBackgroundFillId",c=R(i),l=[];if(s>0&&e>0)if(c){let t=S(this.layout,s,e,i,this._minSizeRatio);l.push(m`<path fill=${`url(#${o})`} d=${t??d} />`,m`<path fill=${`url(#${r})`} d=${t??d} />`)}else l.push(m`<rect fill=${`url(#${o})`} height=100% width=100% x=0 y=0 />`,m`<rect fill=${`url(#${r})`} height=100% width=100% x=0 y=0 />`);return z`<svg xmlns=http://www.w3.org/2000/svg>${m`<defs><linearGradient id=${r} x1=0 x2=${a?1:0} y1=${a?0:1} y2=0>${i.map(({ratio:t,color:n,opacity:h})=>m`<stop offset=${`${(t*100).toFixed(2)}%`} stop-color=${n??d} stop-opacity=${h??d} />`)}</linearGradient><pattern height=15 id=${o} patternUnits=userSpaceOnUse width=15 x=0 y=0><image height=15 href=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgaGVpZ2h0PSIxNiIgd2lkdGg9IjE2Ij48cGF0aCBkPSJNMCAwIEw4IDAgTDggOCBMMCA4IFoiIGZpbGw9IiNjY2MiIC8+PHBhdGggZD0iTTAgMCBMOCAwIEw4IDggTDAgOCBaIiBmaWxsPSIjZmZmIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDgpIiAvPjxwYXRoIGQ9Ik0wIDAgTDggMCBMOCA4IEwwIDggWiIgZmlsbD0iI2NjYyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCw4KSIgLz48cGF0aCBkPSJNMCAwIEw4IDAgTDggOCBMMCA4IFoiIGZpbGw9IiNmZmYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDgsMCkiIC8+PC9zdmc+ width=15 x=0 y=0 /></pattern></defs><rect class=${C({background:!0})} height=100% width=100% x=0 y=0 />${l}`}</svg>`}};function R(p){return p.every(i=>i.sizeRatio!==void 0)}function S(p,i,s,e,a){let r=o=>(1-a)*o+a;if(p==="horizontal"){let o=e.map(({ratio:c,sizeRatio:l})=>{let t=c*i,n=s-r(l)*s;return`L ${t} ${n}`});return`M 0 ${s} ${o.join(" ")} L ${i} ${s} Z`}else{let o=e.map(({ratio:c,sizeRatio:l})=>{let t=s-c*s;return`L ${r(l)*i} ${t}`});return`M 0 ${s} ${o.join(" ")} L 0 0 Z`}}v("arcgis-ramp-color",I);return I},"Color")
|