@arcgis/common-components 5.0.9 → 5.0.10

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.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as f}from"./2S7JKSJD.js";import{a as k}from"./UJSZ3MKV.js";import{a as B}from"./TJM42K2A.js";import{b as C}from"./EERALQZV.js";import"./27FRM3HV.js";import{A as I,B as O,H as R,g as L,i as w,m as q,n as Z,q as F,z as U}from"./V72RPUBM.js";export default $arcgis.t(([{formatDate:N,convertDateFormatToIntlOptions:v,formatDateOnly:Q,formatTimeOnly:X,formatTimestamp:_,formatNumber:Y},ee,{clone:E}])=>{function M(t){return new Date(`1970-01-01T${t}Z`).getTime()}function A(t){return new Date(`${t} 00:00:00`).getTime()}function te(t,e,s){let i;return e==="unknown"?i=N(t,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):i=N(t,{...v("short-date-short-time"),timeZone:e}),i}function ie(t){return t?Q(t,v("short-date")):""}function se(t){let e;return typeof t=="string"?e=X(t,v("short-date-long-time")):e=N(t,{...v("long-time"),timeZone:"utc"}),e}function ne(t,e){return typeof t=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?_(t,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):_(t,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?N(t,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):N(t,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function W(t,e,s){if(t.type!=="feature"&&t.type!=="subtype-group"&&t.type!=="subtype-sublayer"&&t.type!=="imagery")return;let i;return x(t,s).fields.forEach(l=>{let n=l.name,d="domain"in l?l.domain:void 0;if(t.type!=="imagery"&&t.subtypeField===n){let m;t.type==="subtype-group"||t.type==="feature"?m=t.subtypes:m=t.parent.subtypes,m.forEach(r=>{t.type==="subtype-sublayer"&&t.subtypeCode!==r.code||(e.name===n&&(i=i||[],i.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(a=>{if(e.name===a){let o=r.domains[a];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;i=i||[],i.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||i.push({code:u.code,name:u.name})})}}))})}if(e.name===n&&(t.type==="feature"||t.type==="imagery")){let m=t.type==="feature"?t.typeIdField:void 0,r=t.type==="feature"?t.types:void 0;t.type==="feature"&&m&&r?(m===n?i=r.map(a=>({code:a.id,name:a.name})):(i=i||[],r.forEach(a=>{if(!a.domains?.[n]||a.domains[n].type==="inherited"){let o=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;i.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||i.push(E(u))})}else a.domains?.[n]?.codedValues&&a.domains[n].codedValues.forEach(o=>{let u=!1;i.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||i.push(E(o))})})),!i?.length&&d?.codedValues&&(i=E(d.codedValues))):d?.codedValues&&(i=d.codedValues)}}),i}function D(t,e){let s=e;if(s){let i="";for(let l=0;l<s.length;l++){let n=s[l];n.code==t&&(i+=(i.length?" | ":"")+n.name)}return i.length||(i=`${t}`),i}return t}function P(t){return["small-integer","big-integer","integer","single","double","long"].includes(t.type)}function z(t){switch(t.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 t.type}}function x(t,e){return e==="feature-reduction"&&"featureReduction"in t?t.featureReduction:t}var ae=L`: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}`,S=class extends O{constructor(){super(...arguments),this.dropdownNode=U(),this._messages=C({blocking:!0}),this._propWatcherTask=new k(this,{task:async([e,s,i])=>{let l=f(e)&&f(s)||f(i);if(!f(i)&&!f(e)&&!f(s)?q("error",this,Z("uniqueValues")):f(i)||(f(e)||q("error",this,Z("layer")),f(s)||q("error",this,Z("fieldName"))),f(e)&&f(s)){let{fieldSource:n}=this;if(!x(e,n).fields?.filter(d=>d.name===s))throw q("error",this,"Field could not be found."),new Error}if(!l)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=F(),this.arcgisSortByChange=F(),this.arcgisLoad=F()}static{this.properties={initialRender:16,view:0,layer:0,fieldSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ae}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(f(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:i}=e;return{uniqueValues:s,partialUniqueValues:i}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:s,view:i,fieldSource:l}=this,n=(e?x(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(f(this.uniqueValues))this.fieldInfo={layerField:n,fieldDomains:e&&n?W(e,n,l):void 0,simpleType:e&&n?z(n):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&n){this.fieldInfo={layerField:n,fieldDomains:W(e,n,l),simpleType:z(n),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ee({layer:e,view:i,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=P(n),a=m.uniqueValueInfos.filter(o=>f(o.value)?n.type==="string"&&!r||n.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(P(n)||n.type,o.value!=="<Null>"&&o.value!==""):!1);a.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{a.find(u=>u.value===o.code)||a.push({value:o.code,count:0})}),d.uniqueValueInfos=a,d.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(m){if(q("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(d)){let r=[];d.fieldDomains.forEach(a=>{r.find(o=>o.value===a.code)||r.push({value:a.code,count:void 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)}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==s[i])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:i,multiple:l,initialRender:n,showFilterLength:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:a,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!a?.length)return"";let g=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,H=c?["date","date-only","time-only"].includes(c):!1,j=y=>{y.sort((h,p)=>h.count<=p.count?1:-1)},G=y=>{let h=r?.length;y.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 $=h?D(p.value,r):p.value,b=h?D(V.value,r):V.value;return`${$}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${$}`.localeCompare(`${b}`)}})},J=(y,h)=>{y.sort((p,V)=>{let $=h?.indexOf(p.value)??-1,b=h?.indexOf(V.value)??-1;return $===b||$>-1&&b>-1?0:$>b?-1:1})};G(a),!i||i==="count"?j(a):i==="selected"&&J(a,s);let K=a.map(y=>this.renderUniqueValue(y)),T;return o&&!n&&(T=w`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),w`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${a.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${y=>{let h=y.target.selectedItems.map(p=>p.value);!r&&c==="date-only"?h=h?.map(p=>A(p)):!r&&c==="time-only"?h=h?.map(p=>M(p)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(p=>Number.parseInt(p)):c&&["single","double"].includes(c)&&(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)}} ${I(this.setListRef)}>${a.length>=d&&!n?this.renderSort(g,H):null}${K}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:i,_messages:l}=this;return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${I(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=${i==="count"||!f(i)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${i==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${i==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:i,view:l,fieldInfo:n,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:a}=n,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?D(e.value,m):a==="date"?te(e.value,o):a==="date-only"?ie(e.value):a==="time-only"?se(e.value):a==="timestamp-offset"?ne(e.value,l):typeof e.value=="number"?Y(e.value,d):e.value,c=s?a==="date-only"?s.includes(m?.length?e.value:A(e.value)):a==="time-only"?s.includes(m?.length?e.value:M(e.value)):s.includes(e.value):!1;return B(`list-item_${e.value}`,w`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${f(e.count)&&(r.length>200&&!i||r.length<=200)?w`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};R("arcgis-unique-values-list",S);return S},"intl","smartMapping/statistics/uniqueValues","core/lang")
2
+ import{a as f}from"./2S7JKSJD.js";import{a as k}from"./PXWJ4MH5.js";import{a as B}from"./EEAXLMIO.js";import{b as C}from"./MM72P2XC.js";import"./27FRM3HV.js";import{A as I,B as O,H as R,g as L,i as w,m as q,n as Z,q as F,z as U}from"./GDXLMK6P.js";export default $arcgis.t(([{formatDate:N,convertDateFormatToIntlOptions:v,formatDateOnly:Q,formatTimeOnly:X,formatTimestamp:_,formatNumber:Y},ee,{clone:E}])=>{function M(t){return new Date(`1970-01-01T${t}Z`).getTime()}function A(t){return new Date(`${t} 00:00:00`).getTime()}function te(t,e,s){let i;return e==="unknown"?i=N(t,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):i=N(t,{...v("short-date-short-time"),timeZone:e}),i}function ie(t){return t?Q(t,v("short-date")):""}function se(t){let e;return typeof t=="string"?e=X(t,v("short-date-long-time")):e=N(t,{...v("long-time"),timeZone:"utc"}),e}function ne(t,e){return typeof t=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?_(t,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):_(t,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?N(t,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):N(t,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function W(t,e,s){if(t.type!=="feature"&&t.type!=="subtype-group"&&t.type!=="subtype-sublayer"&&t.type!=="imagery")return;let i;return x(t,s).fields.forEach(l=>{let n=l.name,d="domain"in l?l.domain:void 0;if(t.type!=="imagery"&&t.subtypeField===n){let m;t.type==="subtype-group"||t.type==="feature"?m=t.subtypes:m=t.parent.subtypes,m.forEach(r=>{t.type==="subtype-sublayer"&&t.subtypeCode!==r.code||(e.name===n&&(i=i||[],i.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(a=>{if(e.name===a){let o=r.domains[a];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;i=i||[],i.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||i.push({code:u.code,name:u.name})})}}))})}if(e.name===n&&(t.type==="feature"||t.type==="imagery")){let m=t.type==="feature"?t.typeIdField:void 0,r=t.type==="feature"?t.types:void 0;t.type==="feature"&&m&&r?(m===n?i=r.map(a=>({code:a.id,name:a.name})):(i=i||[],r.forEach(a=>{if(!a.domains?.[n]||a.domains[n].type==="inherited"){let o=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;i.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||i.push(E(u))})}else a.domains?.[n]?.codedValues&&a.domains[n].codedValues.forEach(o=>{let u=!1;i.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||i.push(E(o))})})),!i?.length&&d?.codedValues&&(i=E(d.codedValues))):d?.codedValues&&(i=d.codedValues)}}),i}function D(t,e){let s=e;if(s){let i="";for(let l=0;l<s.length;l++){let n=s[l];n.code==t&&(i+=(i.length?" | ":"")+n.name)}return i.length||(i=`${t}`),i}return t}function P(t){return["small-integer","big-integer","integer","single","double","long"].includes(t.type)}function z(t){switch(t.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 t.type}}function x(t,e){return e==="feature-reduction"&&"featureReduction"in t?t.featureReduction:t}var ae=L`: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}`,S=class extends O{constructor(){super(...arguments),this.dropdownNode=U(),this._messages=C({blocking:!0}),this._propWatcherTask=new k(this,{task:async([e,s,i])=>{let l=f(e)&&f(s)||f(i);if(!f(i)&&!f(e)&&!f(s)?q("error",this,Z("uniqueValues")):f(i)||(f(e)||q("error",this,Z("layer")),f(s)||q("error",this,Z("fieldName"))),f(e)&&f(s)){let{fieldSource:n}=this;if(!x(e,n).fields?.filter(d=>d.name===s))throw q("error",this,"Field could not be found."),new Error}if(!l)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=F(),this.arcgisSortByChange=F(),this.arcgisLoad=F()}static{this.properties={initialRender:16,view:0,layer:0,fieldSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ae}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(f(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:i}=e;return{uniqueValues:s,partialUniqueValues:i}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:s,view:i,fieldSource:l}=this,n=(e?x(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(f(this.uniqueValues))this.fieldInfo={layerField:n,fieldDomains:e&&n?W(e,n,l):void 0,simpleType:e&&n?z(n):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&n){this.fieldInfo={layerField:n,fieldDomains:W(e,n,l),simpleType:z(n),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ee({layer:e,view:i,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=P(n),a=m.uniqueValueInfos.filter(o=>f(o.value)?n.type==="string"&&!r||n.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(P(n)||n.type,o.value!=="<Null>"&&o.value!==""):!1);a.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{a.find(u=>u.value===o.code)||a.push({value:o.code,count:0})}),d.uniqueValueInfos=a,d.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(m){if(q("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(d)){let r=[];d.fieldDomains.forEach(a=>{r.find(o=>o.value===a.code)||r.push({value:a.code,count:void 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)}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==s[i])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:i,multiple:l,initialRender:n,showFilterLength:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:a,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!a?.length)return"";let g=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,H=c?["date","date-only","time-only"].includes(c):!1,j=y=>{y.sort((h,p)=>h.count<=p.count?1:-1)},G=y=>{let h=r?.length;y.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 $=h?D(p.value,r):p.value,b=h?D(V.value,r):V.value;return`${$}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${$}`.localeCompare(`${b}`)}})},J=(y,h)=>{y.sort((p,V)=>{let $=h?.indexOf(p.value)??-1,b=h?.indexOf(V.value)??-1;return $===b||$>-1&&b>-1?0:$>b?-1:1})};G(a),!i||i==="count"?j(a):i==="selected"&&J(a,s);let K=a.map(y=>this.renderUniqueValue(y)),T;return o&&!n&&(T=w`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),w`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${a.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${y=>{let h=y.target.selectedItems.map(p=>p.value);!r&&c==="date-only"?h=h?.map(p=>A(p)):!r&&c==="time-only"?h=h?.map(p=>M(p)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(p=>Number.parseInt(p)):c&&["single","double"].includes(c)&&(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)}} ${I(this.setListRef)}>${a.length>=d&&!n?this.renderSort(g,H):null}${K}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:i,_messages:l}=this;return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${I(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=${i==="count"||!f(i)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${i==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${i==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:i,view:l,fieldInfo:n,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:a}=n,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?D(e.value,m):a==="date"?te(e.value,o):a==="date-only"?ie(e.value):a==="time-only"?se(e.value):a==="timestamp-offset"?ne(e.value,l):typeof e.value=="number"?Y(e.value,d):e.value,c=s?a==="date-only"?s.includes(m?.length?e.value:A(e.value)):a==="time-only"?s.includes(m?.length?e.value:M(e.value)):s.includes(e.value):!1;return B(`list-item_${e.value}`,w`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${f(e.count)&&(r.length>200&&!i||r.length<=200)?w`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};R("arcgis-unique-values-list",S);return S},"intl","smartMapping/statistics/uniqueValues","core/lang")
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{G as i,v as e}from"./V72RPUBM.js";var s=e(i,{"arcgis-ckeditor5":[()=>import("./V7QYLX6D.js"),"canResizeVertically,currentLanguage,customConfig,customExpressionCheck:,editorType,groupFieldsAndExpressions,intlExpressionsGroupHeading,intlFieldsGroupHeading,intlTextPlaceHolder,mentionFields:,readOnly,textData;getData,setFocus"],"arcgis-ckeditor5-popover":[()=>import("./ILVDUAQH.js"),"guid,intlCancel,intlLabel,intlOk,refElement:;reposition"],"arcgis-color-input":[()=>import("./U6XXXAKT.js"),"_messages:,clearable,color,compact,disabled,hideRecentColors,messageOverrides:,placement,popoverProps:,showTransparency,storageId;close,setFocus"],"arcgis-field-info":[()=>import("./NMKTBSWR.js"),"_messages:,fieldName,hideAlias,hideNumericFormat,hideStatistics,layer:,view:;refresh"],"arcgis-field-pick-list":[()=>import("./5Z7WKVP7.js"),"_messages:,customExpressionCheck:,expressionsGroupHeading,fields:,fieldsGroupHeading,filterNoResultsText,filterPlaceholderText,groupFieldsAndExpressions,heading,hideCancel,hideSort,layer:,listOnly,mapView:,multiple,okBtnText,popoverProps:,selectedFields:,showCancel,showDescription,showFieldInfo,showFieldName,showFieldTypeIcon,showFilterLength,showSelectionAll,showSort,sortBy,view:;reposition,setDisabled,setFocus"],"arcgis-histogram":[()=>import("./DCSAZ2F2.js"),"_messages:,average,bins:,colorBlendingEnabled,colorStops:,dataLines:,icon,label,layout,max,messageOverrides:,min,standardDeviation"],"arcgis-label-input":[()=>import("./5NE3NXUE.js"),"alignment,editing,labelFormatter:,readOnly,value;edit;getLabelBoundingClientRect"],"arcgis-picker-input":[()=>import("./MAQZXLIA.js"),"disabled,heading,iconEnd,intlDone,label,popoverProps:;close,setFocus"],"arcgis-ramp-color":[()=>import("./B46YJP33.js"),"layout,max,min,stops:"],"arcgis-ramp-color-break":[()=>import("./BZ3A5MY6.js"),"layout,max,min,stops:"],"arcgis-ramp-opacity":[()=>import("./GQRYSGXY.js"),"fillColor,layout,max,min,stops:"],"arcgis-slider":[()=>import("./HFPAFOK2.js"),"activeValue:,allowValuesOverlap,autoDestroyDisabled,disabled,fillPlacement,fullRangeMax,fullRangeMin,keyboardLargeStep,labelFormatter:,layout,max,messageOverrides:,messages:,min,mirrored,popoverLabel,popoverPlacement,precision,rangeLabelsEditingEnabled,rangeLabelsPlacement,segmentsDraggingDisabled,showRangeLabels,steps,valueLabelsDisplay,valueLabelsEditingEnabled,valueLabelsPlacement,values;destroy"],"arcgis-slider-input":[()=>import("./JUO5VL6R.js"),"disabled,flipLabels,label,max,min,step,unitsLabel,value,withSteppers"],"arcgis-ticks":[()=>import("./ACPHQTWZ.js"),"interactive,interpolationExponent,labelFormatter:,labelPlacement,layout,max,min,mirrored,mode,showBaseline,showLabels,values"],"arcgis-unique-values-list":[()=>import("./IVSKWJ4K.js"),"_messages:,fieldName,fieldSource,layer:,maxHeight,multiple,numberFormatOptions:,partialUniqueValues,selectedValues:,showFilterLength,sortBy,uniqueValues:,view:;getUniqueValues,setFocus"]});s({resourcesUrl:import.meta.url});var a=new CSSStyleSheet;a.replaceSync("@layer{:not([hydrated]):is(arcgis-ckeditor5,arcgis-ckeditor5-popover,arcgis-color-input,arcgis-field-info,arcgis-field-pick-list,arcgis-histogram,arcgis-label-input,arcgis-picker-input,arcgis-ramp-color,arcgis-ramp-color-break,arcgis-ramp-opacity,arcgis-slider,arcgis-slider-input,arcgis-ticks,arcgis-unique-values-list){visibility:hidden}:root{--arcgis-ckeditor5-initial-height: 30vh;--arcgis-ckeditor5-max-width: 35vw;--arcgis-ckeditor5-mentions-max-width: 33vw;--arcgis-common-ckeditor5-initial-height: 30vh;--arcgis-common-ckeditor5-max-width: 35vw;--arcgis-common-ckeditor5-mentions-max-width: 33vw}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,a];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,i)
2
+ import{G as i,v as e}from"./GDXLMK6P.js";var s=e(i,{"arcgis-ckeditor5":[()=>import("./G2GJABBU.js"),"canResizeVertically,currentLanguage,customConfig,customExpressionCheck:,editorType,groupFieldsAndExpressions,intlExpressionsGroupHeading,intlFieldsGroupHeading,intlTextPlaceHolder,mentionFields:,readOnly,textData;getData,setFocus"],"arcgis-ckeditor5-popover":[()=>import("./V7LWVAW3.js"),"guid,intlCancel,intlLabel,intlOk,refElement:;reposition"],"arcgis-color-input":[()=>import("./TIQIAU3O.js"),"_messages:,clearable,color,compact,disabled,hideRecentColors,messageOverrides:,placement,popoverProps:,showTransparency,storageId;close,setFocus"],"arcgis-field-info":[()=>import("./FCSD6O3B.js"),"_messages:,fieldName,hideAlias,hideNumericFormat,hideStatistics,layer:,view:;refresh"],"arcgis-field-pick-list":[()=>import("./327CFICC.js"),"_messages:,customExpressionCheck:,expressionsGroupHeading,fields:,fieldsGroupHeading,filterNoResultsText,filterPlaceholderText,groupFieldsAndExpressions,heading,hideCancel,hideSort,layer:,listOnly,mapView:,multiple,okBtnText,popoverProps:,selectedFields:,showCancel,showDescription,showFieldInfo,showFieldName,showFieldTypeIcon,showFilterLength,showSelectionAll,showSort,sortBy,view:;reposition,setDisabled,setFocus"],"arcgis-histogram":[()=>import("./YEU4IYS5.js"),"_messages:,average,bins:,colorBlendingEnabled,colorStops:,dataLines:,icon,label,layout,max,messageOverrides:,min,standardDeviation"],"arcgis-label-input":[()=>import("./BFMUHDYT.js"),"alignment,editing,labelFormatter:,readOnly,value;edit;getLabelBoundingClientRect"],"arcgis-picker-input":[()=>import("./BMT7CQ4L.js"),"disabled,heading,iconEnd,intlDone,label,popoverProps:;close,setFocus"],"arcgis-ramp-color":[()=>import("./DDRDP5AI.js"),"layout,max,min,stops:"],"arcgis-ramp-color-break":[()=>import("./4IPPTZVD.js"),"layout,max,min,stops:"],"arcgis-ramp-opacity":[()=>import("./TUDWIFTM.js"),"fillColor,layout,max,min,stops:"],"arcgis-slider":[()=>import("./2KEQC2T3.js"),"activeValue:,allowValuesOverlap,autoDestroyDisabled,disabled,fillPlacement,fullRangeMax,fullRangeMin,keyboardLargeStep,labelFormatter:,layout,max,messageOverrides:,messages:,min,mirrored,popoverLabel,popoverPlacement,precision,rangeLabelsEditingEnabled,rangeLabelsPlacement,segmentsDraggingDisabled,showRangeLabels,steps,valueLabelsDisplay,valueLabelsEditingEnabled,valueLabelsPlacement,values;destroy"],"arcgis-slider-input":[()=>import("./PKT4CZ6U.js"),"disabled,flipLabels,label,max,min,step,unitsLabel,value,withSteppers"],"arcgis-ticks":[()=>import("./MKMRUZQA.js"),"interactive,interpolationExponent,labelFormatter:,labelPlacement,layout,max,min,mirrored,mode,showBaseline,showLabels,values"],"arcgis-unique-values-list":[()=>import("./YQWLNGD4.js"),"_messages:,fieldName,fieldSource,layer:,maxHeight,multiple,numberFormatOptions:,partialUniqueValues,selectedValues:,showFilterLength,sortBy,uniqueValues:,view:;getUniqueValues,setFocus"]});s({resourcesUrl:import.meta.url});var a=new CSSStyleSheet;a.replaceSync("@layer{:not([hydrated]):is(arcgis-ckeditor5,arcgis-ckeditor5-popover,arcgis-color-input,arcgis-field-info,arcgis-field-pick-list,arcgis-histogram,arcgis-label-input,arcgis-picker-input,arcgis-ramp-color,arcgis-ramp-color-break,arcgis-ramp-opacity,arcgis-slider,arcgis-slider-input,arcgis-ticks,arcgis-unique-values-list){visibility:hidden}:root{--arcgis-ckeditor5-initial-height: 30vh;--arcgis-ckeditor5-max-width: 35vw;--arcgis-ckeditor5-mentions-max-width: 33vw;--arcgis-common-ckeditor5-initial-height: 30vh;--arcgis-common-ckeditor5-max-width: 35vw;--arcgis-common-ckeditor5-mentions-max-width: 33vw}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,a];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,i)
@@ -2,7 +2,7 @@
2
2
  import "../cdn/main.css";
3
3
  import { makeRuntime as e } from "@arcgis/lumina";
4
4
  import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
5
- const t = e({ defaultAssetPath: "https://js.arcgis.com/5.0.9/common-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: i, setAssetPath: d } = t;
5
+ const t = e({ defaultAssetPath: "https://js.arcgis.com/5.0.10/common-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: i, setAssetPath: d } = t;
6
6
  t.t = s;
7
7
  t.o = r;
8
8
  t.c = a;