@arcgis/portal-components 5.2.0-next.4 → 5.2.0-next.41
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/2C475EKD.js +2 -0
- package/dist/cdn/3J46PXFF.js +3 -0
- package/dist/cdn/3MBOA5WF.js +2 -0
- package/dist/cdn/{GQFWFZXP.js → 3OBIA66A.js} +1 -1
- package/dist/cdn/3Z3ZPFGJ.js +2 -0
- package/dist/cdn/5NMFQE4U.js +2 -0
- package/dist/cdn/{7WZHZP6U.js → 63THOLAY.js} +9 -3
- package/dist/cdn/6AGZRMJC.js +2 -0
- package/dist/cdn/6DYBW2C6.js +2 -0
- package/dist/cdn/6RK4FBHZ.js +2 -0
- package/dist/cdn/6W2IHKCA.js +2 -0
- package/dist/cdn/7E5GJIZV.js +2 -0
- package/dist/cdn/AL57LV4E.js +2 -0
- package/dist/cdn/{LQ3DMZ3K.js → AXM6XCZD.js} +1 -1
- package/dist/cdn/AYR65LXN.js +65 -0
- package/dist/cdn/BUJPYZSX.js +2 -0
- package/dist/cdn/{DKBTJJMW.js → C7ZFXRPS.js} +1 -1
- package/dist/cdn/D76KMXZD.js +2 -0
- package/dist/cdn/DFTUMKSN.js +3 -0
- package/dist/cdn/DZJMNZY6.js +451 -0
- package/dist/cdn/EI6BAXCQ.js +2 -0
- package/dist/cdn/EVMYGWC6.js +637 -0
- package/dist/cdn/FXIP4QXJ.js +2 -0
- package/dist/cdn/GE75KDIM.js +2 -0
- package/dist/cdn/GJTJLK6T.js +2 -0
- package/dist/cdn/GKOXTQHB.js +2 -0
- package/dist/cdn/GQMPPCEL.js +2 -0
- package/dist/cdn/GXJU3U7U.js +2 -0
- package/dist/cdn/HMBSJR37.js +2 -0
- package/dist/cdn/HZ5W3DBR.js +2 -0
- package/dist/cdn/{V2EOXGK2.js → I234NUZ5.js} +1 -1
- package/dist/cdn/I5HSJRM3.js +2 -0
- package/dist/cdn/IBP5XPD5.js +2 -0
- package/dist/cdn/IC65R4QE.js +2 -0
- package/dist/cdn/IHSJ4MKS.js +2 -0
- package/dist/cdn/IJ3CLFAU.js +22 -0
- package/dist/cdn/IWUJRI4G.js +2 -0
- package/dist/cdn/{ZTHTFEYA.js → IXVR3KMC.js} +1 -1
- package/dist/cdn/{QNUYUNEY.js → JS45DWQ3.js} +1 -1
- package/dist/cdn/{DHHSKOUY.js → JV23HJTE.js} +1 -1
- package/dist/cdn/{LAFNDBTQ.js → JYIPREIH.js} +1 -1
- package/dist/cdn/JZKBUYPV.js +2 -0
- package/dist/cdn/KM5XGRXL.js +2 -0
- package/dist/cdn/{3PAHY5KA.js → KNRJ3WXR.js} +1 -1
- package/dist/cdn/L4DRNGOL.js +2 -0
- package/dist/cdn/{F6V7MLPY.js → L6KBBJEC.js} +1 -1
- package/dist/cdn/NJ2WDAJM.js +2 -0
- package/dist/cdn/NWIIOJEG.js +2 -0
- package/dist/cdn/{53MSUMA3.js → OT4PZJNB.js} +17 -1
- package/dist/cdn/POIXW2OA.js +2 -0
- package/dist/cdn/QE4CNVDQ.js +34 -0
- package/dist/cdn/{AQWTJKUH.js → QKCV7CY2.js} +10 -8
- package/dist/cdn/RKNDXSVK.js +2 -0
- package/dist/cdn/SLTFLCVR.js +99 -0
- package/dist/cdn/SUPKZF5M.js +2 -0
- package/dist/cdn/{GT26WGJS.js → SXZRHHXC.js} +1 -1
- package/dist/cdn/TJAX7J4T.js +2 -0
- package/dist/cdn/{DXCPWJU4.js → TKCE4WYE.js} +1 -1
- package/dist/cdn/U3FVMN32.js +2 -0
- package/dist/cdn/UZLQALHY.js +2 -0
- package/dist/cdn/{RR4BIAPA.js → V4EYW3O6.js} +1 -1
- package/dist/cdn/{74XFARCV.js → VW7DSKPH.js} +1 -1
- package/dist/cdn/W2SYL7IJ.js +71 -0
- package/dist/cdn/{W6PSG4GX.js → W4FGRGLV.js} +10 -5
- package/dist/cdn/{SYJSVUUR.js → W4SAWMXS.js} +1 -1
- package/dist/cdn/WBZLQZYR.js +134 -0
- package/dist/cdn/WGZZB2DJ.js +2 -0
- package/dist/cdn/WO23VQK3.js +2 -0
- package/dist/cdn/{2UUZHENH.js → WSNLUGEP.js} +1 -1
- package/dist/cdn/WSWHK6LB.js +2 -0
- package/dist/cdn/{WOZDQW3S.js → WX65MRDH.js} +1 -1
- package/dist/cdn/XEK22IDA.js +2 -0
- package/dist/cdn/ZPIXIG3Z.js +2 -0
- package/dist/cdn/ZVFNCDG5.js +2 -0
- package/dist/cdn/assets/portal-browser/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-group-badges/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-group-card/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer16.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer32.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/storymapframe16.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/storymapframe32.svg +1 -0
- package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-user-popup/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/dom.js +36 -0
- package/dist/chunks/functionalities.js +5 -4
- package/dist/chunks/groups.js +7 -83
- package/dist/chunks/item2.js +86 -0
- package/dist/chunks/portal.js +48 -8
- package/dist/chunks/store.js +18 -0
- package/dist/chunks/ui.js +10 -0
- package/dist/chunks/user2.js +26 -25
- package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +11 -2
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +4 -2
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +797 -488
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +10 -10
- package/dist/components/arcgis-portal-browser/customElement.d.ts +235 -0
- package/dist/components/arcgis-portal-browser/customElement.js +201 -0
- package/dist/components/arcgis-portal-browser/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser/index.js +6 -0
- package/dist/components/arcgis-portal-browser/utils/store.d.ts +31 -0
- package/dist/components/arcgis-portal-browser/utils/types.d.ts +18 -0
- package/dist/components/arcgis-portal-browser-actions/customElement.d.ts +187 -0
- package/dist/components/arcgis-portal-browser-actions/customElement.js +70 -0
- package/dist/components/arcgis-portal-browser-actions/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-actions/index.js +6 -0
- package/dist/components/arcgis-portal-browser-actions/types.d.ts +9 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.d.ts +226 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.js +32 -0
- package/dist/components/arcgis-portal-browser-filter/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter/index.js +4 -0
- package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +233 -0
- package/dist/components/arcgis-portal-browser-filter-date/customElement.js +117 -0
- package/dist/components/arcgis-portal-browser-filter-date/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter-date/index.js +5 -0
- package/dist/components/arcgis-portal-browser-filter-status/customElement.d.ts +193 -0
- package/dist/components/arcgis-portal-browser-filter-status/customElement.js +56 -0
- package/dist/components/arcgis-portal-browser-filter-status/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter-status/index.js +5 -0
- package/dist/components/arcgis-portal-browser-filters/customElement.d.ts +7 -0
- package/dist/components/arcgis-portal-browser-filters/customElement.js +29 -0
- package/dist/components/arcgis-portal-browser-filters/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filters/index.js +2 -0
- package/dist/components/arcgis-portal-browser-pagination/customElement.d.ts +194 -0
- package/dist/components/arcgis-portal-browser-pagination/customElement.js +51 -0
- package/dist/components/arcgis-portal-browser-pagination/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-pagination/index.js +2 -0
- package/dist/components/arcgis-portal-browser-search/customElement.d.ts +195 -0
- package/dist/components/arcgis-portal-browser-search/customElement.js +65 -0
- package/dist/components/arcgis-portal-browser-search/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-search/index.js +3 -0
- package/dist/components/arcgis-portal-browser-sort/customElement.d.ts +196 -0
- package/dist/components/arcgis-portal-browser-sort/customElement.js +93 -0
- package/dist/components/arcgis-portal-browser-sort/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-sort/index.js +9 -0
- package/dist/components/arcgis-portal-browser-sort/utils.d.ts +3 -0
- package/dist/components/arcgis-portal-browser-top-bar/customElement.d.ts +184 -0
- package/dist/components/arcgis-portal-browser-top-bar/customElement.js +51 -0
- package/dist/components/arcgis-portal-browser-top-bar/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-top-bar/index.js +3 -0
- package/dist/components/arcgis-portal-browser-view/customElement.d.ts +21 -0
- package/dist/components/arcgis-portal-browser-view/customElement.js +30 -0
- package/dist/components/arcgis-portal-browser-view/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-view/index.js +5 -0
- package/dist/components/arcgis-portal-group-badges/customElement.d.ts +102 -0
- package/dist/components/arcgis-portal-group-badges/customElement.js +50 -0
- package/dist/components/arcgis-portal-group-badges/index.d.ts +1 -0
- package/dist/components/arcgis-portal-group-badges/index.js +3 -0
- package/dist/components/arcgis-portal-group-badges/types.d.ts +3 -0
- package/dist/components/arcgis-portal-group-card/customElement.d.ts +167 -0
- package/dist/components/arcgis-portal-group-card/customElement.js +183 -0
- package/dist/components/arcgis-portal-group-card/index.d.ts +1 -0
- package/dist/components/arcgis-portal-group-card/index.js +8 -0
- package/dist/components/arcgis-portal-group-thumbnail/customElement.d.ts +32 -0
- package/dist/components/arcgis-portal-group-thumbnail/customElement.js +153 -0
- package/dist/components/arcgis-portal-group-thumbnail/index.d.ts +1 -0
- package/dist/components/arcgis-portal-group-thumbnail/index.js +3 -0
- package/dist/components/arcgis-portal-item-type/customElement.d.ts +2 -0
- package/dist/components/arcgis-portal-item-type/customElement.js +45 -37
- package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +53 -42
- package/dist/components/arcgis-portal-user-popup/customElement.d.ts +111 -0
- package/dist/components/arcgis-portal-user-popup/customElement.js +224 -0
- package/dist/components/arcgis-portal-user-popup/index.d.ts +1 -0
- package/dist/components/arcgis-portal-user-popup/index.js +5 -0
- package/dist/components/arcgis-portal-voice-input/customElement.d.ts +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +122 -2
- package/dist/loader.js +19 -4
- package/dist/types/group.d.ts +13 -13
- package/dist/types/item.d.ts +77 -2
- package/dist/types/lumina.d.ts +93 -1
- package/dist/types/preact.d.ts +108 -1
- package/dist/types/react.d.ts +123 -1
- package/dist/types/search.d.ts +27 -0
- package/dist/types/stencil.d.ts +93 -1
- package/dist/types/tracking.d.ts +10 -0
- package/dist/types/user.d.ts +2 -2
- package/package.json +11 -11
- package/dist/cdn/5DPWJ7DI.js +0 -2
- package/dist/cdn/5VSDGPHH.js +0 -2
- package/dist/cdn/72N3KAXN.js +0 -2
- package/dist/cdn/ANPXRYLV.js +0 -5
- package/dist/cdn/B7633S2A.js +0 -422
- package/dist/cdn/BEHLBKKM.js +0 -2
- package/dist/cdn/CI5ENGVT.js +0 -2
- package/dist/cdn/EVDOPN3G.js +0 -54
- package/dist/cdn/G47ZZQYL.js +0 -2
- package/dist/cdn/GAHILDQF.js +0 -45
- package/dist/cdn/GHQ3ZW4U.js +0 -2
- package/dist/cdn/GNOZCQ34.js +0 -2
- package/dist/cdn/JNRN6DTV.js +0 -2
- package/dist/cdn/K3HS2LQ7.js +0 -2
- package/dist/cdn/KEKBRUUC.js +0 -2
- package/dist/cdn/N6G6Z7BF.js +0 -516
- package/dist/cdn/OQDPULPD.js +0 -2
- package/dist/cdn/RNLVNDGG.js +0 -2
- package/dist/cdn/SM4GWLRA.js +0 -66
- package/dist/cdn/TMYTUOSS.js +0 -2
- package/dist/cdn/YG5YYL6X.js +0 -2
- package/dist/cdn/YIMNOUTF.js +0 -2
- package/dist/cdn/YL7PGYWC.js +0 -5
- package/dist/cdn/YMPTDKT6.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as R}from"./AXM6XCZD.js";import"./IBP5XPD5.js";import"./D76KMXZD.js";import{J as c,K as d,L as S,M as F,N as V,R as M,h as C,j as l,v as y}from"./JV23HJTE.js";import"./UZLQALHY.js";export default $arcgis.t(([T,I,b,x,P,g,h,N,m,u,w,v,D,O,G,z,j,k,W,B,J])=>{var U=C`.extent-picker-modal{z-index:1001}.extent-picker-content{display:flex;min-height:100%;height:100%}.side-panel{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;overflow-y:auto;max-height:100%;width:420px}.extent-button{margin-top:var(--calcite-spacing-lg)}.use-location-header{margin-top:var(--calcite-spacing-xxxl);margin-bottom:var(--calcite-spacing-lg)}.search-container,.search-container .esri-search{width:100%}.search-container calcite-autocomplete{width:100%}.map-panel{flex:1 1 0%;position:relative;display:flex}.map-loader{position:absolute;z-index:var(--calcite-z-index-1);top:50%;left:50%;transform:translate(-50%,-50%)}.map-container{flex:1 1 0%;opacity:0;transition:opacity .3s ease}.loader-container{flex:1 1 0%}.map-container--loaded{opacity:1}.coordinates-section{margin-top:var(--calcite-spacing-lg)}`,L=class{constructor(e){this.outerRing=[[180,-90],[-180,-90],[-180,90],[180,90],[180,-90]],this.map=e}init(){this.maskSymbol=new k({color:[0,0,0,.5],outline:{color:[128,128,128,.5],width:"0px"}}),this.maskLayer=new v({id:"maskLayer "}),this.overlapLayer=new v({id:"overlapLayer"}),this.map?.add(this.maskLayer),this.map?.add(this.overlapLayer)}hide(){this.maskLayer.visible=!1}show(){this.maskLayer.visible=!0}add(e,t){let i=this.buildGraphic(e,t);if(i)return i.graphic&&this.maskLayer?.add(i.graphic),i}update(e,t,i){i?this.remove(null,i):this.clear();let a=this.buildGraphic(e,t);if(a)return a.graphic&&this.maskLayer?.add(a.graphic),a}clear(){this.maskLayer?.removeAll()}remove(e,t){!e&&!t||(t&&!e&&(e=this.maskLayer?.graphics.getItemAt(t)),e&&this.maskLayer?.remove(e))}buildGraphic(e,t=this.maskSymbol){let i={};if(!e)return i;if(e.type==="extent"&&e.xmax===e.xmin){let o=new h({rings:[this.outerRing]});return i.graphic=new u({geometry:o,symbol:t}),i}e=this.toWGS84(e);let a,s;if(e.type==="extent"){let o=this.checkPolyOverlap(e);o?(a=o?.ring?.reverse(),s=o?.oring?.reverse()):a=[[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin],[e.xmin,e.ymax]]}let r=[];e.xmin===e.xmax?r=[this.outerRing]:r=[this.outerRing,a?.reverse()||[[]]];let n=new h({rings:r});return s&&(i.overlap=s),i.graphic=new u({geometry:n,symbol:t}),i}checkPolyOverlap(e){let t={};if(e.xmax<=e.xmin){let i=[[e.xmin,e.ymin],[180,e.ymin],[180,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]],a=[[-180,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[-180,e.ymax],[-180,e.ymin]],s=180-Math.abs(e.xmax),r=180-Math.abs(e.xmin);return s>r?(t.ring=a,t.oring=i):(t.ring=i,t.oring=a),t}else return}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}};function q(p){if(!p)return;let e=b.assetsPath;e.endsWith("/")||(e+="/"),p?.firstElementChild?.insertAdjacentHTML("beforebegin",`<link rel="stylesheet" href="${e}esri/themes/light/main.css" />`)}var $=class extends S{constructor(){super(...arguments),this.polygonSymbol=new k({style:"solid",color:new I([227,139,79,0]),outline:{color:new I([65,105,255]),width:0}}),this.dlOverlapSymbol=new k({style:"solid",color:[255,0,0,.5],outline:{color:[65,105,255],width:0}}),this.messages=R(),this.searchContainer=c(),this.mapContainer=c(),this.topCoordField=c(),this.bottomCoordField=c(),this.leftCoordField=c(),this.rightCoordField=c(),this.minLatLabel="",this.maxLatLabel="",this.minLngLabel="",this.maxLngLabel="",this.ymax="0",this.ymin="0",this.xmin="0",this.xmax="0",this.isDrawStart=!1,this.loading=!0,this.active=!1,this.contentOnly=!1,this.isArea=!1,this.arcgisExtentPickerChange=y(),this.arcgisExtentPickerClose=y(),this.arcgisExtentPickerSave=y()}static{this.properties={ymax:16,ymin:16,xmin:16,xmax:16,isDrawStart:16,loading:16,featureExtent:16,initialValue:16,active:5,extentValue:0,itemId:1,portal:0,extentService:1,contentOnly:5,isArea:5}}static{this.styles=U}getExtent(){return this.getExtentValue()}async load(){if(this.itemId){if(this.portal){let t=this.portal.url.replace("/sharing/rest/","");t!==b.portalUrl&&(b.portalUrl=t)}let e=new Intl.NumberFormat(w.getLocale(),{minimumFractionDigits:1,maximumFractionDigits:1});this.minLatLabel=e.format(-90),this.maxLatLabel=e.format(90),this.minLngLabel=e.format(-180),this.maxLngLabel=e.format(180),this.item=new z({id:this.itemId,portal:this.portal}),await this.item.load()}if(this.portal&&(this.orgExtent=this.portal.defaultExtent?.toJSON()),this.portal?.region){let e=this.portal.region,t=await j(`${this.portal.url.replace("/sharing/rest/","")}/sharing/rest/portals/self?region=${e}&default=true&f=pjson`,{responseType:"json"});this.orgRegionExtent=t.data.defaultExtent}}async loaded(){q(this.el.shadowRoot),await this.initMap()}convertToNumber(e){return this.parseNumber(e)}setFeatureExtent(e){let t;e.spatialReference.isGeographic?t=new x({xmax:e.xmax,xmin:e.xmin,ymax:e.ymax,ymin:e.ymin,spatialReference:{wkid:4326}}):t=this.toWGS84(e),this.featureExtent?(this.featureExtent.xmin=Math.min(t.xmin,this.featureExtent.xmin),this.featureExtent.ymin=Math.min(t.ymin,this.featureExtent.ymin),this.featureExtent.xmax=Math.max(t.xmax,this.featureExtent.xmax),this.featureExtent.ymax=Math.max(t.ymax,this.featureExtent.ymax)):this.featureExtent=t}async initMap(){let e=new G({basemap:"streets-vector"});if(this.extentService){let t=new O({url:this.extentService}),i=new T({baseLayers:[t],id:"org_basemap"});e.basemap=i}if(this.mask=new L(e),this.mask.init(),this.dateLineLayer=new v({id:"dateLineLayer"}),e.add(this.dateLineLayer),this.areasLayer=new v({id:"areaGraphics"}),e.add(this.areasLayer),this.item?.type==="Feature Service"||this.item?.type==="Map Service"){let t=await D.fromPortalItem({portalItem:this.item});t.visible=!1,e.add(t),t.when(i=>{if("layers"in i)for(let a=0;a<i.layers.length;a++)i.layers.getItemAt(a).queryExtent().then(s=>{s.extent&&this.setFeatureExtent(s.extent)});else i.queryExtent().then(a=>{a.extent&&this.setFeatureExtent(a.extent)})})}this.view=new W({map:e,popup:{dockEnabled:!0,dockOptions:{buttonEnabled:!1,breakpoint:!1,position:"bottom-center"}},zoom:2,center:[0,0],container:this.mapContainer.value}),this.view.when(async()=>{if(this.basemapExtent=this.getBasemapExtent(),this.itemExtent=this.item?.extent,this.extentValue?.xmax!==void 0&&this.extentValue?.xmin!==void 0&&this.extentValue?.ymax!==void 0&&this.extentValue?.ymin!==void 0)this.ymin=this.extentValue?.ymin||"0",this.ymax=this.extentValue?.ymax||"0",this.xmax=this.extentValue?.xmax||"0",this.xmin=this.extentValue?.xmin||"0",this.handleInputChange(),this.initialValue=this.currentExtent;else if(this.itemExtent)await this.drawExtent(this.itemExtent),this.initialValue=this.itemExtent;else if(this.featureExtent)await this.drawExtent(this.featureExtent),this.initialValue=this.featureExtent;else if(this.portal?.defaultExtent){let t=this.portal.defaultExtent.toJSON();await this.drawExtent(t),this.initialValue=t}this.initSearchWidget(),this.loading=!1})}getBasemapExtent(){try{let e,t,i,a;if(this.view?.map?.basemap?.hasOwnProperty("baseLayers")){let s=this.view.map.basemap.baseLayers;if(s.length>0){for(let r of s){let n=r.fullExtent||{xmin:0,ymin:0,xmax:0,ymax:0};e=e!==void 0&&e>n?.xmin?e:n.xmin,i=i!==void 0&&i>n?.ymin?i:n.ymin,t=t!==void 0&&t<n.xmax?t:n.xmax,a=a!==void 0&&a<n.ymax?a:n.ymax}return new x({xmin:e,xmax:t,ymin:i,ymax:a,spatialReference:this.view.spatialReference})}}return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}catch{return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}}async drawExtent(e){if(!e||!e.xmin&&e.xmin!==0||!e.xmax&&e.xmax!==0||!e.ymin&&e.ymin!==0||!e.ymax&&e.ymax!==0)return;let t=new h;t.spatialReference=e.spatialReference,t.addRing([new g({x:e.xmin,y:e.ymin}),new g({x:e.xmin,y:e.ymax}),new g({x:e.xmax,y:e.ymax}),new g({x:e.xmax,y:e.ymin}),new g({x:e.xmin,y:e.ymin})]),await this.addInitialExtentPicker({geometry:t})}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}formatNum(e){return w.formatNumber(e,{minimumFractionDigits:6,maximumFractionDigits:6})}strippedInvalidChars(e){let t=Array.from({length:10},(i,a)=>a.toString()).join("");return Array.from(e).filter(i=>t.includes(i)||i==="."||i==="-").join("")}parseNumber(e){let t=e.replace(",",".");return t=this.strippedInvalidChars(t),parseFloat(t)}async startupSketching(e,t){if(e&&(e=this.toMap(e)),this.sketchViewModel=new J({updateOnGraphicClick:!1,layer:this.areasLayer,view:this.view,polygonSymbol:this.polygonSymbol}),this.clearAllGraphics(),!t)if(e){e.type==="extent"&&(e=h.fromExtent(e)),this.currentExtent=this.toWGS84(e?.extent?.toJSON()),this.ymax=this.formatNum(this.currentExtent.ymax),this.ymin=this.formatNum(this.currentExtent.ymin),this.xmin=this.formatNum(this.currentExtent.xmin),this.xmax=this.formatNum(this.currentExtent.xmax),this.arcgisExtentPickerChange.emit(this.getExtentValue()),e=P.intersect(e,this.basemapExtent);let i=new u({symbol:this.polygonSymbol,geometry:e});i.geometry&&(this.fallbackExtent=i.geometry.extent,this.areasLayer?.add(i),this.mask?.clear(),this.mask?.update(i.geometry.extent),await this.zoomTo(),setTimeout(async()=>{try{i.layer&&await this.sketchViewModel?.update([i],{tool:"transform",enableRotation:!1,toggleToolOnClick:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!1}})}catch{}},0))}else this.sketchViewModel.create("rectangle");this.addSketchListeners()}addSketchListeners(){this.sketchViewModel?.on("update",async e=>{if(!e.toolEventInfo)return;let t=e?.graphics?.[0]?.geometry?.extent,i=t&&this.mask?.update(t);if(e.toolEventInfo.type==="scale-stop"||e.toolEventInfo.type==="move-stop"){let a,s=parseFloat(`${t?.xmax??"0"}`).toFixed(6),r=parseFloat(`${t?.xmin??"0"}`).toFixed(6),n=parseFloat(`${t?.ymax??"0"}`).toFixed(6),o=parseFloat(`${t?.ymin??"0"}`).toFixed(6);if(s===r||n===o?(a=t,s===r&&(a.xmax+=1),n===o&&(a.ymax+=1)):a=e?.graphics?.[0]?.geometry?.extent,i?.overlap){let E=i.graphic?.geometry,A=new h({rings:[E?.rings[1]]});await this.addInitialExtentPicker({geometry:A.extent})}else await this.startupSketching(a);this.isDrawStart=!1}else if(this.dateLineLayer?.removeAll(),i?.overlap){let a=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol});this.dateLineLayer?.add(a)}}),this.sketchViewModel?.on("create",async e=>{if(this.dateLineLayer?.removeAll(),!e.graphic)return;this.mask?.clear();let t=e?.graphic?.geometry?.extent,i=this.mask?.add(t);if(i?.overlap?(this.remainderPoly=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol}),this.dateLineLayer?.add(this.remainderPoly)):this.remainderPoly=null,e.state==="complete"){let a,s=e.graphic?.geometry?.extent?.xmin||0,r=e.graphic?.geometry?.extent?.xmax||0,n=e.graphic?.geometry?.extent?.ymin||0,o=e.graphic?.geometry?.extent?.ymax||0;if(s===r||n===o)s===r&&(r=r+1),n===o&&(o=o+1),a=new x({xmin:s,xmax:r,ymin:n,ymax:o,spatialReference:e.graphic?.geometry?.extent?.spatialReference});else{let E=i?.graphic?.geometry;a=new h({rings:[E?.rings[1]]}).extent}this.remainderPoly?await this.addInitialExtentPicker({geometry:a}):await this.startupSketching(a),this.isDrawStart=!1,this.mapContainer.value.focus()}})}async addInitialExtentPicker(e){if(!e.geometry){await this.startupSketching(null,!0);return}let t=this.toMap(e.geometry);await this.startupSketching(t)}async zoomTo(){if(this.areasLayer?.graphics){let e;if(this.areasLayer.graphics.forEach(i=>{let a=i?.geometry?.extent;e=e?e.union(a):a}),!e)return;let t=this.toMap(x.fromJSON(e.toJSON()).expand(1.35));t&&await this.view?.goTo(t)}}clearAllGraphics(){this.sketchViewModel?.cancel(),this.view?.map?.layers?.forEach(e=>{e.type==="graphics"&&e.removeAll()})}toMap(e){return this.view&&m.canProject(e,this.view)?m.project(e,this.view.spatialReference):e}initSearchWidget(){let e=new B({view:this.view,popupEnabled:!1,resultGraphicEnabled:!1,container:this.searchContainer.value}),t=e.viewModel;e.viewModel.allSources.on("change",()=>{t.allSources.forEach(i=>{i.zoomScale=null})}),e.on("select-result",i=>{this.startupSketching(i.result.extent)})}getExtentValue(){return{extent:{ymin:this.normalizeDecimal(this.ymin),ymax:this.normalizeDecimal(this.ymax),xmin:this.normalizeDecimal(this.xmin),xmax:this.normalizeDecimal(this.xmax)}}}handleInputChange(){let e=this.parseNumber(this.ymin),t=this.parseNumber(this.ymax),i=this.parseNumber(this.xmin),a=this.parseNumber(this.xmax),s=new x({spatialReference:{wkid:4326},xmin:i,xmax:a,ymin:e,ymax:t});this.currentExtent=s,this.drawExtent(s)}handleSave(){if(!this.topCoordField.value.isValid()){this.topCoordField.value.setFocus();return}if(!this.bottomCoordField.value.isValid()){this.bottomCoordField.value.setFocus();return}if(!this.leftCoordField.value.isValid()){this.leftCoordField.value.setFocus();return}if(!this.rightCoordField.value.isValid()){this.rightCoordField.value.setFocus();return}this.arcgisExtentPickerSave.emit(this.getExtentValue())}normalizeDecimal(e){return e.replace(",",".")}formatLongitudeError(e){return e.replace("${minLng}",this.minLngLabel).replace("${maxLng}",this.maxLngLabel)}formatLatitudeError(e){return e.replace("${minLat}",this.minLatLabel).replace("${maxLat}",this.maxLatLabel)}async timeout(e){return await new Promise(t=>setTimeout(t,e))}renderModal(){return l`<calcite-dialog class="extent-picker-modal" role=dialog scale=l outside-close-disabled .open=${this.active} placement=cover @calciteDialogClose=${()=>{this.arcgisExtentPickerClose.emit()}} style=${V({"--calcite-dialog-content-space":"0"})} .heading=${this.isArea?this.messages.setArea:this.messages.setExtent} heading-level=3><div class="extent-picker-content">${this.renderContent()}</div>${this.initialValue&&l`<calcite-button appearance=outline slot=footer-start icon-start=reset @click=${async()=>{if(this.initialValue){let e=+this.ymin===f(this.initialValue.ymin)&&+this.ymax===f(this.initialValue.ymax);+this.xmin===f(this.initialValue.xmin)&&+this.xmax===f(this.initialValue.xmax)&&e&&(this.ymin="0",this.ymax="0",this.xmin="0",this.xmax="0",await this.timeout(100)),this.drawExtent(this.initialValue)}}}>${this.messages.revert}</calcite-button>`||""}<calcite-button appearance=outline slot=footer-end @click=${()=>this.arcgisExtentPickerClose.emit()}>${this.messages.cancel}</calcite-button><calcite-button slot=footer-end @click=${async()=>this.handleSave()}>${this.messages.save}</calcite-button></calcite-dialog>`}renderContent(){let e=!!(this.portal&&!this.portal.id),t=!!(this.orgExtent&&!e),i=!!(this.orgRegionExtent&&!e),a=!!this.featureExtent;return l`<div class="side-panel">${!(!t&&!i&&!a)&&l`<div>${this.isArea?this.messages.areaBasedOn:this.messages.extentBasedOn}</div>${t&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgExtent)}}>${this.messages.orgExtent}</calcite-button>`||""}${i&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgRegionExtent)}}>${this.messages.orgRegion}</calcite-button>`||""}${a&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=feature-layer @click=${()=>{this.drawExtent(this.featureExtent)}}>${this.messages.currentFeatures}</calcite-button>`||""}`||""}<div class="use-location-header">${this.messages.useLocation}</div><div class="search-container"><div ${d(this.searchContainer)}></div></div><div><div class="use-location-header">${this.isArea?this.messages.drawAreaTitle:this.messages.drawExtentTitle}</div><calcite-action .text=${(this.isArea?this.messages.drawArea:this.messages.drawExtent)||""} text-enabled icon=rectangle-plus .active=${this.isDrawStart} .indicator=${this.isDrawStart} @click=${async()=>{this.isDrawStart=!this.isDrawStart,this.isDrawStart?(this.sketchViewModel||await this.startupSketching(),this.clearAllGraphics(),this.sketchViewModel?.create("rectangle")):(this.sketchViewModel?.cancel(),this.startupSketching(this.fallbackExtent))}}></calcite-action></div><div class="coordinates-section"><calcite-accordion appearance=transparent icon-position=start scale=l><calcite-accordion-item .heading=${this.messages.coordinates}><p>${this.messages.coordinatesDescription}</p><arcgis-portal-extent-picker-coord-field input-id=top-coord .label=${this.messages.top} .value=${this.strippedInvalidChars(this.ymax)} .errorMessage=${this.formatLatitudeError(this.messages.invalidTop||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymax=s.detail;let r=this.bottomCoordField.value.checkRelatedField();r&&(this.ymin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.topGreaterThanBottom} .validateRelated=${s=>s>this.convertToNumber(this.ymin)} ${d(this.topCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=bottom-coord .label=${this.messages.bottom} .value=${this.strippedInvalidChars(this.ymin)} .errorMessage=${this.formatLatitudeError(this.messages.invalidBottom||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymin=s.detail;let r=this.topCoordField.value.checkRelatedField();r&&(this.ymax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.bottomLessThanTop} .validateRelated=${s=>s<this.convertToNumber(this.ymax)} ${d(this.bottomCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=left-coord .label=${this.messages.left} .value=${this.strippedInvalidChars(this.xmin)} .errorMessage=${this.formatLongitudeError(this.messages.invalidLeft||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmin=s.detail;let r=this.rightCoordField.value.checkRelatedField();r&&(this.xmax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.leftLessThanRight} .validateRelated=${s=>s<this.convertToNumber(this.xmax)} ${d(this.leftCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=right-coord .label=${this.messages.right} .value=${this.strippedInvalidChars(this.xmax)} .errorMessage=${this.formatLongitudeError(this.messages.invalidRight||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmax=s.detail;let r=this.leftCoordField.value.checkRelatedField();r&&(this.xmin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.rightGreaterThanLeft} .validateRelated=${s=>s>this.convertToNumber(this.xmin)} ${d(this.rightCoordField)}></arcgis-portal-extent-picker-coord-field></calcite-accordion-item></calcite-accordion></div></div><div class="map-panel">${this.loading&&l`<calcite-loader class="map-loader" label="Loading the application"></calcite-loader>`||""}<div class=${F({"map-container":!0,"map-container--loaded":!this.loading})} ${d(this.mapContainer)}></div></div>`}render(){return this.contentOnly?l`<div class="extent-picker-content">${this.renderContent()}</div>`:this.renderModal()}};function f(p){return Math.round(p*1e6)/1e6}M("arcgis-portal-extent-picker",$);return $},"Basemap","Color","config","geometry/Extent","geometry/geometryEngine","geometry/Point","geometry/Polygon","geometry/SpatialReference","geometry/support/webMercatorUtils","Graphic","intl","layers/GraphicsLayer","layers/Layer","layers/TileLayer","Map","portal/PortalItem","request","symbols/SimpleFillSymbol","views/MapView","widgets/Search","widgets/Sketch/SketchViewModel")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import f from"./NJ2WDAJM.js";import e from"./Q75EBGI2.js";import c from"./O3KBWLGU.js";import{a as S,b as P}from"./JS45DWQ3.js";import a from"./7E5GJIZV.js";import{a as I}from"./AXM6XCZD.js";import{a as v,e as E}from"./IBP5XPD5.js";import"./D76KMXZD.js";import{J as d,K as m,L as b,O as C,R as y,h as g,j as n}from"./JV23HJTE.js";import"./UZLQALHY.js";export default $arcgis.t(([{createArcadeExecutor:F},{watch:q},,{c:w},{a:f,b:c,c:p,d:R,e:_,f:O},{a:x,b:$}])=>{async function k({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await T(e,r,t);return{[e]:{enabled:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function T(r,t,i){let a=t?.attributes?.[r];if(!a)return!1;let{isAttributeEnabled:e}=a;return e?await h(e,JSON.stringify(t),i):!0}async function j({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await M(e,r,t);return{[e]:{valueExpressionResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function M(r,t,i){let a=t.attributes[r];if(!a)throw Error(`Attribute ${r} not found in schema`);let e=a.valueExpression,s=a.validValues,o=a.validValuesMap;return s?.length?s:o&&Object.keys(o)?.length?o:e?await h(e,t,i,r):null}async function N({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await H(e,r,t);return{[e]:{attributeValidationResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function H(r,t,i){let a=t?.attributes?.[r];if(!a)return null;let e=a?.attributeValidation;return e?await h(e,JSON.stringify(t),i,r):null}var D=async(r,t)=>{let i=r?.bannerExpression;return i?.length?await h(i,r,t):W(r,t)},W=(r,t)=>{let i=Object.entries(r.attributes).sort(([,s],[,o])=>(s?.bannerOrder??0)-(o?.bannerOrder??0)),a=[],e=[];return i.forEach(([s,o])=>{let l=t?.[s];l&&o.bannerOrder&&(a.push(U({elementType:o.uiElement??"",selectionDisplayLabel:o.bannerLabel??"",labelDelimiter:o.labelDelimiter??"",classificationProp:l,valueDelimiter:o.valueDelimiter??""})),e.push(o.attributeDelimiter??""))}),a.length>0?a.reduce((s,o,l)=>l===0?o:`${s}${e[l-1]}${o}`,""):""},U=({elementType:r,selectionDisplayLabel:t,labelDelimiter:i,classificationProp:a,valueDelimiter:e})=>{let s=r.includes("multi")&&a?a.split("").join(e):a;return`${t}${i}${s}`};async function h(r,t,i,a=""){let e={schemaJsonString:typeof t=="string"?t:JSON.stringify(t),valueJsonString:JSON.stringify(i),attributeId:a};return(await J(r)).execute(e)}async function J(r){return await F(r,{variables:[{name:"schemaJsonString",type:"text"},{name:"valueJsonString",type:"text"},{name:"attributeId",type:"text"}]})}var L=g`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-spacing-sm)}.header-section__title-container{display:flex;align-items:center;justify-content:space-between}.header-section__title-text{margin:unset;font-weight:unset;font-size:var(--calcite-font-size)}.header-section__title-popover{padding:var(--calcite-spacing-md)}.form-section{display:flex;border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);padding:var(--calcite-spacing-sm);height:100%;overflow:hidden}.form-section__sidebar{flex:1;padding:var(--calcite-spacing-sm)}.form-section__main-content{flex:3;padding:var(--calcite-spacing-sm);overflow:auto}.danger{color:var(--calcite-color-status-danger)}.spacing-y{margin:var(--calcite-spacing-md) 0}`,u=class extends b{constructor(){super(),this.classificationModel=x(this),this.messages=I(),this.formMainContentRef=d(),this.bannerRef=d(),this._classificationDataTask=$(this),this._formCreationTask=new P(this,{task:async()=>{if(await this._classificationDataTask.taskComplete,!this.portalClassificationSchema||!this.portalItem)throw new Error("Portal item and classification schema are required to render the form");let t=this.portalItem.clone();if(await t.load(),!this.primaryAttribute)throw new Error("primaryAttribute is required but was undefined.");this.existingClassification=!!t.classification,t.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),t.classification&&(t.classification.banner=await D(this.portalClassificationSchema,t.classification)),this.pendingPortalItem=t,this.cleanupItemClassificationWatchHandle(),this._itemClassificationWatchHandle=q(()=>this.portalItem.classification,i=>{if(this.pendingPortalItem){let a=this.pendingPortalItem.clone();a.load().then(()=>{a.classification=i,this.pendingPortalItem=a}).catch(e=>{console.error(e)})}}),this._itemClassificationWatchPortalItem=this.portalItem,this._itemClassificationWatchPortalItem.addHandles(this._itemClassificationWatchHandle,"arcgis-classification-config"),await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.existingClassification&&this.validateForm()},args:()=>[this.portalItem,this.portalClassificationSchema]}),this.getFormDisplayOrder=t=>this.portalClassificationSchema?.layouts.default.layoutElements[t].formDisplayOrder??0,this.addEditInfoAttributes=()=>{if(!this.pendingPortalItem?.classification)return{};let t=structuredClone(this.pendingPortalItem.classification),i=O(this.pendingPortalItem,t);return{...t,...i}},this.updateFavoriteClassification=t=>{this.favoriteClassifications=t},this.updateClassificationData=async t=>{let i=t.classification;if(this.selectedFavoriteClassificationName=t.name,this.pendingPortalItem){let a=this.pendingPortalItem.clone();if(await a.load(),a.classification=p(this.portalClassificationSchema,i),!this.portalClassificationSchema)return;await this.evaluateAttributeExpressions(this.portalClassificationSchema,a),a.classification=c(a.classification,this.attributeExpressionResults),this.pendingPortalItem=a}},this.existingClassification=!1,this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.primaryAttribute=this.classificationModel.primaryAttribute,this.attributeExpressionResults=new Map,this.formValidationErrors=[],this.remoteValidationErrors="",this.canUserConfigureClassification=!0,this.favoriteClassifications=[],this.isRequiredErrors=new Set,this.status=this.classificationModel.status,this.values={},this.valid=!1,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=E()("status","values","valid")}static{this.properties={existingClassification:16,portalClassificationSchema:16,primaryAttribute:16,attributeExpressionResults:16,formValidationErrors:16,itemClassification:16,pendingPortalItem:16,selectedCategory:16,remoteValidationErrors:16,canUserConfigureClassification:16,favoriteClassifications:16,selectedFavoriteClassificationName:16,isRequiredErrors:16,portalItem:0,status:35,values:[1,{type:Object}],valid:7,autoDestroyDisabled:5}}static{this.styles=L}async destroy(){this.cleanupItemClassificationWatchHandle(),await this.destroyManagedChildren(),await this.manager.destroy()}async resetForm(){if(this.existingClassification)this.pendingPortalItem=this.portalItem?.clone(),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.validateForm());else if(this.portalItem&&this.primaryAttribute&&this.portalClassificationSchema){let t=this.portalItem.clone();await t.load(),this.pendingPortalItem=this.portalItem?.clone(),this.pendingPortalItem.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults))}}async validateForm(){this.updateFormValidationErrors(),await this.updateRemoteValidationErrors()}async load(){try{await _(this.portalItem)||(this.canUserConfigureClassification=!1);let t=await w(this.portalItem);if(t){let{result:i,error:a}=t;if(a&&a.details.raw.messageCode!=="COM_1177"){console.error(a);return}i&&(this.favoriteClassifications=i.favorites)}}catch(t){console.error("Error occured while loading arcgis-classification-config:",t)}}willUpdate(t){if(t.has("pendingPortalItem")){let i=this.addEditInfoAttributes();this.values=i}(t.has("formValidationErrors")||t.has("remoteValidationErrors"))&&(this.valid=!this.formValidationErrors.length&&!this.remoteValidationErrors)}loaded(){let t=v(this.el,"form");t&&(this.listenOn(t,"formdata",this.updateFormData),this.listenOn(t,"submit",this.handleFormSubmit)),this.listen("submit",this.handleFormSubmit)}async updateClassificationProperty(t){if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let i=this.pendingPortalItem.clone();await i.load(),Object.entries(t??{}).forEach(([a,e])=>{if(a===this.primaryAttribute){let s=R(e,i.classification,this.primaryAttribute);s=p(this.portalClassificationSchema,s),i.classification=s}else{let s=new Map(Object.entries(i.classification??{}));if(e===void 0||e===""||Array.isArray(e)&&e.length===0)s.delete(a);else if(s.set(a,e),a==="fgi"&&!s.has("fgiOptions")){let o=this.portalClassificationSchema?.attributes?.fgiOptions?.defaultValue??[];s.set("fgiOptions",Array.isArray(o)?o:[o])}i.classification=Object.fromEntries(s)}}),i.classification&&!i.classification.fgi&&delete i.classification.fgiOptions,await this.evaluateAttributeExpressions(this.portalClassificationSchema,i),i.classification=c(i.classification,this.attributeExpressionResults),i.classification&&(i.classification.banner=await D(this.portalClassificationSchema,i.classification)),this.pendingPortalItem=i,this.existingClassification&&this.validateForm(),t&&"classification"in t&&this.updateIsRequiredErrors()}handleCategorySelectChange(t){this.selectedCategory=t.target.selectedItems[0].value}async evaluateAttributeExpressions(t,i){let a=await k({portalClassificationSchema:t,itemClassification:i.classification}),e=await j({portalClassificationSchema:t,itemClassification:i.classification}),s=await N({portalClassificationSchema:t,itemClassification:i.classification});Object.keys(t.attributes).forEach(o=>{let l=a[o]?.enabled??!0,V=e[o]?.valueExpressionResult,A=s[o]?.attributeValidationResult;this.attributeExpressionResults.set(o,{enabled:l,valueExpressionResult:V,attributeValidationResult:A})})}updateIsRequiredErrors(){let t=new Set;Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([i,a])=>{a.isRequired&&!this.pendingPortalItem?.classification?.[i]&&this.pendingPortalItem?.classification?.[i]!==0&&t.add(i)}),this.isRequiredErrors=t}updateFormValidationErrors(t=!1){let i=[];Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([a,e])=>{e.isRequired&&!this.pendingPortalItem?.classification?.[a]&&this.pendingPortalItem?.classification?.[a]!==0&&(!t||this.isRequiredErrors.has(a))&&i.push({attribute:e.label,reason:this.messages.isrequired??"is required",category:e.attributeCategory}),this.attributeExpressionResults.get(a)?.attributeValidationResult&&i.push({attribute:e.label,reason:this.attributeExpressionResults.get(a)?.attributeValidationResult??"",category:e.attributeCategory})}),this.formValidationErrors=i}async updateRemoteValidationErrors(){if(!this.pendingPortalItem?.classification)return;let t=await this.classificationModel.validateClassification(void 0,this.pendingPortalItem?.classification,this.pendingPortalItem.portal.restUrl);this.remoteValidationErrors=t}cleanupItemClassificationWatchHandle(){this._itemClassificationWatchHandle?.remove(),this._itemClassificationWatchHandle=void 0,this._itemClassificationWatchPortalItem?.removeHandles("arcgis-classification-config"),this._itemClassificationWatchPortalItem=void 0}async destroyManagedChildren(){let t=this.bannerRef.value;!t?.autoDestroyDisabled||t.manager?.destroyed||await t.destroy()}async handleFormSubmit(t){this.validateForm(),this.updateIsRequiredErrors(),this.formMainContentRef.value?.scrollIntoView()}updateFormData(t){let i=t.formData,a=this.addEditInfoAttributes();a=c(a,this.attributeExpressionResults),Object.entries(a??{}).forEach(([e,s])=>{i.set(e,s)})}renderCategoryTabs(){return this._classificationDataTask.render({complete:()=>{if(this.portalClassificationSchema?.attributeCategories?.length)return this.selectedCategory||(this.selectedCategory=this.portalClassificationSchema?.attributeCategories[0]),n`<calcite-list .label=${this.messages.selectcategory??"select category"} selection-appearance=border selection-mode=single-persist @calciteListChange=${this.handleCategorySelectChange}>${this.portalClassificationSchema.attributeCategories.map(t=>{let i=this.formValidationErrors.filter(a=>a.category===t).length;return n`<calcite-list-item .label=${t} .value=${t} .selected=${this.selectedCategory===t} .description=${i?`${i} ${i>1?this.messages.errors:this.messages.error}`:void 0}>${i&&n`<div slot=content-end class="danger"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon></div>`||""}</calcite-list-item>`})}</calcite-list>`}})}renderValidationErrors(){return this.formValidationErrors.length&&(!this.selectedCategory||this.formValidationErrors.some(t=>this.selectedCategory===t.category))?n`<calcite-notice open icon=exclamation-mark-triangle class="spacing-y" kind=danger><div slot=message>${this.messages.bannererror??"Some fields are incomplete or contain errors. Check the highlighted fields for details."}</div></calcite-notice>`:null}renderFavoriteClassification(){let t=this.portalClassificationSchema?.attributeCategories?.[0]??"Default";return this.selectedCategory=this.portalClassificationSchema?.attributeCategories?.length?this.selectedCategory:"Default",this.selectedCategory===t?n`<arcgis-portal-classification-favorite .portalItem=${this.pendingPortalItem??this.portalItem} .classificationValue=${this.pendingPortalItem?.classification} .favoriteClassifications=${this.favoriteClassifications} .selectedFavoriteClassificationName=${this.selectedFavoriteClassificationName} .attributeExpressionResults=${this.attributeExpressionResults} .resetFavoriteClassification=${i=>this.updateFavoriteClassification(i)} .updateClassificationData=${async i=>{await this.updateClassificationData(i),this.updateFormValidationErrors(),this.updateIsRequiredErrors()}}></arcgis-portal-classification-favorite>`:null}renderForm(){return this._formCreationTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,complete:()=>{if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let t=Object.entries(this.portalClassificationSchema.attributes).sort(([i],[a])=>this.getFormDisplayOrder(i)-this.getFormDisplayOrder(a));return n`${this.renderValidationErrors()}${this.renderFavoriteClassification()}${t.filter(([,{attributeCategory:i}])=>this.selectedCategory===i||!i).map(([i,a])=>{if(this.attributeExpressionResults.get(i)?.enabled===!1)return null;let e=this.pendingPortalItem?.classification?.[i];return n`<arcgis-portal-classification-form-element .attributeKey=${i} .attribute=${a} .value=${e} @arcgisAttributeValueChange=${async s=>{await this.updateClassificationProperty(s.detail),a.isRequired&&!s.detail[i]?this.isRequiredErrors.add(i):this.isRequiredErrors=new Set(Array.from(this.isRequiredErrors).filter(o=>o!==i)),this.updateFormValidationErrors(!0)}} .renderingInfo=${this.attributeExpressionResults.get(i)} .isRequiredErrors=${this.isRequiredErrors}></arcgis-portal-classification-form-element>`})}`}})}renderNotice(t,i="warning"){return n`<calcite-notice icon=exclamation-mark-triangle open class="spacing-y" .kind=${i}><div slot=message>${t}</div></calcite-notice>`}renderHelpTooltip(){return this.portalClassificationSchema?.helpTooltip?n`<calcite-action id=portal-classification-config-tooltip-button .text=${this.portalClassificationSchema?.helpTooltip} icon=information></calcite-action><calcite-popover .label=${this.portalClassificationSchema?.helpTooltip} reference-element=portal-classification-config-tooltip-button placement=bottom-end overlay-positioning=fixed auto-close><div class="header-section__title-popover"><calcite-link .href=${this.portalClassificationSchema?.helpUrl} target=_blank id=portal-classification-config-tooltip-button>${this.portalClassificationSchema?.helpTooltip}</calcite-link></div></calcite-popover>`:null}render(){return this.portalItem?this._classificationDataTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,error:()=>this.renderNotice(this.messages.anerroroccurred??"An error has occurred.","danger"),complete:()=>this.portalItem?this.canUserConfigureClassification?this.portalItem.portal.hasClassificationSchema?n`<div class="header-section" role=region aria-label=${this.messages.documentbannerpreview??"documentbannerpreview"??C}><div class="header-section__title-container"><h2 class="header-section__title-text">${this.messages.documentbannerpreview??"documentbannerpreview"}</h2>${this.renderHelpTooltip()}</div>${this._formCreationTask.status===S.COMPLETE&&n`<arcgis-portal-classification-banner .portalItem=${this.pendingPortalItem??this.portalItem} variant=preview .missingExistingClassification=${!this.existingClassification} .autoDestroyDisabled=${this.autoDestroyDisabled} ${m(this.bannerRef)}></arcgis-portal-classification-banner>`||""}</div><div class="form-section">${this.portalClassificationSchema?.attributeCategories?.length&&n`<div class="form-section__sidebar">${this.renderCategoryTabs()}</div>`||""}<div class="form-section__main-content" ${m(this.formMainContentRef)}>${this.renderForm()}</div></div>`:this.renderNotice(this.messages.missingclassificationschema??"Portal is missing classification schema."):this.renderNotice(this.messages.userconfigurepermissionrequired??"User configuration permission is required."):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}};y("arcgis-portal-classification-config",u);return u},"arcade","core/reactiveUtils",a,c,e,f)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"browser":{"refineContent":"Refine content","filters":"Filters","pageRange":"${start}-${end}, total: ${total}","pageRangeAria":"${start}-${end}, total items: ${total}","pageRangeWithRecycleBin":"${start}-${end}, total: ${total} (Total size: ${recycleBinSize})","pageRangeAriaWithRecycleBin":"${start}-${end}, total items: ${total} (Total size: ${recycleBinSize})","totalSize":"Total size: ${totalSize}","loading":"Loading results","close":"Close"},"actions":{"more":"More"},"filter":{"clear":"Clear"},"filterDate":{"today":"Today","yesterday":"Yesterday","last7":"Last 7 days","last30":"Last 30 days","never":"Never","custom":"Custom range...","title":{"created":"Date created","modified":"Date modified","joined":"Date joined","lastLogin":"Last login"},"created":"Created: ${date}","modified":"Modified: ${date}","joined":"Joined: ${date}","lastLogin":"Last login: ${date}"},"pagination":{"next":"Next page","prev":"Previous page"},"search":{"label":"Search groups","search":"Search","clear":"Clear search term","wildcard":"Wildcard searches are not supported"},"sort":{"sortDirection":"Sort direction","title":"Title","relevance":"Relevance","modified":"Date modified","deleted":"Date deleted","created":"Date created","added":"Date added","size":"Size","owner":"Owner","sizeAsc":"Smallest to largest","sizeDesc":"Largest to smallest","numviews":"View count","numAsc":"Least to most","numDesc":"Most to least","alphabeticalAsc":"Alphabetical","alphabeticalDesc":"Reverse alphabetical","recentAsc":"Least recent","recentDesc":"Most recent","sort":"Sort","sortBy":"Sort by","sortByColon":"Sort by:","fullname":"Name","username":"Username","name":"Name","membertype":"Group role","joined":"Date joined","lastlogin":"Last login","dataset":"Dataset","mfaenabled":"Multifactor authentication","description":"Description","lastSyncFailureCount":"Status","invitationsPendingCount":"Invitations pending","participantGroupLinksCount":"Organizations","defaultAsc":"Ascending","defaultDesc":"Descending"},"topBar":{"filter":"Filter"},"filterStatus":{"clear":"Clear","filters":"Filters:","additional":"Additional active filters","clearAllFilters":"Clear all filters"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"Collaboration":{"title":"Distributed","tooltip":"Items shared with this group will be sent to collaborating Enterprise organizations"},"FeaturedContent":{"title":"Featured Content","tooltip":"Items shared with this group will be featured in your organization home page"},"Gallery":{"title":"Gallery","tooltip":"Items shared with this group will be listed in your organization's gallery page"},"OpenData":{"title":"Open Data","tooltip":"Items shared with this group can be made available in your organization's Open Data sites"},"SharedUpdate":{"title":"Shared Update","tooltip":"Items shared with this group can be modified by all members of this group"},"Partnered":{"title":"Partnered","tooltip":"This group allows members from partnered collaborations and your organization only."},"AnyOrg":{"title":"Any organization","tooltip":"This group allows members from any organization."},"loading":"Loading..."}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"lastUpdated":"Last updated: ${date}","created":"Created: ${date}","viewableBy":"Viewable by: ${level}","everyone":"Everyone (public)","organization":"Organization","groupMembers":"Group members","select":"Select group: ${title}","preview":"Preview","hidePreview":"Close preview","openInPortal":"Open in portal","badges":{"collaboration":"Collaboration","viewOnly":"View only","autoJoin":"Auto join","hiddenMembers":"Hidden members"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="Icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M16,14.4004s-3.20021-1.6016-8,0c-4.79981,1.5996-8,0-8,0L2.13279,1.5996s3.20121,1.0664,5.86721,0,5.86719,0,5.86719,0l2.13281,12.8008Z" style="fill:#e5d255;"/><rect width="16" height="16" style="fill:none;"/><path d="M14.99048,8.34131c-1.40698-.74902-4.5813-2.43994-4.5813-2.43994-.14746-.07812-.30859-.11719-.46973-.11719-.16602,0-.33105.04102-.48047.12305l-5.93945,3.25781c-.27637.15137-.46582.4248-.50977.73633-.04395.3125.06152.62695.28516.84961,0,0,1.40637,1.40076,1.53906,1.53223,0,0,1.37579,1.37018,2.36621,2.35657.26184-.07104.5274-.14862.7998-.23938,2.31158-.77136,4.24646-.79742,5.63721-.61957l1.93878-1.92529-.58551-3.51422Z" style="fill:#f8f8f8;"/><polygon points="12.38702 8.09155 11.62134 7.68365 7.88269 10.07214 8.72888 10.76105 12.38702 8.09155" style="fill:#49b0f2;"/><polygon points="5.53137 11.57428 6.41223 12.4516 7.89398 11.3703 6.99554 10.63892 5.53137 11.57428" style="fill:#49b0f2;"/><polygon points="10.60944 7.14459 9.93219 6.78381 3.99249 10.04181 4.80609 10.85205 10.60944 7.14459" style="fill:#49b0f2;"/><polygon points="15.17242 9.57544 8.88586 14.91492 9.9754 16 16 10.0163 15.17242 9.57544" style="fill:#49b0f2;"/><polygon points="12.31567 10.69019 11.35278 10.08533 7.13031 13.16663 8.17499 14.20703 12.31567 10.69019" style="fill:#49b0f2;"/><polygon points="14.22339 9.06982 13.36847 8.61438 12.22321 9.45013 13.1156 10.01074 14.22339 9.06982" style="fill:#49b0f2;"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="Icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M31,28s-6-3-15,0-15,0-15,0L5,4s6,2,11,0,11,0,11,0l4,24Z" style="fill:#e5d255;"/><rect width="32" height="32" style="fill:none;"/><path d="M29.73755,20.42542l-6.49146-3.46643-.19629-.08984c-.13184-.06055-.27441-.09082-.41602-.09082-.16602,0-.33203.04102-.48145.12402l-8.73242,4.7998c-.27637.15137-.46484.42383-.50879.73633-.04395.31152.06152.62598.28418.84766,0,0,2.30957,2.30176,2.41602,2.4082l1.86823,1.86279c4.74701-1.29248,8.53192-.93597,10.87781-.40656l2.14587-2.13104-.76569-4.59412Z" style="fill:#f8f8f8;"/><path d="M21.34817,30.00252l9.06036-8.08613,1.16946.6252-8.87434,8.81259-1.35549-1.35165ZM19.44496,28.10469l4.96705-3.98898,1.09352.66739-5.00541,4.37407-1.05516-1.05248ZM17.78148,26.44696l2.08424-1.50891,1.1127.74563-2.20622,1.75055-.99073-.98727ZM16.31783,24.98638l6.94697-4.50985.77977.45336-6.90938,4.87193-.81736-.81544ZM20.6758,24.36655l6.20517-4.33418.79741.42575-5.91137,4.63796-1.09122-.72952ZM15.01566,23.68842l4.62224-2.67569.78782.40043-4.71736,2.96566-.6927-.6904ZM25.09935,23.54344l3.34883-2.67415.90251.48175-3.20461,2.85979-1.04672-.66739ZM13.90181,22.57764l8.73242-4.79905.19561.08975.38317.20482-8.80108,5.01385-.51013-.50936ZM20.45832,20.55323l3.508-2.07811.61599.32909-3.41787,2.14024-.70613-.39123ZM23.97361,20.02546l1.32979-.83615.71303.38125-1.29105.86991-.75177-.41501Z" style="fill:#49b0f2;"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="Icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M16,2.48999v9.97998c-4.17999-.76001-4.29999-.70001-6,.96002,0,0-.32001.34998-.5.51001-.17999-.16003-.5-.51001-.5-.51001-1.70001-1.66003-1.82001-1.72003-6-.96002V2.48999c5.22998-1.13,5.62.13,6.5.71002.88-.58002,1.27002-1.84003,6.5-.71002Z" style="fill:#6e6e6e;"/><path d="M16,2.48999c-2.71283-.58612-4.11847-.52734-4.9707-.25586-.01062.099-.0293.19397-.0293.2981v.79401c-.18683.10175-.33374.22351-.48999.35376-.15002.13-.29999.25-.46002.35999l-.54999.35999-.54999-.35999c-.16003-.10999-.31-.22998-.46002-.35999-.41998-.35004-.77002-.64001-2.02002-.64001-.65997,0-1.48999.09003-2.46997.27002v4.69h-1v4.46997c3.21002-.57996,4.03003-.67999,5,.04999v-1.16998c.53003.26001.97998.66998,1.5,1.16998.95001-.91998,1.65002-1.56995,3.12-1.56995.62,0,1.35999.08002,2.38.25v-1.7854l1-1.00146V2.48999Z" style="fill:#f8f8f8;"/><path d="M14,1c-1.1044,0-2,.42515-2,1.53207v4.46468l2,2.00326,2-2.00326V2.53207c0-1.10691-.8956-1.53207-2-1.53207Z" style="fill:#47a898;"/><rect x="13" y="2" width="2" height="2" rx=".75" ry=".75" style="fill:#f8f8f8;"/><path d="M9.41669,3.24298c-.14819,0-.28241-.02075-.41669-.04132v9.92139h1V3.17865c-.18134.04016-.37433.06433-.58331.06433Z" style="fill:#6e6e6e;"/><path d="M9,13.42999s.32001.34998.5.51001c.17999-.16003.5-.51001.5-.51001.39539-.38611.70459-.68231,1-.90509v-3.5249c0-1.10254-.89746-2-2-2h-.26855c-.3457-.59766-.99219-1-1.73145-1H3v6.46997c4.17999-.76001,4.29999-.70001,6,.96002Z" style="fill:#f8f8f8;"/><rect x="1.5" y="6.49999" width="7.00001" height="10" rx="1" ry="1" transform="translate(-6.49999 16.49995) rotate(-89.99982)" style="fill:#6e6e6e;"/><rect x="2.49998" y="7.49997" width="5.00003" height="8" transform="translate(16.49997 6.49997) rotate(90)" style="fill:#ccc;"/><rect x=".50001" y="8.5" width="8.99998" height="5.99998" rx="1" ry="1" transform="translate(-6.50001 16.49997) rotate(-89.99987)" style="fill:#6e6e6e;"/><rect x="1.5" y="9.49998" width="7" height="4" transform="translate(16.49998 6.49998) rotate(90)" style="fill:#f8f8f8;"/><rect x="4" y="8.99998" width="2" height="1" style="fill:#47a898;"/><rect width="16" height="16" style="fill:none;"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="Icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M18.5,6.80002c-1.35683-.86819-3.47396-2.76096-11.5-1.06494v17.78101c6.41176-1.13498,8.12927-1.04938,10.73333,1.44745,0,0,.49788.5181.76667.76859.26878-.25049.76667-.76859.76667-.76859,2.60406-2.49683,4.32158-2.58243,10.73333-1.44745V5.73508c-8.02604-1.69601-10.14317.19675-11.5,1.06494Z" style="fill:#6e6e6e;"/><path d="M30,5.73505c-4.65527-.9837-7.31586-.76581-9-.23505v1.06409c-.73499.27087-1.24457.60431-1.67236.88904l-.82764.53418-.82715-.53418c-.88965-.59082-2.10742-1.40039-5.04639-1.40039-1.32373,0-2.87695.16797-4.62646.50195v15.77344c1.88379-.31445,3.43213-.5127,4.6958-.5127,2.3623,0,3.86133.63477,5.7583,2.45508.00049.00098.01709.01855.0459.04785.04102-.04199.06787-.06934.07471-.07617,1.86816-1.79199,3.36719-2.42676,5.72949-2.42676,1.26367,0,2.81201.19824,4.6958.5127v-6.77374l1-.93896V5.73505Z" style="fill:#f8f8f8;"/><path d="M26,2c-2.2088,0-4,.79716-4,2.87263v8.37127l4,3.75611,4-3.75611V4.87263c0-2.07546-1.7912-2.87263-4-2.87263Z" style="fill:#47a898;"/><path d="M26,9c-1.10457,0-2-.89543-2-2s.89543-2,2-2,2,.89543,2,2v.0009c-.00004,1.10412-.89514,1.99914-1.99926,1.9991-.00025,0-.00049,0-.00074,0Z" style="fill:#fff;"/><path d="M18.41669,6.86447c-.14819,0-.28241-.03113-.41669-.06198v17.69751h1V6.76797c-.18134.06024-.37433.0965-.58331.0965Z" style="fill:#6e6e6e;"/><path d="M14.18164,17h-1.18164c0-1.10254-.89746-2-2-2h-4v8.51605c4.92981-.87262,7.08362-1.01843,9,.0932v-4.79089c0-1.00293-.81543-1.81836-1.81836-1.81836Z" style="fill:#f8f8f8;"/><rect x="-.00003" y="17.99997" width="15.00003" height="11.99997" rx=".81817" ry=".81817" style="fill:#6e6e6e;"/><rect width="32" height="32" style="fill:none;"/><rect x="2.49998" y="17.49997" width="10" height="13.00003" transform="translate(31.49997 16.5) rotate(90)" style="fill:#ccc;"/><rect x="-.49998" y="19.49998" width="15.99996" height="9.00003" rx="1" ry="1" transform="translate(-16.50001 31.49993) rotate(-89.99985)" style="fill:#6e6e6e;"/><rect x="3.99997" y="16.99998" width="7.00006" height="14" style="fill:#f8f8f8;"/><rect x="5" y="18.99998" width="5" height="1" style="fill:#47a898;"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"hosted":"hosted","hostedView":"hosted, view","hostedPhotos":"hosted, photos","hostedCollection":"hosted, collection","hostedMultidimensional":"hosted, multidimensional","hostedCollectionMultidimensional":"hosted, collection, multidimensional","collectionMultidimensional":"collection, multidimensional","multidimensional":"multidimensional","collection":"collection","photoLocations":"photos","locatorView":"view","utilityNetwork":"utility network","parcelFabric":"parcel fabric","parcelFabricHosted":"parcel fabric, hosted","Integrated Mesh":"integrated mesh","3D Object":"3D object","Point":"point","Point Cloud":"point cloud","Building Scene Layer":"building scene layer","Voxel Scene Layer":"voxel scene layer","dataStore":{"bigdata":"big data file share","cloud":"cloud","cloudStorage":"cloud storage","database":"database","folder":"folder"}}
|
|
1
|
+
{"hosted":"hosted","hostedView":"hosted, view","hostedPhotos":"hosted, photos","hostedCollection":"hosted, collection","hostedMultidimensional":"hosted, multidimensional","hostedCollectionMultidimensional":"hosted, collection, multidimensional","collectionMultidimensional":"collection, multidimensional","multidimensional":"multidimensional","query":"query","collection":"collection","photoLocations":"photos","locatorView":"view","utilityNetwork":"utility network","parcelFabric":"parcel fabric","parcelFabricHosted":"parcel fabric, hosted","Integrated Mesh":"integrated mesh","3D Object":"3D object","Point":"point","Point Cloud":"point cloud","Building Scene Layer":"building scene layer","Voxel Scene Layer":"voxel scene layer","dataStore":{"bigdata":"big data file share","cloud":"cloud","cloudStorage":"cloud storage","database":"database","folder":"folder"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"expand":"Expand","showLess":"Show less","homepage":"Home page","gallery":"Gallery","profile":"Profile","groups":"Groups (${number})","items":"Items (${number})","viewAll":"View all","loadingUserInformation":"Loading user information","itemManagedBy":"Item managed by: ${username}"}
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{Q as r,z as e}from"./JV23HJTE.js";import"./UZLQALHY.js";var a=e(r,{"arcgis-portal-ai-assistant":[()=>import("./EVMYGWC6.js"),"autoDestroyDisabled,config:,defaultClosed,navigationTargetMap:,portal:,t9n:,user:"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./AYR65LXN.js"),"_messages:,message,options:,type"],"arcgis-portal-browser":[()=>import("./3MBOA5WF.js"),"_messages:,alwaysShowContent,alwaysShowPagination,alwaysShowSelection,api,formFactor,height,hideContentTop,hideFilters,hideTopBar,loading,panel,preview,rangeFormatter:,response:,searchTerm,selected:,showPreSearch,store:;scrollToTop"],"arcgis-portal-browser-actions":[()=>import("./IWUJRI4G.js"),"_messages:,actions:,selection:;restoreFocus"],"arcgis-portal-browser-filter":[()=>import("./IHSJ4MKS.js"),"_messages:,active,clearDisabled,expanded,filterId,heading,noPadding,primary"],"arcgis-portal-browser-filter-date":[()=>import("./IC65R4QE.js"),"_messages:,end,expanded,includeNever,property,range,serverProperty,start,store:"],"arcgis-portal-browser-filter-status":[()=>import("./EI6BAXCQ.js"),"_messages:,browserWidth,componentWidth,filters:,hiddenFilterIds:"],"arcgis-portal-browser-filters":[()=>import("./GE75KDIM.js"),"store:"],"arcgis-portal-browser-pagination":[()=>import("./6DYBW2C6.js"),"_messages:,num,start,store:,total;nextPage"],"arcgis-portal-browser-search":[()=>import("./6RK4FBHZ.js"),"_messages:,allowClear,placeholder,store:,term;setFocus"],"arcgis-portal-browser-sort":[()=>import("./3Z3ZPFGJ.js"),"_messages:,appearance,field,options:,order,showText,useDeleted"],"arcgis-portal-browser-top-bar":[()=>import("./I5HSJRM3.js"),"_messages:,filtersDisabled,store:"],"arcgis-portal-browser-view":[()=>import("./JZKBUYPV.js"),"options:,store:,view,viewText"],"arcgis-portal-classification-banner":[()=>import("./L4DRNGOL.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./ZVFNCDG5.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./GQMPPCEL.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./RKNDXSVK.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-extent-picker":[()=>import("./ZPIXIG3Z.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./WGZZB2DJ.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./FXIP4QXJ.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-group-badges":[()=>import("./HZ5W3DBR.js"),"_messages:,appearance,empty,group:,portal:,scale,showTooltips,width"],"arcgis-portal-group-card":[()=>import("./5NMFQE4U.js"),"disabled,group:,indeterminate,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,selected,selection,showBadges,showDateCreated,showDateUpdated,showOwner,showSummary,showViewableBy,user:,view;restoreFocus"],"arcgis-portal-group-thumbnail":[()=>import("./TJAX7J4T.js"),"group:,portal:,scale,tooltip"],"arcgis-portal-item-type":[()=>import("./2C475EKD.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./SUPKZF5M.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-replacement-item-redirect":[()=>import("./GXJU3U7U.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-user-avatar":[()=>import("./BUJPYZSX.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-user-popup":[()=>import("./3J46PXFF.js"),"appearance,avatarAriaHidden,baseUrl,checkOnline,fullName,item:,messages:,portal:,scale,showAvatar,showName,showUsername,underline,user:,username,wrap,zIndex;openPopup,setFocus"],"arcgis-portal-voice-input":[()=>import("./IXVR3KMC.js"),"language;clearText,startListening,stopListening"]});a({resourcesUrl:import.meta.url});var s=new CSSStyleSheet;s.replaceSync("@layer{:not([hydrated]):is(arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-browser,arcgis-portal-browser-actions,arcgis-portal-browser-filter,arcgis-portal-browser-filter-date,arcgis-portal-browser-filter-status,arcgis-portal-browser-filters,arcgis-portal-browser-pagination,arcgis-portal-browser-search,arcgis-portal-browser-sort,arcgis-portal-browser-top-bar,arcgis-portal-browser-view,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-group-badges,arcgis-portal-group-card,arcgis-portal-group-thumbnail,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-replacement-item-redirect,arcgis-portal-user-avatar,arcgis-portal-user-popup,arcgis-portal-voice-input){visibility:hidden}}");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,r)
|
package/dist/cdn/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer{:not([hydrated]):is(arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-replacement-item-redirect,arcgis-portal-user-avatar,arcgis-portal-voice-input){visibility:hidden}}
|
|
1
|
+
@layer{:not([hydrated]):is(arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-browser,arcgis-portal-browser-actions,arcgis-portal-browser-filter,arcgis-portal-browser-filter-date,arcgis-portal-browser-filter-status,arcgis-portal-browser-filters,arcgis-portal-browser-pagination,arcgis-portal-browser-search,arcgis-portal-browser-sort,arcgis-portal-browser-top-bar,arcgis-portal-browser-view,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-group-badges,arcgis-portal-group-card,arcgis-portal-group-thumbnail,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-replacement-item-redirect,arcgis-portal-user-avatar,arcgis-portal-user-popup,arcgis-portal-voice-input){visibility:hidden}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { Sanitizer as c } from "@esri/arcgis-html-sanitizer";
|
|
3
|
+
function a(n) {
|
|
4
|
+
return new c().sanitize(n);
|
|
5
|
+
}
|
|
6
|
+
function d(n) {
|
|
7
|
+
const e = a(n), t = document.createElement("div");
|
|
8
|
+
return t.innerHTML = e, t.textContent || t.innerText || "";
|
|
9
|
+
}
|
|
10
|
+
function m(n, e) {
|
|
11
|
+
let t = n;
|
|
12
|
+
for (; t; ) {
|
|
13
|
+
if (t.matches?.(e))
|
|
14
|
+
return t;
|
|
15
|
+
const i = t.closest(e);
|
|
16
|
+
if (i)
|
|
17
|
+
return i;
|
|
18
|
+
const o = t.getRootNode?.();
|
|
19
|
+
t = o instanceof ShadowRoot ? o.host : t.parentElement;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const s = document.createElement("canvas").getContext("2d"), r = {}, h = ({ text: n, font: e }) => {
|
|
23
|
+
if (e && (r[e] = r[e] || {}, r[e][n]))
|
|
24
|
+
return r[e][n];
|
|
25
|
+
if (!s)
|
|
26
|
+
return n.length * 8;
|
|
27
|
+
s.font = e || "14px 'Avenir Next'";
|
|
28
|
+
const t = s.measureText(n);
|
|
29
|
+
return e && (r[e][n] = t.width), t.width;
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
a,
|
|
33
|
+
m as c,
|
|
34
|
+
h as g,
|
|
35
|
+
d as s
|
|
36
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const t = (e) => {
|
|
3
3
|
throw new Error(`Unexpected value: ${e}`);
|
|
4
4
|
}, a = async (e) => {
|
|
5
|
-
await new Promise((
|
|
6
|
-
};
|
|
5
|
+
await new Promise((s) => setTimeout(s, e));
|
|
6
|
+
}, n = (e, s) => e.includes(s);
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
t as a,
|
|
9
|
+
n as i,
|
|
9
10
|
a as t
|
|
10
11
|
};
|
package/dist/chunks/groups.js
CHANGED
|
@@ -1,86 +1,10 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
|
|
3
|
-
import { g as a } from "./portal.js";
|
|
4
|
-
const l = async (o, t, e) => {
|
|
5
|
-
try {
|
|
6
|
-
return { result: await o.queryItems({ ...e, query: `title:${t}` }) };
|
|
7
|
-
} catch (r) {
|
|
8
|
-
return console.error(r), { error: { code: "unhandledError" } };
|
|
9
|
-
}
|
|
10
|
-
}, p = async (o, t, e) => {
|
|
11
|
-
const r = `${t.restUrl}/content/users/${o.id}/items/${e}/generateContext`;
|
|
12
|
-
try {
|
|
13
|
-
return {
|
|
14
|
-
result: (await n(r, {
|
|
15
|
-
method: "post",
|
|
16
|
-
responseType: "json",
|
|
17
|
-
query: { f: "json" }
|
|
18
|
-
})).data
|
|
19
|
-
};
|
|
20
|
-
} catch (s) {
|
|
21
|
-
return console.error("Error fetching item context:", s), { error: { code: "unhandledError" } };
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
async function m(o, t = {}) {
|
|
25
|
-
return await o.queryGroups(t);
|
|
26
|
-
}
|
|
27
|
-
async function g(o, t) {
|
|
28
|
-
const e = t.title.trim();
|
|
29
|
-
if (!e)
|
|
30
|
-
return { error: { code: "unhandledError", message: "Group title is required." } };
|
|
31
|
-
try {
|
|
32
|
-
const { data: r } = await n(`${a(o)}community/createGroup`, {
|
|
33
|
-
method: "post",
|
|
34
|
-
responseType: "json",
|
|
35
|
-
query: {
|
|
36
|
-
f: "json",
|
|
37
|
-
...t,
|
|
38
|
-
title: e
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
return !r.success || !r.group?.id ? {
|
|
42
|
-
error: {
|
|
43
|
-
code: "unhandledError",
|
|
44
|
-
message: "Unable to create a group with the provided title."
|
|
45
|
-
}
|
|
46
|
-
} : {
|
|
47
|
-
result: {
|
|
48
|
-
id: r.group.id,
|
|
49
|
-
title: r.group.title || e
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
} catch (r) {
|
|
53
|
-
return console.error("Error creating portal group:", r), {
|
|
54
|
-
error: {
|
|
55
|
-
code: "unhandledError",
|
|
56
|
-
message: r.details.messages.join(",")
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
async function y(o, t, e) {
|
|
62
|
-
if (!e.length)
|
|
63
|
-
return { error: { code: "unhandledError", message: "At least one username is required." } };
|
|
64
|
-
try {
|
|
65
|
-
const { data: r } = await n(
|
|
66
|
-
`${a(o)}community/groups/${t}/addUsers`,
|
|
67
|
-
{
|
|
68
|
-
method: "post",
|
|
69
|
-
responseType: "json",
|
|
70
|
-
query: { f: "json", users: e.join(",") }
|
|
71
|
-
}
|
|
72
|
-
), s = r.notAdded;
|
|
73
|
-
return {
|
|
74
|
-
result: { addedUsernames: s?.length ? e.filter((d) => !s.includes(d)) : e, notAddedUsers: r.notAddedDetails }
|
|
75
|
-
};
|
|
76
|
-
} catch (r) {
|
|
77
|
-
return console.error("Error adding users to portal group:", r), { error: { code: "unhandledError" } };
|
|
78
|
-
}
|
|
79
|
-
}
|
|
2
|
+
const e = (s) => s.sourceJSON, t = (s) => e(s)?.capabilities ?? [], i = (s) => e(s).orgId, o = (s) => e(s).membershipAccess, a = (s) => e(s).isOpenData === !0, r = (s) => t(s).includes("distributed");
|
|
80
3
|
export {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
4
|
+
i as a,
|
|
5
|
+
o as b,
|
|
6
|
+
e as c,
|
|
7
|
+
r as d,
|
|
8
|
+
t as g,
|
|
9
|
+
a as i
|
|
86
10
|
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import n from "@arcgis/core/request.js";
|
|
3
|
+
import { g as a } from "./portal.js";
|
|
4
|
+
async function l(o, t = {}) {
|
|
5
|
+
return await o.queryGroups(t);
|
|
6
|
+
}
|
|
7
|
+
async function p(o, t) {
|
|
8
|
+
const e = t.title.trim();
|
|
9
|
+
if (!e)
|
|
10
|
+
return { error: { code: "unhandledError", message: "Group title is required." } };
|
|
11
|
+
try {
|
|
12
|
+
const { data: r } = await n(`${a(o)}community/createGroup`, {
|
|
13
|
+
method: "post",
|
|
14
|
+
responseType: "json",
|
|
15
|
+
query: {
|
|
16
|
+
f: "json",
|
|
17
|
+
...t,
|
|
18
|
+
title: e
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return !r.success || !r.group?.id ? {
|
|
22
|
+
error: {
|
|
23
|
+
code: "unhandledError",
|
|
24
|
+
message: "Unable to create a group with the provided title."
|
|
25
|
+
}
|
|
26
|
+
} : {
|
|
27
|
+
result: {
|
|
28
|
+
id: r.group.id,
|
|
29
|
+
title: r.group.title || e
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
} catch (r) {
|
|
33
|
+
return console.error("Error creating portal group:", r), {
|
|
34
|
+
error: {
|
|
35
|
+
code: "unhandledError",
|
|
36
|
+
message: r.details.messages.join(",")
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function m(o, t, e) {
|
|
42
|
+
if (!e.length)
|
|
43
|
+
return { error: { code: "unhandledError", message: "At least one username is required." } };
|
|
44
|
+
try {
|
|
45
|
+
const { data: r } = await n(
|
|
46
|
+
`${a(o)}community/groups/${t}/addUsers`,
|
|
47
|
+
{
|
|
48
|
+
method: "post",
|
|
49
|
+
responseType: "json",
|
|
50
|
+
query: { f: "json", users: e.join(",") }
|
|
51
|
+
}
|
|
52
|
+
), s = r.notAdded;
|
|
53
|
+
return {
|
|
54
|
+
result: { addedUsernames: s?.length ? e.filter((d) => !s.includes(d)) : e, notAddedUsers: r.notAddedDetails }
|
|
55
|
+
};
|
|
56
|
+
} catch (r) {
|
|
57
|
+
return console.error("Error adding users to portal group:", r), { error: { code: "unhandledError" } };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const g = async (o, t, e) => {
|
|
61
|
+
try {
|
|
62
|
+
return { result: await o.queryItems({ ...e, query: `title:${t}` }) };
|
|
63
|
+
} catch (r) {
|
|
64
|
+
return console.error(r), { error: { code: "unhandledError" } };
|
|
65
|
+
}
|
|
66
|
+
}, y = async (o, t, e) => {
|
|
67
|
+
const r = `${t.restUrl}/content/users/${o.id}/items/${e}/generateContext`;
|
|
68
|
+
try {
|
|
69
|
+
return {
|
|
70
|
+
result: (await n(r, {
|
|
71
|
+
method: "post",
|
|
72
|
+
responseType: "json",
|
|
73
|
+
query: { f: "json" }
|
|
74
|
+
})).data
|
|
75
|
+
};
|
|
76
|
+
} catch (s) {
|
|
77
|
+
return console.error("Error fetching item context:", s), { error: { code: "unhandledError" } };
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
m as a,
|
|
82
|
+
p as c,
|
|
83
|
+
y as g,
|
|
84
|
+
l as q,
|
|
85
|
+
g as s
|
|
86
|
+
};
|
package/dist/chunks/portal.js
CHANGED
|
@@ -1,16 +1,56 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
return
|
|
2
|
+
const s = (e) => e && !e.endsWith("/") ? `${e}/` : e;
|
|
3
|
+
function i(e) {
|
|
4
|
+
return s(e.restUrl);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function p(e) {
|
|
7
7
|
return e.credential?.token || e.token || e.user?.credential?.token || e.portalUser?.token || "";
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function c(e) {
|
|
10
10
|
return e.sourceJSON?.isWebTierAuth;
|
|
11
11
|
}
|
|
12
|
+
function a(e, r, t) {
|
|
13
|
+
if (!r?.type)
|
|
14
|
+
return !1;
|
|
15
|
+
const n = r.typeKeywords ?? [];
|
|
16
|
+
switch (e) {
|
|
17
|
+
case "arcgisinstantapps":
|
|
18
|
+
return r.type === "Web Mapping Application" && n.includes("configurableApp");
|
|
19
|
+
case "arcgis360vr":
|
|
20
|
+
return !t && r.type === "360 VR Experience";
|
|
21
|
+
case "survey123":
|
|
22
|
+
return r.type === "Form";
|
|
23
|
+
case "datapipelines":
|
|
24
|
+
return r.type === "Data Pipeline";
|
|
25
|
+
case "dashboards":
|
|
26
|
+
return r.type === "Dashboard";
|
|
27
|
+
case "experienceBuilder":
|
|
28
|
+
return r.type === "Web Experience" || r.type === "Web Experience Template";
|
|
29
|
+
case "webappbuilder":
|
|
30
|
+
return r.type === "Web Mapping Application" && (n.includes("Web AppBuilder") || n.includes("WebAppBuilder"));
|
|
31
|
+
case "fieldmaps":
|
|
32
|
+
return r.type === "Web Map";
|
|
33
|
+
case "arcgisnotebooks":
|
|
34
|
+
return r.type === "Notebook";
|
|
35
|
+
case "HubforArcGIS":
|
|
36
|
+
return [
|
|
37
|
+
"Discussion",
|
|
38
|
+
"Hub Page",
|
|
39
|
+
"Hub Initiative Template",
|
|
40
|
+
"Hub Initiative",
|
|
41
|
+
"Hub Event",
|
|
42
|
+
"Hub Project"
|
|
43
|
+
].includes(r.type);
|
|
44
|
+
default:
|
|
45
|
+
return !1;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function u(e, r, t) {
|
|
49
|
+
return (r ?? []).some((n) => a(n, e, t));
|
|
50
|
+
}
|
|
12
51
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
i
|
|
52
|
+
p as a,
|
|
53
|
+
u as b,
|
|
54
|
+
i as g,
|
|
55
|
+
c as i
|
|
16
56
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { watch as o } from "@arcgis/core/core/reactiveUtils.js";
|
|
3
|
+
import { createStore as s } from "@arcgis/lumina/controllers/accessor";
|
|
4
|
+
const a = ["folder", "group", "contentType"], c = (e) => e.type === "item-browser", m = (e = {}) => s({
|
|
5
|
+
filters: {},
|
|
6
|
+
hiddenFilters: [],
|
|
7
|
+
...e
|
|
8
|
+
});
|
|
9
|
+
function l(e, r) {
|
|
10
|
+
const t = o(() => e.preview, r);
|
|
11
|
+
return () => t.remove();
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
c as a,
|
|
15
|
+
m as c,
|
|
16
|
+
a as i,
|
|
17
|
+
l as o
|
|
18
|
+
};
|
package/dist/chunks/user2.js
CHANGED
|
@@ -3,28 +3,28 @@ import { i as C, a as b, g as w } from "./portal.js";
|
|
|
3
3
|
import E from "@arcgis/core/identity/IdentityManager.js";
|
|
4
4
|
import A from "@arcgis/core/request.js";
|
|
5
5
|
const u = {}, f = {}, l = {};
|
|
6
|
-
async function p({ requester: t, key: e, id:
|
|
7
|
-
const r = l[e]?.[
|
|
8
|
-
if (u[e]?.[
|
|
9
|
-
return u[e][
|
|
10
|
-
f[e] || (f[e] = {}), (!f[e][
|
|
11
|
-
const o = await f[e][
|
|
12
|
-
if (u[e] || (u[e] = {}), l[e] || (l[e] = {}), u[e][
|
|
13
|
-
const { expireAfter: a, getExpireAfterFromResult: c } =
|
|
14
|
-
l[e][
|
|
6
|
+
async function p({ requester: t, key: e, id: s, cacheOption: n }) {
|
|
7
|
+
const r = l[e]?.[s]?.expireAt, i = !!r && (/* @__PURE__ */ new Date()).getTime() > r;
|
|
8
|
+
if (u[e]?.[s] && !i)
|
|
9
|
+
return u[e][s];
|
|
10
|
+
f[e] || (f[e] = {}), (!f[e][s] || i) && (f[e][s] = t());
|
|
11
|
+
const o = await f[e][s];
|
|
12
|
+
if (u[e] || (u[e] = {}), l[e] || (l[e] = {}), u[e][s] = o, n) {
|
|
13
|
+
const { expireAfter: a, getExpireAfterFromResult: c } = n, h = c || a ? (/* @__PURE__ */ new Date()).getTime() + (c?.(o) ?? a ?? 0) : null;
|
|
14
|
+
l[e][s] = { ...l[e][s], expireAt: h };
|
|
15
15
|
}
|
|
16
16
|
return o;
|
|
17
17
|
}
|
|
18
18
|
async function x({
|
|
19
19
|
url: t,
|
|
20
20
|
portal: e,
|
|
21
|
-
params:
|
|
22
|
-
options:
|
|
21
|
+
params: s = {},
|
|
22
|
+
options: n = {},
|
|
23
23
|
method: r,
|
|
24
24
|
abortControllerId: i,
|
|
25
25
|
excludeJson: o
|
|
26
26
|
}) {
|
|
27
|
-
const a = R(i)?.signal, { customToken: c, addTokenManually: h, addSSL: P, useProxy: S } =
|
|
27
|
+
const a = R(i)?.signal, { customToken: c, addTokenManually: h, addSSL: P, useProxy: S } = n, m = { ...s };
|
|
28
28
|
if (!t.includes("f=") && !o && (m.f = "json"), c)
|
|
29
29
|
m.token = c;
|
|
30
30
|
else if (h !== !1) {
|
|
@@ -34,10 +34,10 @@ async function x({
|
|
|
34
34
|
const T = P ? U(t, e) : t, q = {
|
|
35
35
|
query: m,
|
|
36
36
|
method: r || "auto",
|
|
37
|
-
...
|
|
38
|
-
timeout:
|
|
37
|
+
...n,
|
|
38
|
+
timeout: n.timeout || 0,
|
|
39
39
|
useProxy: S,
|
|
40
|
-
...
|
|
40
|
+
...n?.disableIdentityLookup ? { authMode: "anonymous" } : {}
|
|
41
41
|
}, y = await A(T, { signal: a, ...q });
|
|
42
42
|
return i && (d[i] = void 0), y.data;
|
|
43
43
|
}
|
|
@@ -50,24 +50,24 @@ const $ = async (t) => {
|
|
|
50
50
|
const e = C(t);
|
|
51
51
|
if (!t?.isPortal || !e)
|
|
52
52
|
return b(t);
|
|
53
|
-
const
|
|
54
|
-
if (!
|
|
53
|
+
const s = t?.user;
|
|
54
|
+
if (!s && e)
|
|
55
55
|
return;
|
|
56
|
-
const { token:
|
|
56
|
+
const { token: n } = await p({
|
|
57
57
|
requester: async () => await L(t),
|
|
58
58
|
key: "platformSelf",
|
|
59
|
-
id:
|
|
59
|
+
id: s?.id ?? t.id ?? "<unknown>",
|
|
60
60
|
cacheOption: { getExpireAfterFromResult: (r) => r.expires_in }
|
|
61
61
|
});
|
|
62
|
-
return
|
|
62
|
+
return n;
|
|
63
63
|
}, L = async (t) => {
|
|
64
|
-
const
|
|
64
|
+
const s = {
|
|
65
65
|
"X-Esri-Auth-Client-Id": await M(t),
|
|
66
66
|
"X-Esri-Auth-Redirect-Uri": window.location.href.replace(/#.*$/u, "")
|
|
67
67
|
};
|
|
68
68
|
return (await A(`${w(t)}/oauth2/platformSelf`, {
|
|
69
69
|
authMode: "no-prompt",
|
|
70
|
-
headers:
|
|
70
|
+
headers: s,
|
|
71
71
|
withCredentials: !0,
|
|
72
72
|
method: "post"
|
|
73
73
|
})).data;
|
|
@@ -79,8 +79,8 @@ const $ = async (t) => {
|
|
|
79
79
|
function U(t, e) {
|
|
80
80
|
return window.location.protocol === "https:" || e.allSSL ? t.replace("http:", "https:") : t;
|
|
81
81
|
}
|
|
82
|
-
async function B(t, e,
|
|
83
|
-
const r = `${
|
|
82
|
+
async function B(t, e, s) {
|
|
83
|
+
const r = `${s ? "https://www.arcgis.com/sharing/rest/" : w(e)}community/users/${t}`, i = r?.includes("www.arcgis.com") && e.isPortal, o = r?.includes(".arcgis.com") && !e.isPortal && !e.user, a = i || o ? { disableIdentityLookup: !0, addTokenManually: !1 } : {};
|
|
84
84
|
return await p({
|
|
85
85
|
requester: async () => {
|
|
86
86
|
try {
|
|
@@ -109,5 +109,6 @@ const k = async (t) => {
|
|
|
109
109
|
export {
|
|
110
110
|
p as a,
|
|
111
111
|
k as b,
|
|
112
|
-
B as f
|
|
112
|
+
B as f,
|
|
113
|
+
x as r
|
|
113
114
|
};
|