@arcgis/common-components 5.1.0-next.103 → 5.1.0-next.105
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/BYGHEIBE.js +2 -0
- package/dist/cdn/SII4OH3Z.js +2 -0
- package/dist/cdn/VLR56OSS.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/layer-utils.js +70 -0
- package/dist/components/arcgis-field-info/customElement.js +168 -167
- package/dist/components/arcgis-field-info/utils/basic.d.ts +10 -20
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +4 -18
- package/dist/components/arcgis-unique-values-list/customElement.js +73 -72
- package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +9 -13
- 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
- package/dist/cdn/5KIT22UZ.js +0 -2
- package/dist/cdn/UQQWSK4Z.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
function r(n,t){return n!=null&&typeof n=="object"&&"type"in n&&n.type===t}function e(n){return r(n,"csv")}function a(n){return u(n)&&!n.url}function u(n){return r(n,"feature")}function s(n){return r(n,"geojson")}function o(n){return r(n,"imagery")}function i(n){return r(n,"imagery-tile")}function c(n){return r(n,"map-image")}function f(n){return r(n,"ogc-feature")}function p(n){return r(n,"scene")}function y(n){return r(n,"stream")}function l(n){return r(n,"sublayer")&&"parent"in n}function b(n){return r(n,"subtype-group")&&"sublayers"in n}function g(n){return r(n,"subtype-sublayer")}function m(n){return r(n,"voxel")}function j(n){return r(n,"wcs")}function v(n){return r(n,"wfs")}export{e as a,a as b,u as c,s as d,o as e,i as f,c as g,f as h,p as i,y as j,l as k,b as l,g as m,m as n,j as o,v as p};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{c as $,e as D,l as S,m as T}from"./BYGHEIBE.js";import{a as M,b as p,c as E}from"./O3CBCQNL.js";import{b as A}from"./JRF33N6C.js";import"./HYLC5GEB.js";import{a as z}from"./GPVWNUMW.js";import{A as x,B as C,H as _,g as R,i as q,m as N,n as F,q as I,z as B}from"./GSNPEBGQ.js";export default $arcgis.t(([{formatDate:Z,convertDateFormatToIntlOptions:y,formatDateOnly:te,formatTimeOnly:ie,formatTimestamp:W,formatNumber:se},ne,{clone:L}])=>{function P(i){return new Date(`1970-01-01T${i}Z`).getTime()}function H(i){return new Date(`${i} 00:00:00`).getTime()}function ae(i,e,s){let t;return e==="unknown"?t=Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=Z(i,{...y("short-date-short-time"),timeZone:e}),t}function oe(i){return i?te(i,y("short-date")):""}function le(i){let e;return typeof i=="string"?e=ie(i,y("short-date-long-time")):e=Z(i,{...y("long-time"),timeZone:"utc"}),e}function re(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?W(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):W(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):Z(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function j(i,e,s){if(!$(i)&&!T(i)&&!S(i)&&!D(i))return;let t;return E(i,s).fields.forEach(l=>{let n=l.name,d="domain"in l?l.domain:void 0;if(!D(i)&&i.subtypeField===n){let m;S(i)||$(i)?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{T(i)&&i.subtypeCode!==r.code||(e.name===n&&(t=t||[],t.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;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===n&&($(i)||D(i))){let m=$(i)?i.typeIdField:void 0,r=$(i)?i.types:void 0;$(i)&&m&&r?(m===n?t=r.map(a=>({code:a.id,name:a.name})):(t=t||[],r.forEach(a=>{if(!a.domains?.[n]||a.domains[n].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(L(u))})}else a.domains?.[n]?.codedValues&&a.domains[n].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(L(o))})})),!t?.length&&d?.codedValues&&(t=L(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function U(i,e){let s=e;if(s){let t="";for(let l=0;l<s.length;l++){let n=s[l];n.code==i&&(t+=(t.length?" | ":"")+n.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 ue=R`: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 C{constructor(){super(...arguments),this.dropdownNode=B(),this._messages=A({blocking:!0}),this._propWatcherTask=new M(this,{task:async([e,s,t])=>{let l=p(e)&&p(s)||p(t);if(!p(t)&&!p(e)&&!p(s)?N("error",this,F("uniqueValues")):p(t)||(p(e)||N("error",this,F("layer")),p(s)||N("error",this,F("fieldName"))),p(e)&&p(s)){let{visualizationSource:n}=this;if(!E(e,n).fields?.filter(d=>d.name===s))throw N("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=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=ue}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(p(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,n=(e?E(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(p(this.uniqueValues))this.fieldInfo={layerField:n,fieldDomains:e&&n?j(e,n,l):void 0,simpleType:e&&n?J(n):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&n){this.fieldInfo={layerField:n,fieldDomains:j(e,n,l),simpleType:J(n),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ne({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=G(n),a=m.uniqueValueInfos.filter(o=>p(o.value)?n.type==="string"&&!r||n.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(G(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(N("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 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: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,K=c?["date","date-only","time-only"].includes(c):!1,Q=v=>{v.sort((h,f)=>h.count<=f.count?1:-1)},X=v=>{let h=r?.length;v.sort((f,V)=>{if(!h&&g)return(typeof f.value=="string"?Number.parseFloat(f.value):f.value)-(typeof V.value=="string"?Number.parseFloat(V.value):V.value);{let w=h?U(f.value,r):f.label??f.value,b=h?U(V.value,r):V.label??V.value;return`${w}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${w}`.localeCompare(`${b}`)}})},Y=(v,h)=>{v.sort((f,V)=>{let w=h?.indexOf(f.value)??-1,b=h?.indexOf(V.value)??-1;return w===b||w>-1&&b>-1?0:w>b?-1:1})};X(a),!t||t==="count"?Q(a):t==="selected"&&Y(a,s);let ee=a.map(v=>this.renderUniqueValue(v)),O;return o&&!n&&(O=q`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),q`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${a.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${v=>{let h=v.target.selectedItems.map(f=>f.value);!r&&c==="date-only"?h=h?.map(f=>H(f)):!r&&c==="time-only"?h=h?.map(f=>P(f)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(f=>Number.parseInt(f)):c&&["single","double"].includes(c)&&(h=h?.map(f=>Number.parseFloat(f))),!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)}} ${x(this.setListRef)}>${a.length>=d&&!n?this.renderSort(g,K):null}${ee}</calcite-list>${O}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return q`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${x(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"||!p(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:n,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:a}=n,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?U(e.value,m):a==="date"?ae(e.value,o):a==="date-only"?oe(e.value):a==="time-only"?le(e.value):a==="timestamp-offset"?re(e.value,l):typeof e.value=="number"?se(e.value,d):e.label??e.value,c=s?a==="date-only"?s.includes(m?.length?e.value:H(e.value)):a==="time-only"?s.includes(m?.length?e.value:P(e.value)):s.includes(e.value):!1;return z(`list-item_${e.value}`,q`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${p(e.count)&&(r.length>200&&!t||r.length<=200)?q`<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/lang")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as J,b as N,c as v,d as Q,e as w,f as y,g as j,h as I,i as k,j as F,k as z,l as B,m as E,n as $,o as S,p as R}from"./BYGHEIBE.js";import{a as H,b as p}from"./O3CBCQNL.js";import{b as U}from"./JRF33N6C.js";import"./HYLC5GEB.js";import{a as V}from"./GPVWNUMW.js";import{A as x,B as G,C as b,H as W,g as M,i as c,m as D,n as C,q}from"./GSNPEBGQ.js";export default $arcgis.t(([Y,O,f,A,_,ee,te,ie])=>{function se(a){return a.associatedLayer?.url}var ae={dateStyle:"short",timeStyle:"short"},re={timeStyle:"medium"};function ne(a){let{layer:e,fieldName:t}=a,i,s=A.supportsFieldConfiguration(e),r;"popupTemplate"in e&&(r=e.popupTemplate);let n=r?r.fieldInfos:[];return X(a)?.filter(o=>o.name===t).forEach(o=>{let d=!s&&n?n.filter(m=>m.fieldName===o.name):void 0,u=s?e.getFieldAlias(t):d?.length?d[0].label:o.alias;/^raster.(item|service)pixelvalue/iu.test(t)&&(o.type="double");let l={layerField:o,label:u||o.name};l.codedValues=ue(t,a),de(l),l.simpleFieldType&&(i=l)}),i}function X(a){let{layer:e}=a;return y(e)||S(e)||w(e)&&e.rasterFields.length?e.rasterFields:"fields"in e?e.fields:[]}async function K(a){a.statisticsStatus="in-progress";let{layer:e,view:t}=a;if(y(e)||S(e)||F(e)||$(e))throw new Error("could not get feature count");try{return await me(e,t)}catch{return}}async function oe(a){let{layer:e,view:t,fieldName:i,fieldInfo:s}=a;if(y(e)||S(e)||$(e))throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");if(!s||s.layerField.type==="oid"||s.layerField.type==="guid"||s.layerField.type==="global-id")return{totalCount:await K(a),nullcount:0};try{let r=await ee({layer:e,view:t,field:i,outStatisticTypes:{exclude:["median"]}});if(!p(r.count))throw new Error("could not get statistics");let n="sourceJSON"in e&&e.sourceJSON.maxRecordCount===r.count;if(p(r.nullcount)&&!n)return{...r,totalCount:r.count+r.nullcount};{let o=await K(a);return{...r,totalCount:o}}}catch{throw new Error("could not get statistics")}}async function le(a){let{layer:e,view:t,fieldName:i}=a;if(y(e)||S(e)||$(e))throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");N(e)&&(e.outFields=["*"]);try{return await te({layer:e,view:t,field:i})}catch{throw new Error("could not get unique values")}}function de(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}}function ue(a,e){let{layer:t}=e;if(E(t)&&t.subtypeField===a){let d=t.parent?.subtypes?.find(u=>u.code===t.subtypeCode);if(d)return[{code:d.code,name:d.name}]}if(!v(t)&&!w(t))return;let i=v(t)?t.typeIdField:void 0,s=v(t)?t.types:void 0,r,n=X(e)?.find(d=>d.name===a),o=n?.domain;return v(t)&&i&&s?(i===a?r=s.map(d=>({code:d.id,name:d.name})):(r=[],s.forEach(d=>{if(!d.domains[a]||d.domains[a].type==="inherited"){let u=o;u?.codedValues&&u.codedValues.forEach(l=>{let m=!1;r.forEach(h=>{h.code===l.code&&(m=!0,`, ${h.name},`.includes(`, ${l.name},`)||(h.name+=`, ${l.name}`))}),m||r.push(_.clone(l))})}else d.domains[a].codedValues&&d.domains[a].codedValues.forEach(u=>{let l=!1;r.forEach(m=>{m.code===u.code&&(l=!0,`, ${m.name},`.includes(`, ${u.name},`)||(m.name+=`, ${u.name}`))}),l||r.push(_.clone(u))})})),!r.length&&o?.codedValues&&(r=_.clone(o.codedValues))):o?.codedValues&&(r=n.domain.codedValues),r?.length?r:void 0}async function ce(a){let{view:e,layer:t}=a;if(w(t)||y(t)||S(t))throw new Error("could not get feature");if(N(t)||R(t)){let i=t.createQuery();i.start=0,i.num=5,i.outFields=["*"];let s=await t.queryFeatures(i);if(s.features.length)return s;throw new Error("could not get feature")}else{if(!e)return await L(a);let i;if(E(t)||z(t)){let s=t.parent;for(;B(s)||j(s);)s=s.parent;i=await e.whenLayerView(s)}else i=await e.whenLayerView(t);if(i.availableFields.length===t.fields.length||(F(t)||I(t))&&i.availableFields.length>0){let s=t.createQuery();s.start=0,s.num=5,s.outFields=["*"];let r=await i.queryFeatures(s);return r.features?.length?r:await L(a)}else return await L(a)}}async function L(a){let{layer:e}=a;if(w(e)||y(e)||F(e)||I(e))throw new Error("cannot get feature from service");let t=new ie({where:"1=1",outFields:["*"],returnGeometry:!1});return"sourceJSON"in e&&e.sourceJSON?.advancedQueryCapabilities?.supportsPagination&&(t.num=1),await e.queryFeatures(t)}async function me(a,e){if(N(a))return await pe(a);if(v(a)||J(a)||k(a)||R(a)||Q(a))return await a.queryFeatureCount();if(e&&(F(a)||I(a)))return await fe(a,e)}async function pe(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 fe(a,e){return await(await e.whenLayerView(a)).queryFeatureCount()}var ge=M`:host{height:100%}.container{padding:var(--calcite-space-xs);background-color:var(--calcite-color-foreground-1)}.title{font-weight:700;padding:5px 0}.missing,.data{color:#a9a9a9}.count{white-space:nowrap}.section{padding:var(--calcite-space-xs) 0}.statistics-row{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);padding:var(--calcite-space-xs) 0;display:flex;justify-content:space-between}.statistics-row-top-values{border-top:var(--calcite-border-width-sm) solid var(--calctie-color-border-2);padding:20px 0 var(--calcite-space-xs) 0;display:flex;justify-content:space-between}`,Z=class extends G{constructor(){super(...arguments),this._messages=U({blocking:!0}),this._propWatcherTask=new H(this,{task:async([e,t])=>{let i=p(e)&&p(t);if(p(e)||D("error",this,C("layer")),p(t)||D("error",this,C("fieldName")),!i)throw new Error;await this.processProps(),this._propWatcherTask.autoRun=!1},args:()=>[this.layer,this.fieldName]}),this.oneFeatureResponseStatus="missing",this.statisticsStatus="missing",this.uniqueValuesStatus="missing",this.hideAlias=!1,this.hideNumericFormat=!1,this.hideStatistics=!1,this.arcgisComplete=q(),this.arcgisFieldInfoComplete=q()}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=ge}async refresh(){await this.processProps(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),this.timeZoneHandle?.remove()}async processProps(){let{view:e,layer:t,fieldName:i,hideStatistics:s}=this;if(!t||!i)return;let r;if(t.declaredClass==="esri.layers.support.Sublayer"){let n=t;e&&await O.whenOnce(()=>!e.updating),r=await n.createFeatureLayer(),await r?.load()}this.props={view:e,layer:r??t,fieldName:i,hideStatistics:s},this.props.fieldInfo=ne(this.props),k(t)&&Y.request.interceptors?.push({urls:`${se(t)}/${t.layerId}`,before(n){n.requestOptions.authMode="no-prompt"}}),this.oneFeatureResponseStatus="in-progress";try{let n=await ce(this.props);this.oneFeatureResponse=n,this.oneFeatureResponseStatus="success"}catch{this.oneFeatureResponseStatus="failed"}if(F(t)){this.uniqueValuesStatus="failed",this.statisticsStatus="failed";return}if(s)this.uniqueValuesStatus="failed";else{this.uniqueValuesStatus="in-progress";try{let n=await le(this.props);this.uniqueValues=n,n?.uniqueValueInfos?.length?this.uniqueValuesStatus="success":this.uniqueValuesStatus="failed"}catch{this.uniqueValuesStatus="failed"}}if(s)this.statisticsStatus="failed";else{this.statisticsStatus="in-progress";try{let n=await oe(this.props);if(!p(n.totalCount)&&p(n.count)&&this.uniqueValuesStatus==="success"){let o=this.uniqueValues?.uniqueValueInfos??[];for(let d=0;d<o.length;d++){let u=o[d];if(u.value===null){n.totalCount=u.count+n.count;break}}n.totalCount??=n.count}this.statistics=n,this.statisticsStatus="success"}catch{this.statisticsStatus="failed"}}this.setUpTimeZoneHandle()}setUpTimeZoneHandle(){this.timeZoneHandle?.remove();let{props:e}=this,{view:t,fieldInfo:i}=e;["date","timestamp-offset"].includes(this._getStatisticsType(i))&&(this.timeZoneHandle=O.watch(()=>t?.timeZone,()=>{this.requestUpdate()}))}_getFieldTypeLabel(e){let{_messages:t}=this,i=t.fieldTypes;switch(e){case"big-integer":return i.bigInteger;case"date":return i.date;case"date-only":return i.dateOnly;case"double":return i.double;case"global-id":return i.globalId;case"guid":return i.guid;case"integer":return i.integer;case"long":return i.long;case"oid":return i.oid;case"single":return i.single;case"small-integer":return i.smallInteger;case"string":return i.string;case"time-only":return i.timeOnly;case"timestamp-offset":return i.timestampOffset;default:return i.string}}_getStatisticsType(e){switch(e.layerField.type){case"big-integer":case"double":case"integer":case"single":case"small-integer":{if(e.codedValues)return"string";switch(e.layerField.valueType){case"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:s}=i;switch(s.simpleFieldType){case"date":return this._getDateString(e,t);case"date-only":return this._getDateOnlyString(e,t);case"guid":return this._getGuidString(e);case"number":return this._getNumberString(e,t);case"time-only":return this._getTimeOnlyString(e,t);case"timestamp-offset":return this._getTimestampOffsetString(e,t);default:return`${e}`}}_getDateString(e,t){let{view:i}=this.props;return i&&i.timeZone==="unknown"?f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"})}_getTimestampOffsetString(e,t){let{view:i}=this.props;return typeof e=="string"?i&&i.timeZone==="unknown"?f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"}):this._getDateString(e,t)}_getDateOnlyString(e,t){return f.formatDateOnly(e,this.getIntlDateTimeFormattingOptions("short-date",t))}_getTimeOnlyString(e,t){return typeof e=="string"?f.formatTimeOnly(e,this.getIntlDateTimeFormattingOptions("short-date-long-time",t)):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("long-time",{...t,isTimeOnly:!0}),timeZone:"utc"})}_getGuidString(e){return e.startsWith("{")?e:`{${e}}`}_getNumberString(e,t){let i=t?.useFieldFormatting?e:Math.round(e*100)/100;return f.formatNumber(i,this.getIntlNumberFormattingOptions(t))}_printNumValue(e,t){return p(e)?this._getNumberString(e,t):"--"}_setCompleteRef(){this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit()}getCurrentFieldFormat(){let{props:e}=this,{layer:t,fieldName:i}=e;return(this.originalLayerSupportsFieldConfigs()?t.getFieldConfiguration(i):void 0)?.fieldFormat??void 0}getIntlNumberFormattingOptions(e){let t=this.getCurrentFieldFormat();if(!e?.useFieldFormatting)return t?{useGrouping:["always","auto"].includes(t.useGrouping)}:f.convertNumberFormatToIntlOptions({digitSeparator:this.getPopupTemplateFieldInfo()?.format?.digitSeparator??!0});let i=t?{minimumFractionDigits:t.minimumFractionDigits,maximumFractionDigits:t.maximumFractionDigits,useGrouping:["always","auto"].includes(t.useGrouping)}:void 0;if(i)return i;let s=this.getPopupTemplateFieldInfo();return f.convertNumberFormatToIntlOptions({digitSeparator:s?.format?.digitSeparator??!0,places:s?.format?.places??2})}getIntlDateTimeFormattingOptions(e,t){let i=this.getCurrentFieldFormat();if(!t?.useFieldFormatting)return i?t?.isTimeOnly?re:ae:f.convertDateFormatToIntlOptions(e);let s=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(s)return s;let r=this.getPopupTemplateFieldInfo();return f.convertDateFormatToIntlOptions(r?.format?.dateFormat??e)}originalLayerSupportsFieldConfigs(){let{layer:e}=this;return A.supportsFieldConfiguration(e)}getPopupTemplateFieldInfo(){let{props:e}=this,{layer:t,fieldName:i}=e;return("popupTemplate"in t?t.popupTemplate:void 0)?.fieldInfos?.find(s=>s.fieldName===i)}render(){return this._propWatcherTask.render({complete:()=>{let{props:e}=this,{fieldInfo:t}=e;return t?c`<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,s=this._getFieldTypeLabel(i.layerField.type);return c`<div class="section"><div class="title">${e.fieldType}</div><div>${s}</div></div>`}renderFieldAlias(){let{_messages:e,props:t,hideAlias:i}=this,{fieldInfo:s}=t;return i?"":c`<div class="section"><div class="title">${e.fieldAlias}</div><div>${s.label}</div></div>`}renderFieldDescription(){let{_messages:e,props:t}=this,{layer:i}=t;if(!v(i))return"";let{fieldInfo:s}=t,r=s.layerField.description;return c`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${b({missing:!r})}>${r||e.fieldDescriptionNotSet}</div></div>`}renderFieldValueType(){let{_messages:e,props:t}=this,{layer:i}=t;if(!v(i))return"";let{fieldInfo:s}=t,r=this._getFieldValueTypeCamelCase(s);return c`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${b(r?"":"missing")}>${r?e.fieldValueTypes[r]:e.fieldValueTypeNotSet}</div></div>`}renderFieldSampleValue(){let{oneFeatureResponse:e,oneFeatureResponseStatus:t,statisticsStatus:i,statistics:s,uniqueValuesStatus:r,uniqueValues:n,_messages:o,props:d}=this,{layer:u,fieldName:l,fieldInfo:m}=d,{statistics:h}=o,g;if(y(u)||$(u)||!F(u)&&["string","oid","guid"].includes(this._getStatisticsType(m))&&r!=="failed")return"";t==="success"?e.features.forEach(T=>{(g===void 0||g===null&&T.attributes[l]!==null)&&(g=T.attributes[l])}):i==="success"?g=s?.min??void 0:r==="success"&&(g=n?.uniqueValueInfos?.[0]?.value??n?.uniqueValueInfos?.[1]?.value??void 0);let P=m.codedValues;return p(g)&&(P?g=P.find(T=>g===T.code)?.name||g:g=this._getDisplayString(g,{useFieldFormatting:!0})),c`<div class="section"><div class="title">${o.fieldSampleValue}</div><div class=${b(t==="failed"&&i==="failed"&&r==="failed"||!p(g)?"missing":"")}>${t==="success"||i==="success"||r==="success"?g?.toString()??h.allNulls:t==="failed"&&i==="failed"&&r==="failed"?o.fieldSampleNotAvailable:o.fieldSampleRetrieving}</div></div>`}renderFieldNumericFormat(){let{_messages:e,props:t,hideNumericFormat:i}=this,{fieldName:s,fieldInfo:r,layer:n}=t;if(i||!["double","long","single"].includes(r.layerField.type))return"";let o=this.originalLayerSupportsFieldConfigs()?n.getFieldConfiguration(s):void 0;if(o?.fieldFormat){let{minimumFractionDigits:u,maximumFractionDigits:l}=o.fieldFormat;return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}",u.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}",l.toString())}</div></div>`}let d="popupTemplate"in n?n.popupTemplate:void 0;if(d?.fieldInfos){let u=d.fieldInfos?.filter(l=>l.fieldName===s);if(u?.length){let l=u[0];if(p(l?.format?.places)){let m=l.format.places;return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}",m.toString())}</div></div>`}}}return c`<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:s,props:r}=this,{layer:n,fieldInfo:o}=r;return i?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):["stream","imagery-tile","voxel"].includes(n.type)||["long"].includes(o.layerField.type)?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):c`<div class="section"><div class="title">${s.fieldStatistics}</div>${!e||e==="missing"||e==="in-progress"?V("field-info-statistics-content",c`<div class="missing">${s.fieldStatisticsRetrieving}</div>`):e==="failed"&&t!=="success"?this.renderNoStatistics():V("field-info-statistics-content",c`<div ${x(this._setCompleteRef)}>${this.renderStatistics()}</div>`)}</div>`}renderNoStatistics(){let{_messages:e}=this;return V("field-info-statistics-content",c`<div class="missing" ${x(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`)}renderStatistics(){let{props:e}=this,{fieldInfo:t}=e;switch(this._getStatisticsType(t)){case"number":return this.renderNumberStatistics();case"guid":case"oid":case"string":return this.renderStringStatistics();case"date":case"date-only":case"time-only":case"timestamp-offset":return this.renderDateStatistics();default:return""}}renderNumberStatistics(){let{statistics:e,_messages:t}=this;if(!e)return this.renderNoStatistics();let{statistics:i}=t;return c`<div><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${p(e.sum)?c`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>`:null}${p(e.min)?c`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>`:null}${p(e.max)?c`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>`:null}${p(e.avg)?c`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>`:null}${p(e.stddev)?c`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>`:null}${this.renderNullValues()}</div>`}renderStringStatistics(){let{statistics:e,uniqueValuesStatus:t,_messages:i}=this,{statistics:s}=i;return c`<div><div class="statistics-row"><div>${s.numberOfValues}</div>${t!=="success"?c`<div class="missing">--</div>`:c`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`}renderDateStatistics(){let{statistics:e,view:t,props:i,_messages:s}=this,{fieldInfo:r}=i;if(!e||!p(e.max)||!p(e.min))return this.renderNoStatistics();let{statistics:n}=s,o=e.max-e.min,d=Math.floor(o/31536e6),u=Math.floor((o-d*31536e6)/2628e6),l=Math.ceil((o-u*2628e6)/864e5);l>=30&&(u+=1,l=0);let m=d===1?n.timeSpanOptions.year:d>1?n.timeSpanOptions.years.replace("${years}",d.toString()):"";m+=d>0&&(u>0||l>0)?", ":"",m+=u===1?n.timeSpanOptions.month:u>1?n.timeSpanOptions.months.replace("${months}",u.toString()):"",m+=u>0&&l>0?", ":"",m+=l===1?n.timeSpanOptions.day:l>1?n.timeSpanOptions.days.replace("${days}",l.toString()):"";let h=r.simpleFieldType!=="timestamp-offset"||!t||t.timeZone!=="unknown",g=r.simpleFieldType==="time-only";return c`<div><div class="statistics-row"><div>${n.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${h&&p(e.min)?c`<div class="statistics-row"><div>${g?n.minimumTime:n.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>`:null}${h&&p(e.max)?c`<div class="statistics-row"><div>${g?n.maximumTime:n.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>`:null}${h&&p(e.avg)?c`<div class="statistics-row"><div>${g?n.averageTime:n.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>`:null}${h&&!g&&p(e.min)&&p(e.max)&&o>0?c`<div class="statistics-row"><div>${n.timespan}</div><div class="data">${m}</div></div>`:null}${this.renderNullValues()}</div>`}renderTopValues(){let{uniqueValues:e,uniqueValuesStatus:t,_messages:i,props:s}=this,{fieldInfo:r}=s,{statistics:n}=i;if(e?.uniqueValueInfos?.length){let o=e.uniqueValueInfos;o.sort((l,m)=>l.count<m.count?1:l.count>m.count?-1:0);let d=r.codedValues,u=o.filter(l=>l.value!==null).filter((l,m)=>l&&m<10).map(l=>{let m=l.value;return d?d.forEach(h=>{m===h.code&&(m=h.name)}):m=this._getDisplayString(m),c`<div class="statistics-row"><div class="data">${`${m}`}</div><div class="count">${this._printNumValue(l.count)}</div></div>`});return u.length?c`<div><div class="statistics-row-top-values"><div>${o.length>10?n.topTenValues:n.topValues}</div><div>${n.count}</div></div>${u}</div>`:""}else return c`<div><div class="statistics-row-top-values"><div>${n.topValues}</div><div>${n.count}</div></div><div class="statistics-row"><div class="missing">${t==="failed"?i.fieldUniqueValuesNotAvailable:i.fieldSampleRetrieving}</div></div></div>`}renderNullValues(){let{statistics:e,uniqueValues:t,_messages:i}=this,{statistics:s}=i,r=e?.nullcount;if(!p(r)&&t){let n=t.uniqueValueInfos;for(let o=0;o<n.length;o++){let d=n[o];if(d.value===null){r=d.count;break}}}return c`<div class="statistics-row"><div>${s.numberOfNulls}</div>${p(r)?c`<div class="data">${this._printNumValue(r)}</div>`:c`<div class="missing">--</div>`}</div>`}};W("arcgis-field-info",Z);return Z},"config","core/reactiveUtils","intl","applications/PortalApp/layerUtils","core/lang","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/support/Query")
|
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"./GSNPEBGQ.js";var s=e(i,{"arcgis-ckeditor5":[()=>import("./JJZBCHU4.js"),"canResizeVertically,currentLanguage,customConfig,customExpressionCheck:,editorType,groupFieldsAndExpressions,intlExpressionsGroupHeading,intlFieldsGroupHeading,intlTextPlaceHolder,mentionFields:,readOnly,textData;getData,setFocus"],"arcgis-ckeditor5-popover":[()=>import("./MNN3QF54.js"),"guid,intlCancel,intlLabel,intlOk,refElement:;reposition"],"arcgis-color-input":[()=>import("./53LIKT4M.js"),"_messages:,clearable,color,compact,disabled,hideRecentColors,messageOverrides:,placement,popoverProps:,showTransparency,storageId;close,setFocus"],"arcgis-coordinate-system-picker":[()=>import("./3P3NRZ2D.js"),"_messages:,autoFilterToDefault,defaultWkid,filterEnabled,hideCategories:,value:;getSRDescription"],"arcgis-coordinate-system-picker-tree":[()=>import("./W2BLCMKI.js"),"data:,value"],"arcgis-field-info":[()=>import("./
|
|
2
|
+
import{G as i,v as e}from"./GSNPEBGQ.js";var s=e(i,{"arcgis-ckeditor5":[()=>import("./JJZBCHU4.js"),"canResizeVertically,currentLanguage,customConfig,customExpressionCheck:,editorType,groupFieldsAndExpressions,intlExpressionsGroupHeading,intlFieldsGroupHeading,intlTextPlaceHolder,mentionFields:,readOnly,textData;getData,setFocus"],"arcgis-ckeditor5-popover":[()=>import("./MNN3QF54.js"),"guid,intlCancel,intlLabel,intlOk,refElement:;reposition"],"arcgis-color-input":[()=>import("./53LIKT4M.js"),"_messages:,clearable,color,compact,disabled,hideRecentColors,messageOverrides:,placement,popoverProps:,showTransparency,storageId;close,setFocus"],"arcgis-coordinate-system-picker":[()=>import("./3P3NRZ2D.js"),"_messages:,autoFilterToDefault,defaultWkid,filterEnabled,hideCategories:,value:;getSRDescription"],"arcgis-coordinate-system-picker-tree":[()=>import("./W2BLCMKI.js"),"data:,value"],"arcgis-field-info":[()=>import("./VLR56OSS.js"),"_messages:,fieldName,hideAlias,hideNumericFormat,hideStatistics,layer:,view:;refresh"],"arcgis-field-pick-list":[()=>import("./ALH2AARB.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("./GFUGR2W7.js"),"_messages:,average,bins:,colorBlendingEnabled,colorStops:,dataLines:,icon,label,layout,max,messageOverrides:,min,standardDeviation"],"arcgis-label-input":[()=>import("./3Y4H3CAQ.js"),"alignment,editing,labelFormatter:,readOnly,value;edit;getLabelBoundingClientRect"],"arcgis-picker-input":[()=>import("./TTV4Z2RR.js"),"disabled,heading,iconEnd,intlDone,label,popoverProps:;close,setFocus"],"arcgis-ramp-color":[()=>import("./OQF4LYVE.js"),"layout,max,min,stops:"],"arcgis-ramp-color-break":[()=>import("./YZGTCNEQ.js"),"layout,max,min,stops:"],"arcgis-ramp-opacity":[()=>import("./P4CF7V4U.js"),"fillColor,layout,max,min,stops:"],"arcgis-slider":[()=>import("./QYF3665A.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("./WG5GA6QX.js"),"disabled,flipLabels,label,max,min,scale,step,unitsLabel,value,withSteppers"],"arcgis-spatial-reference-picker":[()=>import("./CLPCPWPE.js"),"_messages:,autoFilterToDefault,defaultWkid,filterEnabled,hideCategories:,value:;getSRDescription"],"arcgis-spatial-reference-picker-tree":[()=>import("./DDJDHAHT.js"),"data:,value"],"arcgis-ticks":[()=>import("./BPEHBFXY.js"),"interactive,interpolationExponent,labelFormatter:,labelPlacement,layout,max,min,mirrored,mode,showBaseline,showLabels,values"],"arcgis-unique-values-list":[()=>import("./SII4OH3Z.js"),"_messages:,fieldName,layer:,maxHeight,multiple,numberFormatOptions:,partialUniqueValues,selectedValues:,showFilterLength,sortBy,uniqueValues:,view:,visualizationSource;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-coordinate-system-picker,arcgis-coordinate-system-picker-tree,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-coordinate-system-picker-height: 45vh;--arcgis-coordinate-system-picker-min-width: 20rem;--arcgis-coordinate-system-picker-max-width: 27rem}}");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)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
function r(e, n) {
|
|
3
|
+
return e != null && typeof e == "object" && "type" in e && e.type === n;
|
|
4
|
+
}
|
|
5
|
+
function u(e) {
|
|
6
|
+
return r(e, "csv");
|
|
7
|
+
}
|
|
8
|
+
function a(e) {
|
|
9
|
+
return t(e) && !e.url;
|
|
10
|
+
}
|
|
11
|
+
function t(e) {
|
|
12
|
+
return r(e, "feature");
|
|
13
|
+
}
|
|
14
|
+
function s(e) {
|
|
15
|
+
return r(e, "geojson");
|
|
16
|
+
}
|
|
17
|
+
function i(e) {
|
|
18
|
+
return r(e, "imagery");
|
|
19
|
+
}
|
|
20
|
+
function o(e) {
|
|
21
|
+
return r(e, "imagery-tile");
|
|
22
|
+
}
|
|
23
|
+
function y(e) {
|
|
24
|
+
return r(e, "map-image");
|
|
25
|
+
}
|
|
26
|
+
function c(e) {
|
|
27
|
+
return r(e, "ogc-feature");
|
|
28
|
+
}
|
|
29
|
+
function f(e) {
|
|
30
|
+
return r(e, "scene");
|
|
31
|
+
}
|
|
32
|
+
function p(e) {
|
|
33
|
+
return r(e, "stream");
|
|
34
|
+
}
|
|
35
|
+
function L(e) {
|
|
36
|
+
return r(e, "sublayer") && "parent" in e;
|
|
37
|
+
}
|
|
38
|
+
function b(e) {
|
|
39
|
+
return r(e, "subtype-group") && "sublayers" in e;
|
|
40
|
+
}
|
|
41
|
+
function g(e) {
|
|
42
|
+
return r(e, "subtype-sublayer");
|
|
43
|
+
}
|
|
44
|
+
function m(e) {
|
|
45
|
+
return r(e, "voxel");
|
|
46
|
+
}
|
|
47
|
+
function S(e) {
|
|
48
|
+
return r(e, "wcs");
|
|
49
|
+
}
|
|
50
|
+
function l(e) {
|
|
51
|
+
return r(e, "wfs");
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
S as a,
|
|
55
|
+
m as b,
|
|
56
|
+
a as c,
|
|
57
|
+
i as d,
|
|
58
|
+
g as e,
|
|
59
|
+
t as f,
|
|
60
|
+
p as g,
|
|
61
|
+
l as h,
|
|
62
|
+
o as i,
|
|
63
|
+
L as j,
|
|
64
|
+
b as k,
|
|
65
|
+
y as l,
|
|
66
|
+
c as m,
|
|
67
|
+
u as n,
|
|
68
|
+
f as o,
|
|
69
|
+
s as p
|
|
70
|
+
};
|