@arcgis/common-components 5.1.0-next.69 → 5.1.0-next.70
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/{HZGVP2AP.js → 5NETUOXN.js} +1 -1
- package/dist/cdn/{QYCHZ4TZ.js → A2WIET6Z.js} +1 -1
- package/dist/cdn/{IHNUOURR.js → A4VSQVM4.js} +1 -1
- package/dist/cdn/{C2F4DDGS.js → EAHF3DLH.js} +1 -1
- package/dist/cdn/{V5BLUHTV.js → EAZTXSEK.js} +1 -1
- package/dist/cdn/{6TGOOBJD.js → HLEA6ABY.js} +1 -1
- package/dist/cdn/{5KT42AWR.js → I57JIY65.js} +1 -1
- package/dist/cdn/{KNSXCHXU.js → IUOLWTBW.js} +1 -1
- package/dist/cdn/{RUM55GN4.js → IYWMY52R.js} +1 -1
- package/dist/cdn/{Q3ICSGFX.js → JAL7MAFZ.js} +1 -1
- package/dist/cdn/{TNIYIWBB.js → KVH5TABZ.js} +1 -1
- package/dist/cdn/{KQGWJ6JT.js → L5OS6JT2.js} +1 -1
- package/dist/cdn/{NSF4UW6W.js → LQ7GSW6L.js} +1 -1
- package/dist/cdn/{WKRHTPC5.js → MQGZ7W5O.js} +1 -1
- package/dist/cdn/{2KFZW4EW.js → NMW4NOC2.js} +1 -1
- package/dist/cdn/{HVM3TDF3.js → NRTJ53CF.js} +2 -2
- package/dist/cdn/{BHPGI62V.js → OXVPCZE7.js} +1 -1
- package/dist/cdn/{J7KPCIGL.js → UDUEUE6K.js} +1 -1
- package/dist/cdn/{FW4U3Z6R.js → W745RNPU.js} +1 -1
- package/dist/cdn/{ZNUFIFOE.js → WNPCATBU.js} +1 -1
- package/dist/cdn/{YG2INAZ4.js → Y32JMGYR.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-slider/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as f,b as I}from"./MB7UDGWW.js";import{a as R}from"./TNIYIWBB.js";import{a as B}from"./Q3ICSGFX.js";import{b as C}from"./J7KPCIGL.js";import"./HYLC5GEB.js";import{A as E,B as O,H as k,g as L,i as w,m as q,n as Z,q as F,z as U}from"./HVM3TDF3.js";export default $arcgis.t(([{formatDate:N,convertDateFormatToIntlOptions:v,formatDateOnly:Q,formatTimeOnly:X,formatTimestamp:_,formatNumber:Y},ee,{clone:D}])=>{function M(i){return new Date(`1970-01-01T${i}Z`).getTime()}function z(i){return new Date(`${i} 00:00:00`).getTime()}function te(i,e,s){let t;return e==="unknown"?t=N(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=N(i,{...v("short-date-short-time"),timeZone:e}),t}function ie(i){return i?Q(i,v("short-date")):""}function se(i){let e;return typeof i=="string"?e=X(i,v("short-date-long-time")):e=N(i,{...v("long-time"),timeZone:"utc"}),e}function ae(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?_(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):_(i,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?N(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):N(i,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function A(i,e,s){if(i.type!=="feature"&&i.type!=="subtype-group"&&i.type!=="subtype-sublayer"&&i.type!=="imagery")return;let t;return I(i,s).fields.forEach(l=>{let a=l.name,d="domain"in l?l.domain:void 0;if(i.type!=="imagery"&&i.subtypeField===a){let m;i.type==="subtype-group"||i.type==="feature"?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{i.type==="subtype-sublayer"&&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 c=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push({code:u.code,name:u.name})})}}))})}if(e.name===a&&(i.type==="feature"||i.type==="imagery")){let m=i.type==="feature"?i.typeIdField:void 0,r=i.type==="feature"?i.types:void 0;i.type==="feature"&&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=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push(D(u))})}else n.domains?.[a]?.codedValues&&n.domains[a].codedValues.forEach(o=>{let u=!1;t.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||t.push(D(o))})})),!t?.length&&d?.codedValues&&(t=D(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function x(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 W(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function P(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 ne=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 R(this,{task:async([e,s,t])=>{let l=f(e)&&f(s)||f(t);if(!f(t)&&!f(e)&&!f(s)?q("error",this,Z("uniqueValues")):f(t)||(f(e)||q("error",this,Z("layer")),f(s)||q("error",this,Z("fieldName"))),f(e)&&f(s)){let{visualizationSource:a}=this;if(!I(e,a).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,visualizationSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ne}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())}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,a=(e?I(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(f(this.uniqueValues))this.fieldInfo={layerField:a,fieldDomains:e&&a?A(e,a,l):void 0,simpleType:e&&a?P(a):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&a){this.fieldInfo={layerField:a,fieldDomains:A(e,a,l),simpleType:P(a),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ee({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=W(a),n=m.uniqueValueInfos.filter(o=>f(o.value)?a.type==="string"&&!r||a.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(W(a)||a.type,o.value!=="<Null>"&&o.value!==""):!1);n.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{n.find(u=>u.value===o.code)||n.push({value:o.code,count:0})}),d.uniqueValueInfos=n,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(n=>{r.find(o=>o.value===n.code)||r.push({value:n.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 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:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:n,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!n?.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?x(p.value,r):p.label??p.value,b=h?x(V.value,r):V.label??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(n),!t||t==="count"?j(n):t==="selected"&&J(n,s);let K=n.map(y=>this.renderUniqueValue(y)),T;return o&&!a&&(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=${n.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=>z(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)}} ${E(this.setListRef)}>${n.length>=d&&!a?this.renderSort(g,H):null}${K}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${E(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:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:n}=a,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?x(e.value,m):n==="date"?te(e.value,o):n==="date-only"?ie(e.value):n==="time-only"?se(e.value):n==="timestamp-offset"?ae(e.value,l):typeof e.value=="number"?Y(e.value,d):e.label??e.value,c=s?n==="date-only"?s.includes(m?.length?e.value:z(e.value)):n==="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&&!t||r.length<=200)?w`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};k("arcgis-unique-values-list",S);return S},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
2
|
+
import{a as f,b as I}from"./MB7UDGWW.js";import{a as R}from"./KVH5TABZ.js";import{a as B}from"./JAL7MAFZ.js";import{b as C}from"./UDUEUE6K.js";import"./HYLC5GEB.js";import{A as E,B as O,H as k,g as L,i as w,m as q,n as Z,q as F,z as U}from"./NRTJ53CF.js";export default $arcgis.t(([{formatDate:N,convertDateFormatToIntlOptions:v,formatDateOnly:Q,formatTimeOnly:X,formatTimestamp:_,formatNumber:Y},ee,{clone:D}])=>{function M(i){return new Date(`1970-01-01T${i}Z`).getTime()}function z(i){return new Date(`${i} 00:00:00`).getTime()}function te(i,e,s){let t;return e==="unknown"?t=N(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=N(i,{...v("short-date-short-time"),timeZone:e}),t}function ie(i){return i?Q(i,v("short-date")):""}function se(i){let e;return typeof i=="string"?e=X(i,v("short-date-long-time")):e=N(i,{...v("long-time"),timeZone:"utc"}),e}function ae(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?_(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):_(i,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?N(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):N(i,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function A(i,e,s){if(i.type!=="feature"&&i.type!=="subtype-group"&&i.type!=="subtype-sublayer"&&i.type!=="imagery")return;let t;return I(i,s).fields.forEach(l=>{let a=l.name,d="domain"in l?l.domain:void 0;if(i.type!=="imagery"&&i.subtypeField===a){let m;i.type==="subtype-group"||i.type==="feature"?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{i.type==="subtype-sublayer"&&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 c=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push({code:u.code,name:u.name})})}}))})}if(e.name===a&&(i.type==="feature"||i.type==="imagery")){let m=i.type==="feature"?i.typeIdField:void 0,r=i.type==="feature"?i.types:void 0;i.type==="feature"&&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=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push(D(u))})}else n.domains?.[a]?.codedValues&&n.domains[a].codedValues.forEach(o=>{let u=!1;t.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||t.push(D(o))})})),!t?.length&&d?.codedValues&&(t=D(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function x(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 W(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function P(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 ne=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 R(this,{task:async([e,s,t])=>{let l=f(e)&&f(s)||f(t);if(!f(t)&&!f(e)&&!f(s)?q("error",this,Z("uniqueValues")):f(t)||(f(e)||q("error",this,Z("layer")),f(s)||q("error",this,Z("fieldName"))),f(e)&&f(s)){let{visualizationSource:a}=this;if(!I(e,a).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,visualizationSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ne}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())}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,a=(e?I(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(f(this.uniqueValues))this.fieldInfo={layerField:a,fieldDomains:e&&a?A(e,a,l):void 0,simpleType:e&&a?P(a):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&a){this.fieldInfo={layerField:a,fieldDomains:A(e,a,l),simpleType:P(a),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ee({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=W(a),n=m.uniqueValueInfos.filter(o=>f(o.value)?a.type==="string"&&!r||a.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(W(a)||a.type,o.value!=="<Null>"&&o.value!==""):!1);n.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{n.find(u=>u.value===o.code)||n.push({value:o.code,count:0})}),d.uniqueValueInfos=n,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(n=>{r.find(o=>o.value===n.code)||r.push({value:n.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 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:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:n,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!n?.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?x(p.value,r):p.label??p.value,b=h?x(V.value,r):V.label??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(n),!t||t==="count"?j(n):t==="selected"&&J(n,s);let K=n.map(y=>this.renderUniqueValue(y)),T;return o&&!a&&(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=${n.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=>z(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)}} ${E(this.setListRef)}>${n.length>=d&&!a?this.renderSort(g,H):null}${K}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${E(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:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:n}=a,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?x(e.value,m):n==="date"?te(e.value,o):n==="date-only"?ie(e.value):n==="time-only"?se(e.value):n==="timestamp-offset"?ae(e.value,l):typeof e.value=="number"?Y(e.value,d):e.label??e.value,c=s?n==="date-only"?s.includes(m?.length?e.value:z(e.value)):n==="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&&!t||r.length<=200)?w`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};k("arcgis-unique-values-list",S);return S},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{B as p,H as m,g as l,i as e}from"./
|
|
2
|
+
import{B as p,H as m,g as l,i as e}from"./NRTJ53CF.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")
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{G as i,v as e}from"./
|
|
2
|
+
import{G as i,v as e}from"./NRTJ53CF.js";var a=e(i,{"arcgis-ckeditor5":[()=>import("./A4VSQVM4.js"),"canResizeVertically,currentLanguage,customConfig,customExpressionCheck:,editorType,groupFieldsAndExpressions,intlExpressionsGroupHeading,intlFieldsGroupHeading,intlTextPlaceHolder,mentionFields:,readOnly,textData;getData,setFocus"],"arcgis-ckeditor5-popover":[()=>import("./A2WIET6Z.js"),"guid,intlCancel,intlLabel,intlOk,refElement:;reposition"],"arcgis-color-input":[()=>import("./HLEA6ABY.js"),"_messages:,clearable,color,compact,disabled,hideRecentColors,messageOverrides:,placement,popoverProps:,showTransparency,storageId;close,setFocus"],"arcgis-field-info":[()=>import("./IUOLWTBW.js"),"_messages:,fieldName,hideAlias,hideNumericFormat,hideStatistics,layer:,view:;refresh"],"arcgis-field-pick-list":[()=>import("./W745RNPU.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("./EAZTXSEK.js"),"_messages:,average,bins:,colorBlendingEnabled,colorStops:,dataLines:,icon,label,layout,max,messageOverrides:,min,standardDeviation"],"arcgis-label-input":[()=>import("./MQGZ7W5O.js"),"alignment,editing,labelFormatter:,readOnly,value;edit;getLabelBoundingClientRect"],"arcgis-picker-input":[()=>import("./LQ7GSW6L.js"),"disabled,heading,iconEnd,intlDone,label,popoverProps:;close,setFocus"],"arcgis-ramp-color":[()=>import("./OXVPCZE7.js"),"layout,max,min,stops:"],"arcgis-ramp-color-break":[()=>import("./IYWMY52R.js"),"layout,max,min,stops:"],"arcgis-ramp-opacity":[()=>import("./Y32JMGYR.js"),"fillColor,layout,max,min,stops:"],"arcgis-slider":[()=>import("./5NETUOXN.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("./L5OS6JT2.js"),"disabled,flipLabels,label,max,min,step,unitsLabel,value,withSteppers"],"arcgis-spatial-reference-picker":[()=>import("./I57JIY65.js"),"_messages:,autoFilterToDefault,defaultWkid,filterEnabled,hideCategories:,value:;getSRDescription"],"arcgis-spatial-reference-picker-tree":[()=>import("./NMW4NOC2.js"),"data:,value"],"arcgis-ticks":[()=>import("./EAHF3DLH.js"),"interactive,interpolationExponent,labelFormatter:,labelPlacement,layout,max,min,mirrored,mode,showBaseline,showLabels,values"],"arcgis-unique-values-list":[()=>import("./WNPCATBU.js"),"_messages:,fieldName,layer:,maxHeight,multiple,numberFormatOptions:,partialUniqueValues,selectedValues:,showFilterLength,sortBy,uniqueValues:,view:,visualizationSource;getUniqueValues,setFocus"]});a({resourcesUrl:import.meta.url});var s=new CSSStyleSheet;s.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-spatial-reference-picker,arcgis-spatial-reference-picker-tree,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,s];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)
|
|
@@ -801,7 +801,7 @@ class Pe extends ee {
|
|
|
801
801
|
_renderPopover() {
|
|
802
802
|
const { _activePart: e, layout: t, popoverPlacement: a, valueLabelsPlacement: i, valueLabelsDisplay: r, popoverLabel: o } = this, s = e ? ze(e) ? e : "track-range" : "", l = this._hasPopoverContent && !!s, c = t === "horizontal" ? a === "start" ? "top" : "bottom" : a === "start" ? "left" : "right";
|
|
803
803
|
let d = 14;
|
|
804
|
-
return r !== "hidden" && a === i && (d += 24), y`<calcite-popover flip-disabled focus-trap-disabled .label=${o} .open=${l} .offsetDistance=${d} .placement=${c}
|
|
804
|
+
return r !== "hidden" && a === i && (d += 24), y`<calcite-popover flip-disabled focus-trap-disabled .label=${o} .open=${l} .offsetDistance=${d} .placement=${c} .referenceElement=${s} scale=s trigger-disabled ${O(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`;
|
|
805
805
|
}
|
|
806
806
|
_renderContentStart() {
|
|
807
807
|
return y`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`;
|