@arcgis/portal-components 5.2.0-next.150 → 5.2.0-next.151
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/2XTCMELJ.js +2 -0
- package/dist/cdn/4EVTBJ3E.js +2 -0
- package/dist/cdn/BSYO5NUT.js +2 -0
- package/dist/cdn/{NUQ72OYU.js → FSQ3WVI5.js} +1 -1
- package/dist/cdn/S5J33LIC.js +2 -0
- package/dist/cdn/{XDSQPXSO.js → SKVSGN5R.js} +1 -1
- package/dist/cdn/{QQ53FYON.js → V77BFG3A.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +17 -15
- package/dist/components/arcgis-portal-delete-items/customElement.d.ts +62 -0
- package/dist/components/arcgis-portal-delete-items/customElement.js +44 -44
- package/dist/components/arcgis-portal-review-related-items/customElement.js +30 -21
- package/dist/components/portal-related-items-list-item/customElement.js +13 -13
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/package.json +7 -7
- package/dist/cdn/APVJI5AQ.js +0 -2
- package/dist/cdn/AYO4VV3K.js +0 -2
- package/dist/cdn/JITIK4H7.js +0 -2
- package/dist/cdn/UBABQKPV.js +0 -2
package/dist/loader.js
CHANGED
|
@@ -21,7 +21,7 @@ const a = s(e, {
|
|
|
21
21
|
"arcgis-portal-classification-config": [() => import("./components/arcgis-portal-classification-config/customElement.js"), "autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],
|
|
22
22
|
"arcgis-portal-classification-favorite": [() => import("./components/arcgis-portal-classification-favorite/customElement.js"), "attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],
|
|
23
23
|
"arcgis-portal-classification-form-element": [() => import("./components/arcgis-portal-classification-form-element/customElement.js"), "attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],
|
|
24
|
-
"arcgis-portal-delete-items": [() => import("./components/arcgis-portal-delete-items/customElement.js"), "active,disableLinks,itemIds:,items:,messages:,portal:,user:"],
|
|
24
|
+
"arcgis-portal-delete-items": [() => import("./components/arcgis-portal-delete-items/customElement.js"), "active,disableLinks,fieldDeleteMessages:,itemIds:,items:,messages:,portal:,user:"],
|
|
25
25
|
"arcgis-portal-delete-items-review": [() => import("./components/arcgis-portal-delete-items-review/customElement.js"), "items:,messages:,portal:,user:"],
|
|
26
26
|
"arcgis-portal-entity-picker": [() => import("./components/arcgis-portal-entity-picker/customElement.js"), "_messages:,entityType,icon,messageOverrides:,mode,num,portal:,query,selected:;setFocus,togglePicker"],
|
|
27
27
|
"arcgis-portal-extent-picker": [() => import("./components/arcgis-portal-extent-picker/customElement.js"), "active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/portal-components",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.151",
|
|
4
4
|
"description": "ArcGIS Portal Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
],
|
|
39
39
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@arcgis/ai-components": "5.2.0-next.
|
|
42
|
-
"@arcgis/lumina": "5.2.0-next.
|
|
43
|
-
"@arcgis/lumina-toolkit": "5.2.0-next.
|
|
44
|
-
"@arcgis/map-components": "5.2.0-next.
|
|
45
|
-
"@arcgis/toolkit": "5.2.0-next.
|
|
41
|
+
"@arcgis/ai-components": "5.2.0-next.151",
|
|
42
|
+
"@arcgis/lumina": "5.2.0-next.151",
|
|
43
|
+
"@arcgis/lumina-toolkit": "5.2.0-next.151",
|
|
44
|
+
"@arcgis/map-components": "5.2.0-next.151",
|
|
45
|
+
"@arcgis/toolkit": "5.2.0-next.151",
|
|
46
46
|
"@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
|
|
47
47
|
"@langchain/core": "^1.2.9",
|
|
48
48
|
"@langchain/langgraph": "^1.4.14",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"zod": "^4.4.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@arcgis/core": "5.2.0-next.
|
|
56
|
+
"@arcgis/core": "5.2.0-next.151",
|
|
57
57
|
"@esri/calcite-components": "^5.2.0-next.89"
|
|
58
58
|
},
|
|
59
59
|
"css.customData": [
|
package/dist/cdn/APVJI5AQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./OUFIJDIW.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as q}from"./QU2JYXVL.js";import"./RT6SXACX.js";import"./6BMWSGLA.js";import{L as f,R as _,h as b,j as u,w as c}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([D,S,g,{b:h}])=>{var I=b`:host{background-color:var(--calcite-color-foreground-1)}.scrim-container{position:relative}.base-fields-control{margin-inline-end:.75rem}.added{display:inline-flex;gap:.5rem;flex-shrink:0;white-space:nowrap}.added calcite-icon{color:var(--calcite-color-status-success)}`;async function v({item:t,layers:e}){let{url:a}=t,l=new Map;if(!a)return{result:l};try{let s=(await g(a,{query:{f:"json"},responseType:"json"})).data;if(s.fields){let n=e?.[0];return e?.length===1&&n?.layerId!=null&&l.set(n.layerId,s.fields),{result:l}}if(!s.layers?.length)return{result:l};let i=a.replace(/\/$/u,"");return await Promise.all(s.layers.map(async({id:n})=>{let d=(await g(`${i}/${n}`,{query:{f:"json"},responseType:"json"})).data;l.set(n,d.fields??[])})),{result:l}}catch(s){return console.error("Error getting layer fields:",s),{error:{code:"unhandledError"}}}}var P=t=>{let{url:e}=t;return e?e.replace("/rest/services","/rest/admin/services").replace(/\/$/u,""):null};async function C({fields:t,item:e,portal:a,layerId:l}){let s=P(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await h({url:`${s}/${l!=null?`${l}/`:""}addToDefinition`,portal:a,method:"post",params:{addToDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message}}:{result:i}}catch(i){return console.error("Error adding fields to the feature service definition:",i),{error:{code:"unhandledError"}}}}async function L({fields:t,item:e,portal:a,layerId:l}){let s=P(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await h({url:`${s}/${l!=null?`${l}/`:""}updateDefinition`,portal:a,method:"post",params:{updateDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message??"Failed to update the feature service definition."}}:{result:i}}catch(i){return console.error("Error updating the feature service definition:",i),{error:{code:"unhandledError"}}}}async function z(t){let{url:e}=t;if(!e)return{error:{code:"unhandledError"}};try{return{result:(await g(e,{query:{f:"json"}})).data}}catch(a){return console.error("Error getting service info:",a),{error:{code:"unhandledError"}}}}var A=(t,e)=>{let a=t.domain??null,l=e.domain??null;return a===null||l===null?a===l:a.type!==l.type?!1:a.type==="codedValue"&&l.type==="codedValue"?a.name===l.name&&a.codedValues.length===l.codedValues.length&&a.codedValues.every(({code:s,name:i},n)=>s===l.codedValues[n]?.code&&i===l.codedValues[n]?.name):a.type==="range"&&l.type==="range"?a.name===l.name&&a.range[0]===l.range[0]&&a.range[1]===l.range[1]:!0},w=(t,e)=>{let a=new Map(e.map(i=>[i.name,i])),l=[],s=[];for(let i of t){let n=a.get(i.name);n?A(i,n)||s.push({name:i.name,domain:i.domain}):l.push(i)}return{missingFields:l,modifiedFields:s}},F=t=>{switch(t){case"esriGeometryPolyline":case"esriGeometryPolygon":return[...E];case"esriGeometryPoint":return[...R];default:return[]}},x=t=>t==="esriGeometryPoint"?[...M]:[],G=t=>t==="esriGeometryPoint"?[...N]:[],E=[{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_h_rms",type:"esriFieldTypeDouble",alias:"Worst horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_v_rms",type:"esriFieldTypeDouble",alias:"Worst vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_fixtype",type:"esriFieldTypeSmallInteger",alias:"Worst fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_manual_locations",type:"esriFieldTypeInteger",alias:"Number of manual locations",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],R=[{name:"esrignss_speed",type:"esriFieldTypeDouble",alias:"Speed (km/h)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_direction",type:"esriFieldTypeDouble",alias:"Direction of travel (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_azimuth",type:"esriFieldTypeDouble",alias:"Compass reading (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_positionsourcetype",type:"esriFieldTypeInteger",alias:"Position source type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_POSITIONSOURCETYPE_DOMAIN",codedValues:[{name:"Unknown",code:0},{name:"User defined",code:1},{name:"Integrated (System) Location Provider",code:2},{name:"External GNSS Receiver",code:3},{name:"Network Location Provider",code:4},{name:"Snapped",code:5}]},defaultValue:null},{name:"esrignss_receiver",type:"esriFieldTypeString",alias:"Receiver name",sqlType:"sqlTypeOther",length:50,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_rms",type:"esriFieldTypeDouble",alias:"Horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_v_rms",type:"esriFieldTypeDouble",alias:"Vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_latitude",type:"esriFieldTypeDouble",alias:"Latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_longitude",type:"esriFieldTypeDouble",alias:"Longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_altitude",type:"esriFieldTypeDouble",alias:"Ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_pdop",type:"esriFieldTypeDouble",alias:"PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_hdop",type:"esriFieldTypeDouble",alias:"HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_vdop",type:"esriFieldTypeDouble",alias:"VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_fixtype",type:"esriFieldTypeSmallInteger",alias:"Fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_correctionage",type:"esriFieldTypeDouble",alias:"Correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_stationid",type:"esriFieldTypeSmallInteger",alias:"Station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_numsats",type:"esriFieldTypeSmallInteger",alias:"Number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"range",name:"ESRI_NUM_SATS_DOMAIN",range:[0,99]},defaultValue:null},{name:"esrignss_fixdatetime",type:"esriFieldTypeDate",alias:"Fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_positions",type:"esriFieldTypeInteger",alias:"Averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_stddev",type:"esriFieldTypeDouble",alias:"Standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_name",type:"esriFieldTypeString",alias:"Correction source name",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_type",type:"esriFieldTypeString",alias:"Correction source type",sqlType:"sqlTypeOther",length:25,nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_correction_source_domain",codedValues:[{name:"Unknown",code:"Unknown"},{name:"Direct IP",code:"Direct IP"},{name:"NTRIP",code:"NTRIP"},{name:"PPP",code:"PPP"},{name:"Radio",code:"Radio"},{name:"SBAS",code:"SBAS"}]},defaultValue:null},{name:"esrignss_custom_attributes",type:"esriFieldTypeString",alias:"GNSS custom attributes",sqlType:"sqlTypeOther",length:2e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_95_status",type:"esriFieldTypeSmallInteger",alias:"95% accuracy applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_ntrip_mount_point",type:"esriFieldTypeString",alias:"NTRIP mount point",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_antenna_height",type:"esriFieldTypeDouble",alias:"GNSS antenna height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_orthometric_height",type:"esriFieldTypeDouble",alias:"Orthometric height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_profile_has_hor_xform",type:"esriFieldTypeSmallInteger",alias:"Location profile horizontal datum transformation applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_profile_hor_xform",type:"esriFieldTypeString",alias:"Location profile horizontal datum transformation",sqlType:"sqlTypeOther",length:255,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs",type:"esriFieldTypeString",alias:"Geographic coordinate system",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs_wkid",type:"esriFieldTypeInteger",alias:"Geographic coordinate system WKID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_geoid",type:"esriFieldTypeString",alias:"Receiver geoid model",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_ref_epoch",type:"esriFieldTypeDouble",alias:"Reference epoch",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],M=[{name:"esrisnsr_tilt_azimuth_accuracy",type:"esriFieldTypeDouble",alias:"Tilt azimuth accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_azimuth",type:"esriFieldTypeDouble",alias:"Tilt azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle_accuracy",type:"esriFieldTypeDouble",alias:"Tilt angle accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle",type:"esriFieldTypeDouble",alias:"Tilt angle (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_tilt_compensated",type:"esriFieldTypeSmallInteger",alias:"Tilt compensated",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null}],N=[{name:"esrignss_cp1_latitude",type:"esriFieldTypeDouble",alias:"CP1 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_longitude",type:"esriFieldTypeDouble",alias:"CP1 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_altitude",type:"esriFieldTypeDouble",alias:"CP1 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_rms",type:"esriFieldTypeDouble",alias:"CP1 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_v_rms",type:"esriFieldTypeDouble",alias:"CP1 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixdatetime",type:"esriFieldTypeDate",alias:"CP1 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP1 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp1_corr_age",type:"esriFieldTypeDouble",alias:"CP1 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_stationid",type:"esriFieldTypeSmallInteger",alias:"CP1 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_numsats",type:"esriFieldTypeSmallInteger",alias:"CP1 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_pdop",type:"esriFieldTypeDouble",alias:"CP1 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_hdop",type:"esriFieldTypeDouble",alias:"CP1 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_vdop",type:"esriFieldTypeDouble",alias:"CP1 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP1 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP1 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_positions",type:"esriFieldTypeInteger",alias:"CP1 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_stddev",type:"esriFieldTypeDouble",alias:"CP1 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_slope_dist",type:"esriFieldTypeDouble",alias:"CP1 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_inclination",type:"esriFieldTypeDouble",alias:"CP1 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_azimuth",type:"esriFieldTypeDouble",alias:"CP1 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_latitude",type:"esriFieldTypeDouble",alias:"CP2 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_longitude",type:"esriFieldTypeDouble",alias:"CP2 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_altitude",type:"esriFieldTypeDouble",alias:"CP2 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_rms",type:"esriFieldTypeDouble",alias:"CP2 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_v_rms",type:"esriFieldTypeDouble",alias:"CP2 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixdatetime",type:"esriFieldTypeDate",alias:"CP2 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP2 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp2_corr_age",type:"esriFieldTypeDouble",alias:"CP2 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_stationid",type:"esriFieldTypeSmallInteger",alias:"CP2 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_numsats",type:"esriFieldTypeSmallInteger",alias:"CP2 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_pdop",type:"esriFieldTypeDouble",alias:"CP2 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_hdop",type:"esriFieldTypeDouble",alias:"CP2 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_vdop",type:"esriFieldTypeDouble",alias:"CP2 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP2 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP2 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_positions",type:"esriFieldTypeInteger",alias:"CP2 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_stddev",type:"esriFieldTypeDouble",alias:"CP2 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_slope_dist",type:"esriFieldTypeDouble",alias:"CP2 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_inclination",type:"esriFieldTypeDouble",alias:"CP2 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_azimuth",type:"esriFieldTypeDouble",alias:"CP2 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_method",type:"esriFieldTypeString",alias:"Offset method",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_OFFSET_METHOD_DOMAIN",codedValues:[{name:"Azimuth-Azimuth",code:"azimuth-azimuth"},{name:"Distance-Angle",code:"distance-angle"},{name:"Distance-Azimuth",code:"distance-azimuth"},{name:"Distance-Distance",code:"distance-distance"},{name:"Azimuth-Azimuth-Backsight",code:"azimuth-azimuth-backsight"},{name:"Distance-Azimuth-Backsight",code:"distance-azimuth-backsight"},{name:"Distance-Distance-Backsight",code:"distance-distance-backsight"},{name:"User-defined",code:"user-defined"}]},defaultValue:null},{name:"esrisnsr_offset_device",type:"esriFieldTypeString",alias:"Rangefinder name",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_height",type:"esriFieldTypeDouble",alias:"Rangefinder height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_target_ht",type:"esriFieldTypeDouble",alias:"Laser target height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_mag_var",type:"esriFieldTypeDouble",alias:"Rangefinder magnetic variation (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}];function $(t){let e=t.capabilities;return e?.data?.supportsAttachment&&e?.operations?.supportsQueryAttachments}function k(t){return t.every($)}var B=["point","polyline","polygon"],O=t=>t?.type==="Feature Service",T=class extends f{constructor(){super(...arguments),this.messages=q({blocking:!0}),this.initCount=0,this.supportsAttachments=!1,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.loadedItem=null,this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.initializing=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1,this.addingGPSFieldMetadata=[],this.item=null,this.itemId=null,this.messageOverrides={},this.arcgisGPSMetadataFieldsAdded=c(),this.arcgisReadOnlyMode=c()}static{this.properties={loadedItem:16,gpsFieldFixesBySet:16,addFieldsDisabled:16,initializing:16,hasLineOrPolygonLayer:16,hasPointFeatureLayer:16,addingGPSFieldMetadata:16,item:0,itemId:1,portal:0,messageOverrides:0}}static{this.styles=I}willUpdate(e){(e.has("item")||e.has("itemId"))&&this.initItem()}async initItem({showLoading:e=!0}={}){let a=++this.initCount;if(!this.item&&!this.itemId){this.resetItemState(),this.initializing=!1;return}e&&(this.resetItemState(),this.initializing=!0);let{item:l,itemId:s,portal:i}=this,n=l?await l.load():await new S({id:s,portal:i}).load();if(!this.isCurrentInitialization(a))return;if(!O(n)){this.resetItemState(),this.initializing=!1;return}this.loadedItem=n;let d=!e&&this.layersLoaded?[...this.pointLayers,...this.lineOrPolygonLayers]:await this.getFeatureLayers(n),{result:p}=await z(n);if(!this.isCurrentInitialization(a))return;this.layersLoaded=!0,this.pointLayers=d.filter(o=>o.geometryType==="point"),this.lineOrPolygonLayers=d.filter(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasLineOrPolygonLayer=d.some(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasPointFeatureLayer=d.some(o=>o.geometryType==="point");let{result:r,error:y}=d.length>0?await v({item:n,layers:d}):{};if(!this.isCurrentInitialization(a))return;if(y){this.resetItemState(),this.initializing=!1;return}let m=r??new Map;this.gpsFieldFixesBySet={base:this.analyzeFieldSet([...this.pointLayers,...this.lineOrPolygonLayers],m,"base"),gnss:this.analyzeFieldSet(this.pointLayers,m,"gnss"),rangefinder:this.analyzeFieldSet(this.pointLayers,m,"rangefinder")},this.supportsAttachments=k(d);let V=p?.sourceSchemaChangesAllowed!==!1;this.addFieldsDisabled=!this.supportsAttachments||!V,this.initializing=!1}isCurrentInitialization(e){return e===this.initCount}resetItemState(){this.loadedItem=null,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1}async getFeatureLayers(e){let a=await D.fromPortalItem({portalItem:e});return await a.load(),"layers"in a?(await Promise.all(a.layers.map(async l=>(await l.load(),this.isSupportedFeatureLayer(l)?l:null)))).filter(l=>!!l):this.isSupportedFeatureLayer(a)?[a]:[]}isSupportedFeatureLayer(e){return e.type==="feature"&&B.some(a=>a===e.geometryType)}getCompatibleEsriGeometryType(e){switch(e.geometryType){case"point":return"esriGeometryPoint";case"polyline":return"esriGeometryPolyline";case"polygon":return"esriGeometryPolygon";default:return null}}analyzeFieldSet(e,a,l){let s=[];for(let i of e){if(i.layerId==null)continue;let n=a.get(i.layerId)??[],d=this.getCompatibleEsriGeometryType(i),p=d?l==="base"?F(d):l==="gnss"?x(d):G(d):[],r=w(p,n);(r.missingFields.length>0||r.modifiedFields.length>0)&&s.push({layerId:i.layerId,fieldsToAdd:r.missingFields,domainsToUpdate:r.modifiedFields})}return s}hasFieldChanges(e){return(this.gpsFieldFixesBySet?.[e].length??0)>0}isLoading(e){return this.addingGPSFieldMetadata.includes(e)}async addFields(e){let a=this.portal??this.loadedItem?.portal,l=this.loadedItem,s=this.gpsFieldFixesBySet;if(!(!a||!l||!s)){if(a.isReadOnly){this.arcgisReadOnlyMode.emit();return}this.addingGPSFieldMetadata=[...this.addingGPSFieldMetadata,e];try{let i=s[e],n=(await Promise.all(i.filter(({fieldsToAdd:r})=>r.length>0).map(async({fieldsToAdd:r,layerId:y})=>await C({fields:r,item:l,layerId:y,portal:a})))).every(({error:r})=>!r),d=n?await Promise.all(i.filter(({domainsToUpdate:r})=>r.length>0).map(async({domainsToUpdate:r,layerId:y})=>await L({fields:r,item:l,layerId:y,portal:a}))):[],p=n&&d.every(({error:r})=>!r);await this.initItem({showLoading:!1}),n&&p&&this.gpsFieldFixesBySet&&!this.hasFieldChanges(e)&&this.arcgisGPSMetadataFieldsAdded.emit(e)}finally{this.addingGPSFieldMetadata=this.addingGPSFieldMetadata.filter(i=>i!==e)}}}canShowAddGPSMetadata(){let e=this.loadedItem??this.item;return!!e&&O(e)}showAdvancedFields(){let e=this.gpsFieldFixesBySet;return!this.hasPointFeatureLayer||!e?!1:this.pointLayers.some(a=>{if(a.layerId==null)return!1;let l=this.getCompatibleEsriGeometryType(a),s=l?F(l):[];return(e.base.find(({layerId:i})=>i===a.layerId)?.fieldsToAdd??[]).length<s.length})}renderAddFieldsControl(e,a=!1){let l=this.gpsFieldFixesBySet;if(!a&&l&&!this.hasFieldChanges(e))return u`<span slot=actions-end class="added"><calcite-icon icon=check-circle scale=s aria-hidden></calcite-icon>${this.messages.added}</span>`;let s=this.isLoading(e);return u`<calcite-button slot=actions-end appearance=outline-fill .disabled=${a||!l||s||this.addFieldsDisabled} .loading=${s} @click=${async()=>await this.addFields(e)}>${s?this.messages.addingFields:this.messages.addFields}</calcite-button>`}render(){return this.canShowAddGPSMetadata()?u`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing&&u`<calcite-scrim loading></calcite-scrim>`||""}<calcite-list .label=${this.messages.gpsOptions} selection-mode=none><calcite-list-item .label=${this.messages.accordionHeading}>${this.renderAddFieldsControl("base")}</calcite-list-item>${this.showAdvancedFields()&&u`<calcite-list-item .label=${this.messages.gnssReceiverFields}>${this.renderAddFieldsControl("gnss")}</calcite-list-item><calcite-list-item .label=${this.messages.laserRangefinderFields}>${this.renderAddFieldsControl("rangefinder")}</calcite-list-item>`||""}</calcite-list></calcite-block></div>`:null}};_("arcgis-portal-add-gps-metadata",T);return T},"layers/Layer","portal/PortalItem","request",a)
|
package/dist/cdn/AYO4VV3K.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as g}from"./CFBSBZSS.js";import{c as _}from"./QS3GXAIH.js";import{O as d,h as p,j as t}from"./CWSEBETE.js";export default $arcgis.t(([{formatDate:w}])=>{var k=p`.item{display:block;color:var(--calcite-color-text-1)}.item__content{display:flex;flex-direction:column;min-width:0;margin-inline-start:var(--calcite-spacing-unit);overflow-wrap:anywhere}.item__title{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);text-decoration:underline}.item__details{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--2)}.item__details-owner{display:inline-block;text-decoration:none}.item__type{font-weight:var(--calcite-font-weight-medium)}.item__content-end{display:flex;align-items:center;gap:.5rem}.item__status-icon{color:var(--calcite-color-text-2)}.item__access{display:flex;align-items:center;gap:var(--calcite-spacing-unit);color:var(--calcite-color-text-2);padding:7px;border:1px solid var(--calcite-color-border-1);border-radius:1rem}`;function S({item:e,portal:i,user:c,lang:v,modifiedLabel:o,showAccessInfo:f=!0,access:a={level:e.access},relatedItemsCount:u=0,relatedItemsCountTitle:l,onRelatedItemsClick:$}){let s="inRecycleBin"in e&&e.inRecycleBin===!0,n=i&&!s?`${_({portal:i})}/item.html?id=${e.id}`:void 0,r=e.title??"",m=w(e.modified??void 0,{dateStyle:"medium"}),x=o?o.replace("${date}",m??""):m??"",y={public:"globe",private:"user",org:"organization",shared:"user"}[a.level],h=!!a.groupIds?.length||a.level==="shared";return t`<calcite-list-item .label=${r} @calciteListItemSelect=${()=>{n&&window.open(n,"_blank","noopener,noreferrer")}}><span slot=content-start><arcgis-portal-item-type .item=${e} .portal=${i} .user=${c} hide-text></arcgis-portal-item-type></span><div slot=content class="item"><div class="item__content"><span class="item__title">${r}</span><div class="item__details"><span class="item__type"><arcgis-portal-item-type .item=${e} .user=${c} .portal=${i} scale=s hide-icon></arcgis-portal-item-type></span>|<span class="item__details-owner">${g(c,v)??e.owner}</span>|<span class="item__details-modified">${x}</span></div></div></div><div slot=content-end class="item__content-end">${s&&t`<calcite-icon class="item__status-icon" icon=recycle-bin scale=s></calcite-icon>`||""}${u>0&&t`<calcite-chip .label=${l} title=${l??d} icon=launch @click=${b=>{b.stopPropagation(),$?.()}}>${l}</calcite-chip>`||""}${f&&!s&&t`<span class="item__access"><calcite-icon .icon=${y} scale=s class="item__access-icon"></calcite-icon>${h&&t`<calcite-icon icon=plus scale=s></calcite-icon><calcite-icon icon=group scale=s class="item__access-icon"></calcite-icon>`||""}</span>`||""}</div></calcite-list-item>`}return{a:k,b:S}},"intl")
|
package/dist/cdn/JITIK4H7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import k from"./VDOEP33G.js";import j from"./UBABQKPV.js";import i from"./XDSQPXSO.js";import h from"./AYO4VV3K.js";import{a as E}from"./ILDTKRON.js";import"./CFBSBZSS.js";import g from"./MC3LJZSI.js";import"./QDWOQBO3.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import e from"./RBGARTND.js";import c from"./F3ODJVJC.js";import a from"./OUFIJDIW.js";import{a as M,c as w}from"./VMQIDO4Z.js";import{c as P}from"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as L}from"./QU2JYXVL.js";import{b as U}from"./RT6SXACX.js";import"./6BMWSGLA.js";import{L as R,M as b,O as T,R as A,h as B,j as d,w as f}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([x,_,{b:v},,,{b:O},,{a:$},,{b:p}])=>{async function F(i,t,e=!1){try{let s=new Map;for(let n of i){let{id:l,owner:c}=n,a=s.get(c)??[];a.push(l),s.set(c,a)}let r=[];for(let[n,l]of s){let c=`${t.restUrl}/content/users/${encodeURIComponent(n)}/deleteItems`;for(let a of O(l,100)){let o=_(c,{method:"post",query:{f:"json",items:a.join(","),permanentDelete:e}});r.push(o.then(({data:m})=>m))}}return{result:(await Promise.all(r)).flatMap(({results:n})=>n)}}catch{return{error:{code:"unhandledError"}}}}async function N(i){let{item:t,portal:e,permanentlyDelete:s}=i,{id:r,owner:n}=t;if(!r||!n)return{error:{code:"unhandledError"}};let l=e.recycleBinEnabled&&!s?"/canRecycle":"/canDelete",c=`${e.restUrl}/content/users/${encodeURIComponent(n)}/items/${r}${l}`;try{return{result:(await _(c,{query:{f:"json"}})).data}}catch(a){let o=a.details?.raw;switch(o?.messageCode){case"CONT_00481":case"CONT_00483":case"CONT_00484":return{error:{code:"itemHasDependentItems"}};case"CONT_0048":return{error:{code:"itemDeleteProtected"}};case"CONT_0298":return{error:{code:"itemNotSupportedInRecycleBin"}};default:return{error:{code:"unhandledError",message:o?.message}}}}}async function V(i,t){try{let e=`${i.itemUrl}/setContentStatus`;return{result:(await _(e,{query:{status:t??"",clearEmptyFields:!t,f:"json"},method:"post"})).data}}catch(e){return console.error(e),{error:{code:"unhandledError"}}}}function j(i,t){return(i.relatedItems??[]).map(e=>J(e,t))}function J(i,t){return i instanceof x?i:new x({...i,portal:t})}async function y({itemId:i,portal:t,relationship:e,includeRecycleBin:s,nextkey:r}){let{relationshipType:n,direction:l}=e,c=`${t.restUrl}/content/items/${i}/relatedItems`;try{let a=await v({url:c,portal:t,params:{includeRecycleBin:s,f:"json",relationshipType:n?Array.isArray(n)?n.join(","):n:void 0,direction:l,nextkey:r}});return{success:!0,result:{...a,relatedItems:j(a,t)}}}catch(a){return{success:!1,error:a}}}async function Q({itemId:i,portal:t,relationship:e,includeRecycleBin:s,num:r,nextkey:n}){let{relationshipRules:l,direction:c}=e,a=`${t.restUrl}/content/items/${i}/relatedItems`;try{let o=await v({url:a,portal:t,params:{includeRecycleBin:s,f:"json",...l?.length?{relationshipRules:l.join(",")}:{},includeSystemManaged:"true",excludedFlags:"legacy,exclude",num:r,direction:c,nextkey:n}});return{success:!0,result:{...o,relatedItems:j(o,t)}}}catch(o){return{success:!1,error:o}}}async function X(i,t){let{id:e,type:s,typeKeywords:r=[]}=i;if(!e)return null;let n=["Scene Service","Map Service","WFS","OGCFeatureServer","Vector Tile Service","3DTiles Service"].includes(s),l=["Map Service","Vector Tile Service"].includes(s),c=o=>o?.typeKeywords?.includes("View Service")??!1,a=()=>n?[{relationshipType:["Service2Service"],direction:"reverse"},{relationshipType:["Service2Data"],direction:"forward"}]:r.includes("Bulk Published Service")?{relationshipType:["DataStore2BPService"],direction:"reverse"}:s==="Geoprocessing Service"&&r.includes("Notebook Web Tool")?{relationshipType:["Notebook2WebTool"],direction:"reverse"}:r.includes("Route Layer")?{relationshipType:["Service2Route"],direction:"reverse"}:s==="Mobile Application"?{relationshipType:["MobileApp2Code"],direction:"reverse"}:s==="Map Package"?{relationshipType:["Area2Package"],direction:"reverse"}:s==="Feature Service"?{relationshipType:["Service2Layer"],direction:"reverse"}:r.includes("Document")?{relationshipType:["Item2Attachment"],direction:"reverse"}:s==="Application Configuration"?{relationshipType:["Map2AppConfig"],direction:"reverse"}:{relationshipType:["Service2Data"],direction:"forward"};try{let o=a();if(!o)return null;if(!Array.isArray(o))return{sourceData:(await y({itemId:e,portal:t,relationship:o})).result?.relatedItems?.[0]??null,relationship:o};if(n){let m={relationshipType:["Service2Service"],direction:"reverse"},g=await y({itemId:e,portal:t,relationship:m}),h=g.result?.total?g.result.relatedItems.shift()??null:null;if(l&&!c(h)||!h){m={relationshipType:["Service2Data"],direction:"forward"};let I=await y({itemId:e,portal:t,relationship:m});return{sourceData:I.result?.total?I.result.relatedItems.shift()??h:h,relationship:m}}return{sourceData:h,relationship:m}}return null}catch(o){return console.error(o),{sourceData:null,relationship:{direction:"forward"}}}}async function Y(i,t){let{id:e,type:s,typeKeywords:r=[]}=i;try{let n=s==="Notebook"?{relationshipType:["Notebook2WebTool"],direction:"forward"}:r.includes("Has Related Route Layers")?{relationshipType:["Service2Route"],direction:"forward"}:r.includes("Hosted Service")||s==="Feature Service"?{relationshipType:["Service2Service"],direction:s==="Feed"?"reverse":"forward"}:s==="Data Store"||r.includes("ArcGIS Server")?{relationshipType:["DataStore2BPService"],direction:"forward"}:{relationshipType:["Service2Data"],direction:"reverse"},l=await y({itemId:e,portal:t,relationship:n,includeRecycleBin:!0});return{resultData:{items:l.result?.total?l.result.relatedItems:null,count:l.result?.total??0},relationship:n}}catch(n){return console.error(n),{resultData:{items:null,count:0},relationship:{direction:"forward"}}}}async function Z(i,t){let{id:e}=i;try{return(await y({itemId:e,portal:t,relationship:{relationshipType:["ReplacementItem2Item"],direction:"forward"}})).result?.relatedItems??[]}catch(s){return console.error(s),[]}}function ee({recycleItems:i,cannotDeleteItems:t,permanentlyDeleteItems:e}){return[...i,...t,...e]}function te(i){return i.map(({item:t,sourceData:e,resultData:s,replacementItemFor:r})=>({item:t,sourceData:e,resultData:s,replacementItemFor:r}))}function z(i,t,e){return!t&&!!e?.length&&!p(i)}function se({item:i,sourceData:t,resultData:e}){return!e?.some(s=>!s.inRecycleBin)||z(i,t,e)?!1:!G(i,e)&&!K(i,e)}function ie({selectedItems:i}){let t=[];return t.push(...i.flatMap(({item:e,sourceData:s,resultData:r,replacementItemFor:n})=>{let l=z(e,s,r),c=!!(r?.some(a=>!a.inRecycleBin)&&!G(e,r)&&!K(e,r));return l&&c?[{item:e,reason:"dependent",offendingItems:r??void 0}]:n&&n?.length>0?[{item:e,reason:"replacement",offendingItems:n}]:[]})),t}function G(i,t){let e=t[0];return i.type==="Feed"&&p(i)&&t.length===1&&e?.type==="Feature Service"&&p(e)}function K(i,t){let e=t[0];return i.type==="Feature Service"&&p(i)&&t.length===1&&e?.type==="Feed"&&p(e)}function S(i){return i?i.filter(t=>t.type!=="Code Attachment"):null}function W(i){return!!(i&&"inRecycleBin"in i&&i.inRecycleBin===!0)}function u(i){return i.updatedStatus??i.kind}function k(i){return{...i,originalStatus:i.originalStatus??i.kind}}function ne(i,t){return{...i,kind:t,originalStatus:i.originalStatus??i.kind}}async function re(i,t){let e=await N({item:i,portal:t,permanentlyDelete:!1});if(e.error&&e.error.code!=="itemNotSupportedInRecycleBin")return{kind:"cannotDelete",errorCode:e.error.code};if(e.result?.success)return{kind:"recycle"};let s=await N({item:i,portal:t,permanentlyDelete:!0});return s.result?.success?{kind:"permanentlyDelete"}:{kind:"cannotDelete",errorCode:s.error?.code??"unhandledError"}}function ae(i){switch(i){case"itemHasDependentItems":return"hasDependentItems";case"itemDeleteProtected":return"deleteProtected";default:return"uncaught"}}async function le(i,t){let e=await Q({itemId:i.id,portal:t,relationship:{direction:"forward"}}),s=await X(i,t),r=await Y(i,t),n=await Z(i,t),l=e.result?.relatedItems??[],c=S(l)??[],a=e.result?.aggregations?.total?.count,o=S(r.resultData.items),m=S(n),g=s?.sourceData,h={usedByItems:c,usedByItemsCount:a==null?c.length:Math.max(0,a-(l.length-c.length)),sourceData:g?.type==="Code Attachment"?null:g??null,resultData:o,replacementItemFor:m?.length?m:null},I=se({item:i,...h}),D=await re(i,t);return D.kind==="cannotDelete"?k({item:i,...h,kind:"cannotDelete",reason:ae(D.errorCode)}):I?k({item:i,...h,kind:"cannotDelete",reason:"hasDependentItems"}):D.kind==="permanentlyDelete"?k({item:i,...h,kind:"permanentlyDelete",reason:"notSupported"}):k({item:i,...h,kind:D.kind})}async function ce(i,t){let e=await Promise.all(i.map(async s=>await le(s,t)));return oe(e)}function oe(i){let t=new Map;for(let e of i)e.item.id&&t.set(e.item.id,e);return i.map(e=>{if(e.kind!=="cannotDelete"||e.reason!=="hasDependentItems"||!e.item.id)return e;let s=de(e.resultData,t);if(s.length===0)return e;let r=s.every(l=>t.has(l)),n=s.every(l=>!t.get(l)?.item.protected);return r&&n?ne(e,"recycle"):e})}function de(i,t,e=new Set){if(!i?.length)return[];let s=i.filter(n=>!W(n)),r=new Set;for(;s.length>0;){let n=s.shift().id;if(!n||e.has(n))continue;e.add(n),r.add(n);let l=t.get(n)?.resultData??[];s.push(...l.filter(c=>!W(c)))}return[...r]}var me=B`:host{display:block}calcite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: var(--calcite-color-background)}calcite-panel{display:flex;flex-direction:column;gap:.75rem;>*{margin-inline:.75rem}}.panel__content{width:100%;box-sizing:border-box}.single-item-bucket{--calcite-block-background-color: transparent;--calcite-block-border-color: transparent}.bucket__content{display:flex;align-items:flex-start;gap:.75rem;width:100%}.bucket__icon{flex-shrink:0}.bucket__icon--danger{color:var(--calcite-color-status-danger)}.bucket__details{display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.bucket__header{font-weight:500}.bucket__label{margin-inline-end:.25rem}.bucket__checkbox{margin-top:.5rem}.bucket__description{line-height:1.35;font-size:var(--calcite-font-size--1)}.bucket__link{display:flex;align-items:center;min-height:1.5rem}.item-link-content{position:relative;>arcgis-portal-item-type{margin-inline-end:.25rem;vertical-align:middle}}.panel__checkbox{width:100%;padding-block:.75rem;padding-inline-start:.75rem;background-color:var(--calcite-color-foreground-1)}.panel__related-items{margin-top:1rem;border:1px solid var(--calcite-color-border-2)}.panel__related-items-icon{color:var(--calcite-color-status-warning)}.panel__related-items-notice{padding-bottom:.75rem}arcgis-portal-review-related-items{margin-bottom:.75rem}.discouraged-items-warning{margin-bottom:.75rem}.header-description{font-size:var(--calcite-font-size--1);font-weight:400}`,H=new Map;async function he(i,t){let e=M(i),s=JSON.stringify([e,t]),r=H.get(s);if(r)return r;try{let n=(await v({url:`${e}portals/helpmap`,portal:i,params:{culture:t}}))?.helpMap?.m??{};return H.set(s,n),n}catch{return{}}}var ue=i=>U((t,e)=>{let s,r;return e.onUpdate(()=>{let n=i.portal(),l=i.language(),c=n?.restUrl;c===s&&l===r||(s=c,r=l,e.exports={},!(!n||!c||!l)&&he(n,l).then(a=>{e.exports=a}))}),{}});function q({id:i,linkText:t,label:e,placement:s,items:r,portal:n,user:l}){return d`<calcite-link id=${i??T}>${t}</calcite-link><calcite-popover .label=${e} .referenceElement=${i} .placement=${s} auto-close><calcite-list .label=${e} selection-mode=none>${r.map(c=>d`<calcite-list-item .label=${c.title??""} @calciteListItemSelect=${()=>{let a=c.itemPageUrl;a&&window.open(a.replace("sharing/rest/",""),"_blank","noopener,noreferrer")}}><span slot=content-start><arcgis-portal-item-type .item=${c} .portal=${n} .user=${l} hide-text></arcgis-portal-item-type></span><span slot=content>${c.title}</span></calcite-list-item>`)}</calcite-list></calcite-popover>`}var C=class extends R{constructor(){super(...arguments),this.deleteStatusRequestId=0,this.updatedCannotDeleteItemIds=new Set,this.messages=L({blocking:!0}),this.helpMap=ue({portal:()=>this.portal,language:()=>this.messages._t9nLocale}),this.isLoading=!0,this.submittingAction=null,this.loadedItems=[],this.hasConfirmedReview=!1,this.hasReviewedSelectedItems=!1,this.cannotDeleteItems=[],this.recycleItems=[],this.permanentlyDeleteItems=[],this.deprecateItems=[],this.excludeItems=[],this.reviewingDirectlyUsedByItems=!1,this.reviewDecision=null,this.active=!0,this.items=[],this.itemIds=[],this.user=null,this.disableLinks=!1,this.arcgisClose=f(),this.arcgisConfirm=f(),this.arcgisError=f()}static{this.properties={isLoading:16,submittingAction:16,loadedItems:16,hasConfirmedReview:16,hasReviewedSelectedItems:16,cannotDeleteItems:16,recycleItems:16,permanentlyDeleteItems:16,deprecateItems:16,excludeItems:16,reviewingDirectlyUsedByItems:16,reviewDecision:16,active:5,items:0,itemIds:0,portal:0,user:0,disableLinks:5}}static{this.styles=me}willUpdate(t){let e=t.has("items")||t.has("itemIds")||t.has("portal")||t.has("user")||t.has("active");this.active&&e&&(this.user??=this.portal?.user||null,this.resetState(),this.initializeItems(++this.deleteStatusRequestId))}async initializeItems(t){let{items:e,itemIds:s,portal:r}=this,n=e.length?e:await Promise.all(s.map(async l=>await new x({id:l,portal:r}).load()));t===this.deleteStatusRequestId&&(this.loadedItems=n,await this.determineDeleteStatus(t))}async handleReviewDecision(t){let e=this.itemsWithImpactedItems.map(({item:a})=>a),s=t==="delete"?"recycle":t==="deprecate"?"deprecate":"exclude",r=this.permanentlyDeleteItems.filter(a=>this.isPermanentlyDeleteOverrideActive(a)),n=this.permanentlyDeleteItems.filter(a=>!this.isPermanentlyDeleteOverrideActive(a)),l=[...this.recycleItems,...this.deprecateItems,...this.excludeItems,...r],c=t==="delete"&&l.some(a=>u(a)!=="recycle"&&e.some(({id:o})=>o===a.item.id));for(let a of l){if(!e.some(({id:m})=>m===a.item.id))continue;let o=a.originalStatus??a.kind;a.originalStatus=o,a.updatedStatus=s}if(this.reviewDecision={action:t,items:e},this.hasConfirmedReview=!0,this.reviewingDirectlyUsedByItems=!1,this.recycleItems=l.filter(a=>u(a)==="recycle"),this.deprecateItems=l.filter(a=>u(a)==="deprecate"),this.excludeItems=l.filter(a=>u(a)==="exclude"),this.permanentlyDeleteItems=n,t!=="delete"||c){this.isLoading=!0;let a=[...this.cannotDeleteItems,...this.recycleItems,...this.permanentlyDeleteItems].map(({item:o})=>o);await this.determineDeleteStatus(++this.deleteStatusRequestId,a)}}async updateAllContentStatus(t,e){return(await Promise.all(t.map(async s=>await V(s,e)))).flatMap(({result:s})=>s?[s]:[])}async handleDelete(){if(!this.active||this.submittingAction)return;this.submittingAction="delete";let t={restUrl:this.portal.restUrl},{result:e=[]}=this.recycleItems.length?await F(this.recycleItems.map(({item:n})=>n),t):{result:[]},{result:s=[]}=this.permanentlyDeleteItems.length?await F(this.permanentlyDeleteItems.map(({item:n})=>n),t,!0):{result:[]},r=this.deprecateItems.length?await this.updateAllContentStatus(this.deprecateItems.map(({item:n})=>n),"deprecated"):null;this.arcgisConfirm.emit({deletedItems:e,permanentlyDeletedItems:s,deletedItemsCount:e.length,permanentlyDeletedItemsCount:s.length,deprecatedItems:r}),this.closeDialog()}async handleDeprecate(){if(!this.active||this.submittingAction)return;this.submittingAction="deprecate";let t=[...this.deprecateItems,...this.recycleItems,...this.cannotDeleteItems,...this.permanentlyDeleteItems].filter(Boolean),e=t.length?await this.updateAllContentStatus(t.map(({item:s})=>s),"deprecated"):null;this.arcgisConfirm.emit({deletedItems:null,permanentlyDeletedItems:null,deletedItemsCount:0,permanentlyDeletedItemsCount:0,deprecatedItems:e}),this.closeDialog()}handleDialogClose(){this.active&&this.closeDialog()}closeDialog(){this.active=!1,this.resetState(),this.arcgisClose.emit()}resetState(){this.isLoading=!0,this.submittingAction=null,this.loadedItems=[],this.hasConfirmedReview=!1,this.hasReviewedSelectedItems=!1,this.cannotDeleteItems=[],this.recycleItems=[],this.permanentlyDeleteItems=[],this.deprecateItems=[],this.excludeItems=[],this.reviewingDirectlyUsedByItems=!1,this.reviewDecision=null,this.updatedCannotDeleteItemIds.clear(),++this.deleteStatusRequestId}async determineDeleteStatus(t,e=this.loadedItems){let s=new Set(this.recycleItems.map(({item:n})=>n.id).filter(n=>!!n)),r=await ce(e,this.portal);if(t===this.deleteStatusRequestId){this.cannotDeleteItems=r.filter(n=>u(n)==="cannotDelete");for(let n of this.cannotDeleteItems)n.item.id&&s.has(n.item.id)&&this.updatedCannotDeleteItemIds.add(n.item.id);this.recycleItems=r.filter(n=>u(n)==="recycle"),this.permanentlyDeleteItems=r.filter(n=>u(n)==="permanentlyDelete"),this.isLoading=!1}}get itemsWithImpactedItems(){let t=new Set(this.loadedItems.map(({id:e})=>e));return[...this.recycleItems,...this.deprecateItems,...this.excludeItems,...this.permanentlyDeleteItems.filter(e=>this.isPermanentlyDeleteOverrideActive(e))].map(e=>({...e,usedByItems:e.usedByItems.filter(({id:s})=>!t.has(s))})).filter(({usedByItems:e})=>e.length>0)}get itemsHaveImpactedItems(){return this.itemsWithImpactedItems.length>0}get itemsNeedReview(){return this.itemsWithImpactedItems.some(t=>["recycle","permanentlyDelete"].includes(u(t)))}isPermanentlyDeleteOverrideActive(t){return t.kind==="recycle"&&t.updatedStatus==="permanentlyDelete"}handlePermanentlyDeleteOverrideChange(t){if(t){let s=this.recycleItems.map(r=>({...r,originalStatus:r.originalStatus??r.kind,updatedStatus:"permanentlyDelete"}));this.recycleItems=[],this.permanentlyDeleteItems=[...this.permanentlyDeleteItems,...s];return}let e=this.permanentlyDeleteItems.filter(s=>this.isPermanentlyDeleteOverrideActive(s));this.permanentlyDeleteItems=this.permanentlyDeleteItems.filter(s=>!this.isPermanentlyDeleteOverrideActive(s)),this.recycleItems=[...this.recycleItems,...e.map(s=>({...s,updatedStatus:"recycle"}))]}get deleteButtonEnabled(){return!this.isLoading&&(!this.itemsNeedReview||this.hasConfirmedReview)}get markedForDeprecation(){return this.reviewDecision?.action==="deprecate"?this.reviewDecision.items:[]}get deleteMode(){return[this.recycleItems,this.deprecateItems,this.excludeItems,this.permanentlyDeleteItems].filter(t=>t.length>0).length>1?"mixed":this.markedForDeprecation.length>0?"deprecate":this.permanentlyDeleteItems.length>0?"permanentlyDelete":this.recycleItems.length>0?"delete":(this.cannotDeleteItems.length>0,"none")}getHeaderText(){return this.reviewingDirectlyUsedByItems?this.messages.reviewItemsCount.replace("{count}",`${this.itemsWithImpactedItems.length}`):(this.items.length?this.items:this.itemIds).length===1?this.messages.deleteItem:this.messages.deleteItems}getHeaderDescription(){return this.loadedItems.length<=1?"":this.reviewingDirectlyUsedByItems?this.messages.reviewItemsDescription:this.messages.selectedItems.replace("{count}",`${this.loadedItems.length}`)}getConfirmButtonText(){switch(this.deleteMode){case"mixed":return this.messages.confirm;case"deprecate":return this.messages.deprecate;case"permanentlyDelete":return this.portal.recycleBinEnabled?this.messages.permanentlyDelete:this.messages.delete;case"delete":return this.messages.delete;default:return this.messages.delete}}renderBucket({icon:t,label:e,description:s,link:r,additionalContent:n,dangerIcon:l=!1,bucket:c}){return d`<calcite-block class=${b({"single-item-bucket":(this.items.length?this.items:this.itemIds).length===1})} scale=l expanded><div class="bucket__content"><calcite-icon class=${b({bucket__icon:!0,"bucket__icon--danger":l})} scale=l .icon=${t}></calcite-icon><div class="bucket__details"><div class="bucket__header"><span class="bucket__label">${e}</span><span>${this.renderBucketItems(c)}</span></div>${s&&d`<span class="bucket__description">${s}</span>`||""}${r&&d`<div class="bucket__link"><calcite-link .href=${r.href} target=_blank icon-start=launch>${r.text??this.messages.moreInfo}</calcite-link></div>`||""}${n}</div></div></calcite-block>`}renderBucketItems(t=[]){return this.renderItemLinks(t.map(({item:e})=>e))}renderItemLinks(t,e=`delete-items-bucket-${t.map(({id:s})=>s).join("-")}`){if(t.length===0)return null;if(t.length===1){let s=t[0],r=`${P({portal:this.portal})}/item.html?id=${s.id}`;return d`<calcite-link .href=${r} target=_blank><span class="item-link-content"><arcgis-portal-item-type .item=${s} .portal=${this.portal} .user=${this.user} hide-text></arcgis-portal-item-type><span>${s.title}</span></span></calcite-link>`}return q({id:e,linkText:t.length,label:this.messages.bucketItems.replace("{count}",String(t.length)),placement:"bottom-start",items:t,portal:this.portal,user:this.user})}renderRelatedItemsPopover(t){let e=t.flatMap(({usedByItems:s})=>s);return t.length>1||e.length===0?null:q({id:"delete-items-directly-used-by",linkText:$(this.messages._t9nLocale,this.messages.usedByOtherItems,e.length),label:this.messages.usedByPopover,placement:"auto",items:e,portal:this.portal,user:this.user})}renderDirectlyUsedByItems(){let t=ee({recycleItems:this.recycleItems,cannotDeleteItems:this.cannotDeleteItems,permanentlyDeleteItems:this.permanentlyDeleteItems}),e=this.cannotDeleteItems.find(({reason:o})=>o==="hasDependentItems"),s=e?e.resultData??[]:t.flatMap(({usedByItems:o})=>o),r=e?s.length:t[0]?.usedByItemsCount,n=ie({selectedItems:te(t)}),l=n.find(({reason:o})=>o==="replacement"),c=l?.offendingItems??[],a=$(this.messages._t9nLocale,this.messages.replacementItem.isReplacementFor,c.length,{itemLink:"{itemLink}"});return d`${this.loadedItems.length===1&&["delete","permanentlyDelete"].includes(this.deleteMode)&&n.length>0?d`<div class="discouraged-items-warning"><calcite-notice kind=warning open><div slot=message>${l?a.split("{itemLink}").map((o,m)=>d`${m>0&&this.renderItemLinks(c,"delete-items-replacement-for")||""}${o}`):this.messages.deleteDiscouraged}</div>${!l&&d`<calcite-link .href=${`${w(this.portal)}${this.helpMap[120001208]||""}`} icon-end=launch slot=link>${this.messages.learnMoreAboutDeletingSourceItems}</calcite-link>`||""}</calcite-notice></div>`:null}${!this.cannotDeleteItems.some(({reason:o})=>o==="deleteProtected")&&d`<arcgis-portal-review-related-items .sourceItem=${this.loadedItems[0]??null} .relatedItems=${s} .relatedItemsCount=${r} .showDependentItems=${!!e} .portal=${this.portal} .user=${this.user}></arcgis-portal-review-related-items>`||""}`}renderDirectlyUsedByItemsNotice(){let t=new Set(this.itemsWithImpactedItems.flatMap(({usedByItems:s})=>s.map(({id:r})=>r))),e=this.messages.reviewRelatedItems.multiple.replace("{totalCount}",String(t.size));return d`<div class="panel__related-items-notice"><calcite-notice .kind=${this.reviewDecision?"brand":"warning"} icon open><div slot=message>${this.reviewDecision?this.messages.relatedItemsReviewed:e}</div><calcite-button appearance=transparent slot=actions-end @click=${()=>{this.hasReviewedSelectedItems=!0,this.reviewingDirectlyUsedByItems=!0}}>${this.messages.reviewItems}</calcite-button></calcite-notice></div>`}renderDeleteSummary(){return d`<div class="panel__content">${this.isLoading?d`<calcite-scrim loading></calcite-scrim>`:d`<calcite-panel>${this.renderRecycleBucket()}${this.renderDeprecateBucket()}${this.renderExcludeBucket()}${this.renderCannotDeleteBucket()}${this.renderPermanentlyDeleteBucket()}${this.loadedItems.length===1&&this.renderDirectlyUsedByItems()||""}${this.itemsHaveImpactedItems&&d`<div>${this.loadedItems.length>1?this.renderDirectlyUsedByItemsNotice():null}</div>`||""}</calcite-panel>`}</div>${this.itemsNeedReview&&!this.hasReviewedSelectedItems&&d`<calcite-checkbox slot=content-bottom class="panel__checkbox" .checked=${this.hasConfirmedReview} @calciteCheckboxChange=${t=>{this.hasConfirmedReview=t.target.checked}} .label=${this.messages.proceedWithDeletion} .labelText=${this.messages.proceedWithDeletion} required></calcite-checkbox>`||""}${!this.isLoading&&d`${this.loadedItems.length===1&&E(this.loadedItems[0]).contentStatus!=="deprecated"&&d`<calcite-button slot=footer-start kind=danger appearance=outline-fill .disabled=${!!this.submittingAction} .loading=${this.submittingAction==="deprecate"} @click=${this.handleDeprecate}>${this.messages.deprecateInstead}</calcite-button>`||""}<calcite-button slot=footer-end appearance=outline-fill @click=${this.handleDialogClose}>${this.messages.cancel}</calcite-button>${this.deleteMode!=="none"&&d`<calcite-button .disabled=${!this.deleteButtonEnabled||!!this.submittingAction} .loading=${this.submittingAction==="delete"} kind=danger slot=footer-end @click=${async()=>await this.handleDelete()}>${this.getConfirmButtonText()}</calcite-button>`||""}`||""}`}renderReviewItems(){return d`<div class="panel__content"><calcite-panel><arcgis-portal-delete-items-review .items=${this.itemsWithImpactedItems} .portal=${this.portal} .user=${this.user}></arcgis-portal-delete-items-review></calcite-panel></div><calcite-button slot=footer-start appearance=solid kind=neutral @click=${async()=>await this.handleReviewDecision("exclude")}>${this.messages.exclude}</calcite-button><calcite-button slot=footer-end appearance=outline-fill kind=danger @click=${async()=>await this.handleReviewDecision("deprecate")}>${this.messages.deprecateInstead}</calcite-button><calcite-button slot=footer-end appearance=solid kind=danger @click=${async()=>await this.handleReviewDecision("delete")}>${this.messages.proceedToDelete}</calcite-button>`}renderRecycleBucket(){if(!this.recycleItems||this.recycleItems.length===0)return null;let t=!this.portal.recycleBinEnabled;return this.renderBucket({icon:t?"trash":"recycle-bin",label:t?this.messages.summary.permanentDelete.delete:this.messages.summary.willBeRecycled,description:t?this.messages.summary.permanentDelete.default.single:this.messages.summary.canBeRecovered.single.replace("{days}","14"),updated:this.recycleItems.some(({kind:e,updatedStatus:s})=>s==="recycle"&&s!==e),bucket:this.recycleItems,additionalContent:t?void 0:d`<calcite-checkbox class="bucket__checkbox" .label=${this.messages.permanentlyDeleteInstead} .labelText=${this.messages.permanentlyDeleteInstead} @calciteCheckboxChange=${e=>this.handlePermanentlyDeleteOverrideChange(e.target.checked)}></calcite-checkbox>`})}renderDeprecateBucket(){return this.deprecateItems.length===0?null:this.renderBucket({icon:"circle-disallowed",label:this.messages.summary.deprecate.label,description:this.messages.summary.deprecate.message,updated:this.deprecateItems.some(({kind:t,updatedStatus:e})=>e!==t&&e==="deprecate"),bucket:this.deprecateItems})}renderExcludeBucket(){return this.excludeItems.length===0?null:this.renderBucket({icon:"remove-from-list",label:this.messages.summary.exclude.label,description:this.messages.summary.exclude.message,updated:this.excludeItems.some(({kind:t,updatedStatus:e})=>e!==t&&e==="exclude"),bucket:this.excludeItems})}renderCannotDeleteBucket(){if(!this.cannotDeleteItems||this.cannotDeleteItems.length===0)return null;let t=this.cannotDeleteItems?.[0]?.reason,e=this.cannotDeleteItems[0]?.resultData?.length??0,s=this.messages.summary.protectedGroup.hasDependentItemsDescription;return this.renderBucket({icon:"security",label:this.messages.summary.cannotDelete,description:t==="hasDependentItems"?e>1?s.singleMultipleDependentItems:s.singleOneDependentItem:this.messages.summary.protectedGroup.deleteProtectedDescription,bucket:this.cannotDeleteItems,updated:this.cannotDeleteItems.some(({item:r})=>r.id&&this.updatedCannotDeleteItemIds.has(r.id))})}renderPermanentlyDeleteBucket(){if(!this.permanentlyDeleteItems||this.permanentlyDeleteItems.length===0)return null;let t=!this.portal.recycleBinEnabled;return this.renderBucket({icon:"trash",label:t?this.messages.summary.permanentDelete.delete:this.messages.summary.permanentlyDelete,description:t?this.messages.summary.permanentDelete.default.single:this.permanentlyDeleteItems.some(e=>this.isPermanentlyDeleteOverrideActive(e))?null:this.messages.summary.permanentDelete.notSupported.single,link:{href:`${w(this.portal)}${this.helpMap[120004692]||""}`,text:this.messages.moreInfo},bucket:this.permanentlyDeleteItems,dangerIcon:this.permanentlyDeleteItems.some(e=>this.isPermanentlyDeleteOverrideActive(e)),additionalContent:!t&&this.permanentlyDeleteItems.some(e=>this.isPermanentlyDeleteOverrideActive(e))?d`<calcite-checkbox class="bucket__checkbox" checked .label=${this.messages.permanentlyDeleteInstead} .labelText=${this.messages.permanentlyDeleteInstead} @calciteCheckboxChange=${e=>this.handlePermanentlyDeleteOverrideChange(e.target.checked)}></calcite-checkbox>`:void 0})}render(){let{loadedItems:t,portal:e}=this;return!t||!e?null:d`<calcite-dialog modal .open=${this.active} width=s .heading=${this.getHeaderText()} heading-level=2 outside-close-disabled escape-disabled kind=danger @calciteDialogClose=${this.handleDialogClose}><div slot=heading><span>${this.getHeaderText()}</span><br><span class="header-description">${this.getHeaderDescription()}</span></div>${this.reviewingDirectlyUsedByItems?this.renderReviewItems():this.renderDeleteSummary()}</calcite-dialog>`}};A("arcgis-portal-delete-items",C);return C},"portal/PortalItem","request",a,c,e,g,h,i,j,k)
|
package/dist/cdn/UBABQKPV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import c from"./AYO4VV3K.js";import b from"./MC3LJZSI.js";import a from"./RBGARTND.js";import{c as u}from"./QS3GXAIH.js";import{a as o}from"./QU2JYXVL.js";import{L as p,R as h,h as d,j as r}from"./CWSEBETE.js";export default $arcgis.t(([{a:g},{c:I},{a:f,b:b}])=>{var k=d`:host{display:block}.items-directly-using{display:flex;justify-content:space-between;align-items:center;padding-block-end:.75rem}.impacted-items-labels{display:flex;flex-direction:column}.impacted-items-title{font-weight:500}.impacted-items-access-count{font-size:var(--calcite-font-size--2)}.view-full-list{margin:.5rem 0}calcite-block{--calcite-block-icon-start-color: var(--calcite-color-status-warning)}calcite-list{max-block-size:250px;overflow-y:auto}`,w=20,n=class extends p{constructor(){super(...arguments),this.messages=o({blocking:!0}),this.browserMessages=o({name:"portal-browser",blocking:!0}),this.deleteMessages=o({name:"portal-delete-items",blocking:!0}),this.userRequestId=0,this.itemGroups={},this.sourceItem=null,this.relatedItems=[],this.showDependentItems=!1}static{this.properties={itemGroups:16,sourceItem:0,relatedItems:0,relatedItemsCount:9,showDependentItems:5,portal:0,user:0}}static{this.styles=[k,f]}willUpdate(e){(e.has("relatedItems")||e.has("portal")||e.has("user"))&&(this.itemGroups={},this.loadGroupSharing(++this.userRequestId))}async loadGroupSharing(e){let{portal:t,relatedItems:i}=this,s=this.user??t?.user;if(!t||!s?.username||!i.length)return;let c=await g(s.username,t);if(e!==this.userRequestId)return;let{result:a}=await I(t,c,i);e===this.userRequestId&&(this.itemGroups=a??{})}render(){let e=this.relatedItemsCount??this.relatedItems.length;if(!e&&!this.relatedItems.length)return null;let t=new Intl.NumberFormat(this.deleteMessages._t9nLocale),i=t.format(e),s=this.showDependentItems?this.deleteMessages.dependentItems:this.deleteMessages.impactedItems.title,c=this.showDependentItems?this.deleteMessages.itemsDependingOnThisItem:this.deleteMessages.deletingWillImpactOtherItems,a=this.portal&&this.sourceItem?`${u({portal:this.portal})}/item.html?id=${this.sourceItem.id}#usage`:void 0,m=()=>{a&&window.open(a,"_blank")};return r`<calcite-block .heading=${c.replace("{count}",i)} collapsible .label=${s} icon-start=exclamation-mark-triangle><div class="items-directly-using"><div class="impacted-items-labels"><span class="impacted-items-title">${s}</span>${!this.showDependentItems&&r`<span class="impacted-items-access-count">${this.deleteMessages.impactedItems.itemsYouHaveAccessTo.replace("{accessCount}",t.format(this.relatedItems.length)).replace("{totalCount}",i)}</span>`||""}</div><calcite-button appearance=transparent icon-end=launch @click=${m}>${this.deleteMessages.impactedItems["View usage"]}</calcite-button></div><calcite-list .label=${s}>${this.relatedItems.slice(0,w).map(l=>b({item:l,portal:this.portal,user:this.user,lang:this.messages._lang,modifiedLabel:this.browserMessages.filterDate.modified,access:{level:l.access,groupIds:l.id?this.itemGroups[l.id]:void 0}}))}</calcite-list>${this.relatedItems.length>w&&r`<calcite-button class="view-full-list" appearance=transparent icon-end=launch @click=${m}>${this.deleteMessages.impactedItems["View full list"]}</calcite-button>`||""}</calcite-block>`}};h("arcgis-portal-review-related-items",n);return n},a,b,c)
|