UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.16 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ function e(e){const t=e?.fieldsIndex,o="fromnetworksourceid",n="fromglobalid",r="fromterminalid",i="tonetworksourceid",a="toglobalid",l="toterminalid",s="status",m="associationtype",d="iscontentvisible",g="percentalong",u="globalid";return{fromNetworkSourceId:t?.get(o)?.name??o,fromGlobalId:t?.get(n)?.name??n,fromTerminalId:t?.get(r)?.name??r,toNetworkSourceId:t?.get(i)?.name??i,toGlobalId:t?.get(a)?.name??a,toTerminalId:t?.get(l)?.name??l,status:t?.get(s)?.name??s,associationType:t?.get(m)?.name??m,isContentVisible:t?.get(d)?.name??d,percentAlong:t?.get(g)?.name??g,globalId:t?.get(e?.globalIdField??u)?.name??u}}function t(e,t){if("feature"!==t.type&&"subtype-group"!==t.type)return[];if(!t.url)return[];const o="utilityNetworks"in e.map?e.map.utilityNetworks??[]:[];for(const n of o)if(n.isUtilityLayer(t)){const e=t.fieldsIndex.get("assetgroup"),o=t.fieldsIndex.get("assettype");return[e?.name,o?.name].filter((e=>null!=e))}return[]}export{e as getAssociationsTableFields,t as getUtilityNetworkFields};