@arcgis/core 4.30.0-next.20240521 → 4.30.0-next.20240523
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/WebMap.js +1 -1
- package/assets/components/assets/icon/developerCredentials16.json +1 -0
- package/assets/components/assets/icon/developerCredentials24.json +1 -0
- package/assets/components/assets/icon/developerCredentials32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d7722531be4892293cb1.js → 00c49f6c84444e69f3a1.js} +1 -1
- package/assets/esri/core/workers/chunks/01927419855947110cc1.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{df26d7d07fed1f124fc2.js → 0903b492782dca69eb48.js} +1 -1
- package/assets/esri/core/workers/chunks/158c05b16372d8ed33ea.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/190913c221964292333b.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{2529a4b1e135223833f0.js → 2635ab64e75d4ec700a8.js} +1 -1
- package/assets/esri/core/workers/chunks/{f965644347007e3d68e2.js → 27dc94db9ed42b237ecb.js} +1 -1
- package/assets/esri/core/workers/chunks/{e727392db3b7998e5c28.js → 357707efc0cb8a1842c1.js} +1 -1
- package/assets/esri/core/workers/chunks/{0ae3ea7a73f3b5083968.js → 3a01cf7e3355f3c78378.js} +1 -1
- package/assets/esri/core/workers/chunks/4268373bf374b2a6252a.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/43e1c935452b489e422e.js +1 -0
- package/assets/esri/core/workers/chunks/{938b158a7edbbb8e08a1.js → 44f8b57b0d8cfeabda1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{15212a82e283d6df2873.js → 4ae885f257660545ceeb.js} +1 -1
- package/assets/esri/core/workers/chunks/{4ea2ced4b5ea1c8a1cee.js → 4ba866a10711b6a8158f.js} +1 -1
- package/assets/esri/core/workers/chunks/50ee28a1944bde74a7c1.js +1 -0
- package/assets/esri/core/workers/chunks/{d745c2df59e5d6c7a1dd.js → 53aa9124c11c03f70521.js} +1 -1
- package/assets/esri/core/workers/chunks/59b193d42e8abf9d4088.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{eafbe663f7a61d3222c5.js → 5efe1300a39ab9c7bbab.js} +1 -1
- package/assets/esri/core/workers/chunks/{eac4ec8c410eaf9e621c.js → 606f8b907166190a8b65.js} +2 -2
- package/assets/esri/core/workers/chunks/{eac4ec8c410eaf9e621c.js.LICENSE.txt → 606f8b907166190a8b65.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/653da6469fe62e061efc.js +1 -0
- package/assets/esri/core/workers/chunks/{5349b0de83ae4be8afe2.js → 6c1ded9acf5c8be493ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{46225ebc10a4398170b5.js → 712ba8ad69b1aab6f508.js} +1 -1
- package/assets/esri/core/workers/chunks/{7d210c2a5a135da2c37d.js → 7c68dc664c0b4cf2a46b.js} +1 -1
- package/assets/esri/core/workers/chunks/88c7d84a1fde246ca71f.js +1 -0
- package/assets/esri/core/workers/chunks/9b04a666726b5d2ff3c5.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/9c75837b7e75f0f38dc0.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/a6b138f330625d98f856.js +1 -0
- package/assets/esri/core/workers/chunks/{e4a0fd9e0f8887009b92.js → a8a19e5a7ae4ec16480a.js} +1 -1
- package/assets/esri/core/workers/chunks/{fcf0016d56df8a69f6c1.js → aa198e898b46c6e89d0b.js} +1 -1
- package/assets/esri/core/workers/chunks/b2562f5d0d5a44dc004e.js +1 -0
- package/assets/esri/core/workers/chunks/{04faa3bf4ef5a6f0ccb4.js → b3de9bc3e75476b0a7e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{bd0545bb100b3393fd85.js → bbec62f8792520993909.js} +1 -1
- package/assets/esri/core/workers/chunks/bcd230d67bac27a1b36d.js +1 -0
- package/assets/esri/core/workers/chunks/bf6e75cc75d3bdfb70cb.js +1 -0
- package/assets/esri/core/workers/chunks/{5acac4616c53a95cc48f.js → c0c8e1a709648e1305c6.js} +1 -1
- package/assets/esri/core/workers/chunks/c80568ff68be908b3c30.js +1 -0
- package/assets/esri/core/workers/chunks/{85f24b441369e50e6ee1.js → c96ab8d56830b8ce07ed.js} +1 -1
- package/assets/esri/core/workers/chunks/{4f3a87586e334c52d0bf.js → caffbaa8b0a67d117f34.js} +1 -1
- package/assets/esri/core/workers/chunks/ccad364912ff1d85a9dc.js +1 -0
- package/assets/esri/core/workers/chunks/{7b4ed96554722be59ae2.js → d8140b5316e80d734155.js} +1 -1
- package/assets/esri/core/workers/chunks/dde183c6bb1710ff16df.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/e3711bc5b100b64cac3a.js +1 -0
- package/assets/esri/core/workers/chunks/{2d5d66cee7c3ec992bcd.js → e93e59f6907fa4c1081c.js} +1 -1
- package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +15 -1
- package/assets/esri/themes/base/widgets/_Grid.scss +4 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/Theme.js +1 -1
- package/chunks/Tooltip.js +1 -1
- package/chunks/chartUtilsAm5.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/workers/InvokeHandler.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/interfaces.d.ts +543 -77
- package/layers/BuildingSceneLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/mixins/OperationalLayer.js +1 -1
- package/layers/support/editableLayers.js +1 -1
- package/package.json +2 -2
- package/portal/PortalItem.js +1 -1
- package/portal/schemas/buildingSceneLayerItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/printTaskUtils.js +1 -1
- package/smartMapping/renderers/support/referenceSizeUtils.js +1 -1
- package/smartMapping/support/adapters/support/layerUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/views/2d/GoToManager.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/utils.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/PipelineConnectionHandlers.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
- package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
- package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils.js +1 -1
- package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/editingTools/undoRecords.js +5 -0
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +4 -0
- package/widgets/CatalogLayerList.d.ts +4 -0
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/FeatureForm/support/textManipulationUtils.js +1 -1
- package/widgets/FeatureTable/VisibleElements.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList/support/layerListUtils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/assets/esri/core/workers/chunks/0753c636c2801f067235.js +0 -1
- package/assets/esri/core/workers/chunks/3716015ccf0888c0a21d.js +0 -1
- package/assets/esri/core/workers/chunks/3f86042d9c0cc2d9acba.js +0 -1
- package/assets/esri/core/workers/chunks/50936725c9bd23b780ef.js +0 -1
- package/assets/esri/core/workers/chunks/5c8c5290b9fcb5a4468f.js +0 -1
- package/assets/esri/core/workers/chunks/95fb6643bd54d354f266.js +0 -1
- package/assets/esri/core/workers/chunks/aa020d495f464eff0134.js +0 -1
- package/assets/esri/core/workers/chunks/b52295fa9cf2f3244b65.js +0 -1
- package/assets/esri/core/workers/chunks/cbb3a56e4072cdf25a9d.js +0 -1
- package/assets/esri/core/workers/chunks/f4f1e1c1758542434384.js +0 -1
- package/assets/esri/core/workers/chunks/fb48e8e42379fdf8a094.js +0 -1
- package/views/3d/interactive/editingTools/transform/undoRecords.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../core/Collection.js";import t from"../core/CollectionFlattener.js";import s from"../core/Error.js";import{clone as i}from"../core/lang.js";import{loadAll as o}from"../core/loadAll.js";import a from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as n}from"../core/promiseUtils.js";import{join as p}from"../core/urlUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../core/accessorSupport/decorators/subclass.js";import c from"../geometry/SpatialReference.js";import m from"./Layer.js";import h from"./buildingSublayers/BuildingComponentSublayer.js";import b from"./buildingSublayers/BuildingGroupSublayer.js";import{APIKeyMixin as v}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as S}from"./mixins/OperationalLayer.js";import{PortalLayer as j}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as w}from"./mixins/ScaleRangeLayer.js";import{SceneService as O,SaveOperationType as I}from"./mixins/SceneService.js";import{
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../core/Collection.js";import t from"../core/CollectionFlattener.js";import s from"../core/Error.js";import{clone as i}from"../core/lang.js";import{loadAll as o}from"../core/loadAll.js";import a from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as n}from"../core/promiseUtils.js";import{join as p}from"../core/urlUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../core/accessorSupport/decorators/subclass.js";import c from"../geometry/SpatialReference.js";import m from"./Layer.js";import h from"./buildingSublayers/BuildingComponentSublayer.js";import b from"./buildingSublayers/BuildingGroupSublayer.js";import{APIKeyMixin as v}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as S}from"./mixins/OperationalLayer.js";import{PortalLayer as j}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as w}from"./mixins/ScaleRangeLayer.js";import{SceneService as O,SaveOperationType as I}from"./mixins/SceneService.js";import{findAssociatedFeatureService as _}from"./support/associatedFeatureServiceUtils.js";import L from"./support/BuildingFilter.js";import T from"./support/BuildingSummaryStatistics.js";import{sceneLayerFullExtent as x,legendEnabled as A,readOnlyService as E,elevationInfo as F}from"./support/commonProperties.js";import{logInvalidElevationInfoWarning as P,elevationModeRequiredMessage as B,featureExpressionUnsupportedMessage as K}from"../support/elevationInfoUtils.js";const C=r.ofType(L),R=i(b.sublayersProperty),U=R.json?.origins;U&&(U["web-scene"]={type:[h],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},U["portal-item"]={type:[h],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let M=class extends(O(f(S(j(w(l(g(v(m))))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new t({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._sublayerOverrides=null,this.filters=new C,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,r,t){const s=b.readSublayers(e,r,t);return b.forEachSublayer(s,(e=>e.layer=this)),this._sublayerOverrides&&(this.applySublayerOverrides(s,this._sublayerOverrides),this._sublayerOverrides=null),s}applySublayerOverrides(e,{overrides:r,context:t}){b.forEachSublayer(e,(e=>e.read(r.get(e.id),t)))}readSublayerOverrides(e,r){const t=new Map;for(const i of e)null!=i&&"object"==typeof i&&"number"==typeof i.id?t.set(i.id,i):r.messages?.push(new s("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:i}));return{overrides:t,context:r}}writeSublayerOverrides(e,r,t){const s=[];b.forEachSublayer(this.sublayers,(e=>{const r=e.write({},t);Object.keys(r).length>1&&s.push(r)})),s.length>0&&(r.sublayers=s)}writeUnappliedOverrides(e,r){r.sublayers=[],e.overrides.forEach((e=>{r.sublayers.push(i(e))}))}write(e,r){return e=super.write(e,r),!r||"web-scene"!==r.origin&&"portal-item"!==r.origin||(this.sublayers?this.writeSublayerOverrides(this.sublayers,e,r):this._sublayerOverrides&&this.writeUnappliedOverrides(this._sublayerOverrides,e)),e}read(e,r){if(super.read(e,r),r&&("web-scene"===r.origin||"portal-item"===r.origin)&&null!=e&&Array.isArray(e.sublayers)){const t=this.readSublayerOverrides(e.sublayers,r);this.sublayers?this.applySublayerOverrides(this.sublayers,t):this._sublayerOverrides=t}}readSummaryStatistics(e,r){if("string"==typeof r.statisticsHRef){const e=p(this.parsedUrl?.path,r.statisticsHRef);return new T({url:e})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const r=null!=e?e.signal:null,t=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(n).then((()=>this._fetchService(r))).then((()=>this._fetchAssociatedFeatureService(r)));return this.addResolvingPromise(t),Promise.resolve(this)}loadAll(){return o(this,(e=>{b.forEachSublayer(this.sublayers,(r=>{"building-group"!==r.type&&e(r)})),this.summaryStatistics&&e(this.summaryStatistics)}))}async saveAs(e,r){return this._debouncedSaveOperations(I.SAVE_AS,{...r,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(I.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new s("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:r}=await _(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=r}catch(r){a.getLogger(this).warn("Associated feature service item could not be loaded",r)}}_validateElevationInfo(){const e=this.elevationInfo,r="Building scene layers";P(a.getLogger(this),B(r,"absolute-height",e)),P(a.getLogger(this),K(r,e))}};e([y({type:["BuildingSceneLayer"]})],M.prototype,"operationalLayerType",void 0),e([y({readOnly:!0})],M.prototype,"allSublayers",void 0),e([y(R)],M.prototype,"sublayers",void 0),e([u("service","sublayers")],M.prototype,"readSublayers",null),e([y({type:C,nonNullable:!0,json:{write:!0}})],M.prototype,"filters",void 0),e([y({type:String,json:{write:!0}})],M.prototype,"activeFilterId",void 0),e([y({readOnly:!0,type:T})],M.prototype,"summaryStatistics",void 0),e([u("summaryStatistics",["statisticsHRef"])],M.prototype,"readSummaryStatistics",null),e([y({type:[String],json:{read:!1}})],M.prototype,"outFields",void 0),e([y(x)],M.prototype,"fullExtent",void 0),e([y(A)],M.prototype,"legendEnabled",void 0),e([y({type:["show","hide","hide-children"]})],M.prototype,"listMode",void 0),e([y(E(c))],M.prototype,"spatialReference",void 0),e([y(F)],M.prototype,"elevationInfo",null),e([y({json:{read:!1},readOnly:!0})],M.prototype,"type",void 0),e([y()],M.prototype,"associatedFeatureServiceItem",void 0),M=e([d("esri.layers.BuildingSceneLayer")],M);const H=M;export{H as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as a,throwIfAbortError as n}from"../core/promiseUtils.js";import{watch as l}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{ensureClass as c,Integer as m}from"../core/accessorSupport/ensureType.js";import"../core/RandomLCG.js";import"../core/has.js";import{enumeration as u}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import d from"./Layer.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as v}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{PortalLayer as R}from"./mixins/PortalLayer.js";import{RefreshableLayer as S}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as F}from"./mixins/TemporalLayer.js";import{legendEnabled as b}from"./support/commonProperties.js";import _ from"./support/Field.js";import{interpolationKebab as O}from"./support/rasterEnums.js";import P from"./support/RasterFunction.js";import
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as a,throwIfAbortError as n}from"../core/promiseUtils.js";import{watch as l}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{ensureClass as c,Integer as m}from"../core/accessorSupport/ensureType.js";import"../core/RandomLCG.js";import"../core/has.js";import{enumeration as u}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import d from"./Layer.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as v}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{PortalLayer as R}from"./mixins/PortalLayer.js";import{RefreshableLayer as S}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as F}from"./mixins/TemporalLayer.js";import{legendEnabled as b}from"./support/commonProperties.js";import _ from"./support/Field.js";import{interpolationKebab as O}from"./support/rasterEnums.js";import P from"./support/RasterFunction.js";import I from"./support/rasterDatasets/FunctionRaster.js";import x from"./support/rasterDatasets/RasterFactory.js";import{getPrimaryRasterUrls as T,create as L}from"./support/rasterFunctions/rasterFunctionHelper.js";import{createPopupTemplate as N}from"../support/popupUtils.js";import{SaveOperationType as J}from"../webdoc/interfaces.js";let C=class extends(f(j(w(R(g(v(F(y(S(o(r(d)))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=a((async(e,t,r)=>{const{save:s,saveAs:i}=await import("./save/imageryUtils.js");switch(e){case J.SAVE:return s(this,t);case J.SAVE_AS:return i(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(n).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[new _({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"}),new _({name:"Raster.ServicePixelValue.Raw",alias:"Raw Pixel Value",domain:null,editable:!1,length:50,type:"string"})],t=this.raster?.rasterInfo??this.serviceRasterInfo,r=t?.attributeTable,s=null!=r?r.fields:null,i="Raster.";if(s){const t=s.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const t=e.clone();return t.name=i+e.name,t}));e.push(...t)}const o=t?.dataType,a=t?.multidimensionalInfo;if(("vector-magdir"===o||"vector-uv"===o)&&null!=a){const t=a.variables[0].unit?.trim(),r="Magnitude"+(t?` (${t})`:"");e.push(new _({name:"Raster.Magnitude",alias:r,domain:null,editable:!1,type:"double"})),e.push(new _({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}createPopupTemplate(e){const{rasterFields:t}=this,r=new Set(t.map((({name:e})=>e)).filter((e=>"raster.servicepixelvalue.raw"!==e.toLowerCase())));return N({fields:t,title:this.title},{...e,visibleFieldNames:r})}async generateRasterInfo(e,t){if(e=c(P,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:r}=await this._openFunctionRaster(e,t);return r}catch(r){if(r instanceof s)throw r;throw new s("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(J.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(J.SAVE_AS,t,e)}write(e,t){const r=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===r.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new s("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t="Function"===this.raster.datasetFormat;else{const{url:t,rasterFunction:r,source:i}=this;if(!t&&!i)throw new s("imagery-tile-layer:open","missing url or source parameter");i?await this._openFromSource(i,e):r?await this._openFromUrlWithRasterFunction(t,r,e):await this._openFromUrl(t,e)}const r=this.raster.rasterInfo;if(!r)throw new s("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?r:this._primaryRasters[0].rasterInfo),this._set("spatialReference",r.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(l((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters="Function"===e.datasetFormat?e.primaryRasters.rasters:[e],this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,r){const i=[e];t&&T(t.toJSON(),i);const o=await Promise.all(i.map((e=>x.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:r})))),a=o.findIndex((e=>null==e));if(a>-1)throw new s("imagery-tile-layer:open",`cannot open raster: ${i[a]}`);return this._primaryRasters=o,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const r=await x.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new s("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[r],this.raster=r}async _openFromSource(e,t){const r="the tiled imagery data source is not supported",i="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!i)throw new s("imagery-tile-layer:open",r);"MEMORY"===i&&(e={extent:e.extent,pixelBlocks:[e.pixelBlock]});const o=await x.open({url:"",source:e,datasetFormat:i,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==o)throw new s("imagery-tile-layer:open",r);this._primaryRasters=[o],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=o}async _openFunctionRaster(e,t){const r={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>r[e.url]=e));const s=L(e.functionDefinition?.toJSON()??e.toJSON(),r),i=new I({rasterFunction:s});return await i.open(t),i}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(r){r instanceof s&&i.getLogger(this).error("imagery-tile-layer:open",r.message),i.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}};e([p({clonable:!1})],C.prototype,"_primaryRasters",void 0),e([p({type:[m],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],C.prototype,"bandIds",void 0),e([p({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),u(O)],C.prototype,"interpolation",void 0),e([p(b)],C.prototype,"legendEnabled",void 0),e([p({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],C.prototype,"isReference",void 0),e([p({type:["show","hide"]})],C.prototype,"listMode",void 0),e([p({json:{read:!0,write:!0}})],C.prototype,"blendMode",void 0),e([p()],C.prototype,"sourceJSON",void 0),e([p({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],C.prototype,"version",void 0),e([p({readOnly:!0,json:{read:!1}})],C.prototype,"type",void 0),e([p({type:["ArcGISTiledImageServiceLayer"]})],C.prototype,"operationalLayerType",void 0),e([p({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],C.prototype,"popupEnabled",void 0),e([p({type:t,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],C.prototype,"popupTemplate",void 0),e([p({readOnly:!0})],C.prototype,"defaultPopupTemplate",null),e([p({readOnly:!0,type:[_]})],C.prototype,"fields",void 0),e([p({readOnly:!0,type:[_]})],C.prototype,"rasterFields",null),e([p({constructOnly:!0})],C.prototype,"source",void 0),C=e([h("esri.layers.ImageryTileLayer")],C);const M=C;export{M as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import"../../renderers/Renderer.js";import"../../renderers/SimpleRenderer.js";import"../../renderers/UniqueValueRenderer.js";import"../../renderers/support/jsonUtils.js";import{webSceneRendererTypes as s}from"../../renderers/support/types.js";import o from"../../request.js";import i from"../../core/Error.js";import{JSONMap as a}from"../../core/jsonMap.js";import n from"../../core/Loadable.js";import p from"../../core/Logger.js";import{EsriPromiseMixin as l}from"../../core/Promise.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as u}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as y}from"../../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Extent.js";import h from"../../geometry/SpatialReference.js";import f from"../FeatureLayer.js";import g from"./BuildingSublayer.js";import{TemporalSceneLayer as j}from"../mixins/TemporalSceneLayer.js";import{zeroCapabilities as v}from"../support/capabilities.js";import{popupEnabled as b}from"../support/commonProperties.js";import{defineFieldProperties as L}from"../support/fieldProperties.js";import I from"../support/FieldsIndex.js";import{unpackFieldNames as S}from"../support/fieldUtils.js";import{fetchIndexInfo as F}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as w,I3SMaterialDefinition as x,I3STextureSetDefinition as O,I3SGeometryDefinition as P}from"../support/I3SLayerDefinitions.js";import{fetchStatistics as T}from"../support/sceneLayerStatistics.js";import q from"../../rest/support/Query.js";import{createPopupTemplate as R}from"../../support/popupUtils.js";import U from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as D}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Q,getFetchPopupTemplate as E}from"../../views/layers/support/popupUtils.js";const A=L();let C=class extends(j(n.LoadableMixin(l(g)))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new I(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,s=t.associatedLayerID;return null!=r&&"number"==typeof s?new f({portalItem:r,customParameters:this.customParameters,layerId:s}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=F(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.getLogger(this),t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return R(this,e)}async _fetchService(e){const t=(await o(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl}),await this.loadTimeInfoFromService({signal:e})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:v,{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}=e;return{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}}get useViewTime(){return this.layer.useViewTime}createQuery(){const e=new q;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}async queryCachedAttributes(e,t){const r=S(this.fieldsIndex,await Q(this,E(this)));return D(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const s=await this.queryCachedAttributes(e,[r]);if(!s||0===s.length)throw new i("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:s[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}async fetchStatistics(e,t){return await T({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"buildingcomponentsublayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([d({readOnly:!0})],C.prototype,"parsedUrl",null),e([d({type:w,readOnly:!0})],C.prototype,"nodePages",void 0),e([d({type:[x],readOnly:!0})],C.prototype,"materialDefinitions",void 0),e([d({type:[O],readOnly:!0})],C.prototype,"textureSetDefinitions",void 0),e([d({type:[P],readOnly:!0})],C.prototype,"geometryDefinitions",void 0),e([d({readOnly:!0})],C.prototype,"serviceUpdateTimeStamp",void 0),e([d({readOnly:!0})],C.prototype,"store",void 0),e([d({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],C.prototype,"rootNode",void 0),e([d({readOnly:!0})],C.prototype,"attributeStorageInfo",void 0),e([d(A.fields)],C.prototype,"fields",void 0),e([d({readOnly:!0})],C.prototype,"fieldsIndex",null),e([d({readOnly:!0,type:f})],C.prototype,"associatedLayer",void 0),e([y("service","associatedLayer",["associatedLayerID"])],C.prototype,"readAssociatedLayer",null),e([d(A.outFields)],C.prototype,"outFields",void 0),e([d({type:String,readOnly:!0})],C.prototype,"objectIdField",null),e([d({readOnly:!0,type:String,json:{read:!1}})],C.prototype,"displayField",null),e([d({readOnly:!0,type:String})],C.prototype,"apiKey",null),e([d({readOnly:!0,type:String})],C.prototype,"customParameters",null),e([d({readOnly:!0,type:m})],C.prototype,"fullExtent",null),e([d({readOnly:!0,type:h})],C.prototype,"spatialReference",null),e([d({readOnly:!0})],C.prototype,"version",null),e([d({readOnly:!0,type:U})],C.prototype,"elevationInfo",null),e([d({readOnly:!0,type:Number})],C.prototype,"minScale",null),e([d({readOnly:!0,type:Number})],C.prototype,"maxScale",null),e([d({readOnly:!0,type:Number})],C.prototype,"effectiveScaleRange",null),e([d({type:["hide","show"],json:{write:!0}})],C.prototype,"listMode",void 0),e([d({types:s,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],C.prototype,"renderer",void 0),e([d({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],C.prototype,"definitionExpression",void 0),e([d(b)],C.prototype,"popupEnabled",void 0),e([d({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],C.prototype,"popupTemplate",void 0),e([d({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],C.prototype,"normalReferenceFrame",void 0),e([d({readOnly:!0,json:{read:!1}})],C.prototype,"defaultPopupTemplate",null),e([d()],C.prototype,"types",null),e([d()],C.prototype,"typeIdField",null),e([d({json:{write:!1}}),u(new a({"3DObject":"3d-object",Point:"point"}))],C.prototype,"layerType",void 0),e([d()],C.prototype,"geometryType",null),e([d()],C.prototype,"profile",null),e([d({readOnly:!0,json:{read:!1}})],C.prototype,"capabilities",null),e([d({type:Boolean,readOnly:!0})],C.prototype,"useViewTime",null),e([d({readOnly:!0})],C.prototype,"statisticsInfo",void 0),C=e([c("esri.layers.buildingSublayers.BuildingComponentSublayer")],C);const _=C;export{_ as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import"../../renderers/Renderer.js";import"../../renderers/SimpleRenderer.js";import"../../renderers/UniqueValueRenderer.js";import"../../renderers/support/jsonUtils.js";import{webSceneRendererTypes as o}from"../../renderers/support/types.js";import s from"../../request.js";import i from"../../core/Error.js";import{JSONMap as a}from"../../core/jsonMap.js";import n from"../../core/Loadable.js";import p from"../../core/Logger.js";import{EsriPromiseMixin as l}from"../../core/Promise.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as u}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as y}from"../../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Extent.js";import h from"../../geometry/SpatialReference.js";import f from"../FeatureLayer.js";import g from"./BuildingSublayer.js";import{zeroCapabilities as j}from"../support/capabilities.js";import{popupEnabled as v}from"../support/commonProperties.js";import{defineFieldProperties as b}from"../support/fieldProperties.js";import L from"../support/FieldsIndex.js";import{unpackFieldNames as I}from"../support/fieldUtils.js";import{fetchIndexInfo as S}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as F,I3SMaterialDefinition as w,I3STextureSetDefinition as O,I3SGeometryDefinition as x}from"../support/I3SLayerDefinitions.js";import P from"../../rest/support/Query.js";import{createPopupTemplate as q}from"../../support/popupUtils.js";import T from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as R}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as U,getFetchPopupTemplate as D}from"../../views/layers/support/popupUtils.js";const Q=b();let E=class extends(n.LoadableMixin(l(g))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new L(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,o=t.associatedLayerID;return null!=r&&"number"==typeof o?new f({portalItem:r,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=S(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.getLogger(this),t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return q(this,e)}async _fetchService(e){const t=(await s(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:j,{query:t,data:{supportsZ:r,supportsM:o,isVersioned:s}}=e;return{query:t,data:{supportsZ:r,supportsM:o,isVersioned:s}}}createQuery(){const e=new P;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}async queryCachedAttributes(e,t){const r=I(this.fieldsIndex,await U(this,D(this)));return R(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new i("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([d({readOnly:!0})],E.prototype,"parsedUrl",null),e([d({type:F,readOnly:!0})],E.prototype,"nodePages",void 0),e([d({type:[w],readOnly:!0})],E.prototype,"materialDefinitions",void 0),e([d({type:[O],readOnly:!0})],E.prototype,"textureSetDefinitions",void 0),e([d({type:[x],readOnly:!0})],E.prototype,"geometryDefinitions",void 0),e([d({readOnly:!0})],E.prototype,"serviceUpdateTimeStamp",void 0),e([d({readOnly:!0})],E.prototype,"store",void 0),e([d({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],E.prototype,"rootNode",void 0),e([d({readOnly:!0})],E.prototype,"attributeStorageInfo",void 0),e([d(Q.fields)],E.prototype,"fields",void 0),e([d({readOnly:!0})],E.prototype,"fieldsIndex",null),e([d({readOnly:!0,type:f})],E.prototype,"associatedLayer",void 0),e([y("service","associatedLayer",["associatedLayerID"])],E.prototype,"readAssociatedLayer",null),e([d(Q.outFields)],E.prototype,"outFields",void 0),e([d({type:String,readOnly:!0})],E.prototype,"objectIdField",null),e([d({readOnly:!0,type:String,json:{read:!1}})],E.prototype,"displayField",null),e([d({readOnly:!0,type:String})],E.prototype,"apiKey",null),e([d({readOnly:!0,type:String})],E.prototype,"customParameters",null),e([d({readOnly:!0,type:m})],E.prototype,"fullExtent",null),e([d({readOnly:!0,type:h})],E.prototype,"spatialReference",null),e([d({readOnly:!0})],E.prototype,"version",null),e([d({readOnly:!0,type:T})],E.prototype,"elevationInfo",null),e([d({readOnly:!0,type:Number})],E.prototype,"minScale",null),e([d({readOnly:!0,type:Number})],E.prototype,"maxScale",null),e([d({readOnly:!0,type:Number})],E.prototype,"effectiveScaleRange",null),e([d({type:["hide","show"],json:{write:!0}})],E.prototype,"listMode",void 0),e([d({types:o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],E.prototype,"renderer",void 0),e([d({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],E.prototype,"definitionExpression",void 0),e([d(v)],E.prototype,"popupEnabled",void 0),e([d({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],E.prototype,"popupTemplate",void 0),e([d({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],E.prototype,"normalReferenceFrame",void 0),e([d({readOnly:!0,json:{read:!1}})],E.prototype,"defaultPopupTemplate",null),e([d()],E.prototype,"types",null),e([d()],E.prototype,"typeIdField",null),e([d({json:{write:!1}}),u(new a({"3DObject":"3d-object",Point:"point"}))],E.prototype,"layerType",void 0),e([d()],E.prototype,"geometryType",null),e([d()],E.prototype,"profile",null),e([d({readOnly:!0,json:{read:!1}})],E.prototype,"capabilities",null),e([d({readOnly:!0})],E.prototype,"statisticsInfo",void 0),E=e([c("esri.layers.buildingSublayers.BuildingComponentSublayer")],E);const A=E;export{A as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../TimeExtent.js";import t from"../../core/Error.js";import{isBlobProtocol as i}from"../../core/urlUtils.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{Integer as s,Null as n}from"../../core/accessorSupport/ensureType.js";import"../../core/RandomLCG.js";import"../../core/has.js";import{reader as a}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as y}from"../../core/accessorSupport/layerContainerType.js";import{readLoadable as m}from"../../core/accessorSupport/read.js";import{willPropertyWrite as c}from"../../core/accessorSupport/write.js";import{supportedTypes as d}from"./operationalLayers.js";import{listMode as u,opacity as w}from"../support/commonProperties.js";const b=b=>{let T=class extends b{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,r,t){return"Group Layer"===t?.portalItem?.type?void 0:e}writeListMode(e,r,t,i){(i&&"ground"===i.layerContainerType||e&&c(this,t,{},i))&&(r[t]=e)}writeOperationalLayerType(e,r,t,i){e&&"tables"!==i?.layerContainerType&&(r.layerType=e)}writeTitle(e,r){r.title=e??"Layer"}readTimeExtent(e){return e?r.fromArray(e):null}writeTimeExtent(e,r,i,o){e&&"tables"!==o.layerContainerType&&(e.isEmpty?o?.messages&&o.messages.push(new t("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):r[i]=e.toArray())}read(e,r){r&&(r.layer=this),m(this,e,(r=>super.read(e,r)),r)}write(e,r){if(!this.persistenceEnabled)return null;if(r?.origin){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`,i=d[e];let o=!!i?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(o=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(o=!1),!o)return r.messages?.push(new t("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const o=super.write(e,{...r,layer:this}),s=!!r&&!!r.messages&&!!r.messages.filter((e=>e instanceof t&&"web-document-write:property-required"===e.name)).length;return i(o?.url)?(r?.messages?.push(new t("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&s?null:o}beforeSave(){}};return e([o({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],T.prototype,"id",void 0),e([a("id",["id"])],T.prototype,"readId",null),e([o(u)],T.prototype,"listMode",void 0),e([l("listMode")],T.prototype,"writeListMode",null),e([o({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:y}}}}})],T.prototype,"operationalLayerType",void 0),e([l("operationalLayerType")],T.prototype,"writeOperationalLayerType",null),e([o(w)],T.prototype,"opacity",void 0),e([o({type:Boolean,readOnly:!1})],T.prototype,"persistenceEnabled",void 0),e([o({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],T.prototype,"title",void 0),e([l("title"),l(["web-scene"],"title")],T.prototype,"writeTitle",null),e([o({type:r,json:{origins:{"web-scene":{write:{layerContainerTypes:y}}}}})],T.prototype,"visibilityTimeExtent",void 0),e([a("visibilityTimeExtent")],T.prototype,"readTimeExtent",null),e([l(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[s,n]]}})],T.prototype,"writeTimeExtent",null),e([o({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:y}}},name:"visibility",write:!0}})],T.prototype,"visible",void 0),T=e([p("esri.layers.mixins.OperationalLayer")],T),T};function T(e){return"operationalLayerType"in e}export{b as OperationalLayer,T as isOperationalLayer};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../TimeExtent.js";import t from"../../core/Error.js";import{isBlobProtocol as i}from"../../core/urlUtils.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{Integer as s,Null as n}from"../../core/accessorSupport/ensureType.js";import"../../core/RandomLCG.js";import"../../core/has.js";import{reader as a}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as y}from"../../core/accessorSupport/layerContainerType.js";import{readLoadable as m}from"../../core/accessorSupport/read.js";import{willPropertyWrite as c}from"../../core/accessorSupport/write.js";import{supportedTypes as d}from"./operationalLayers.js";import{listMode as u,opacity as w}from"../support/commonProperties.js";const b=b=>{let T=class extends b{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,r,t){return"Group Layer"===t?.portalItem?.type?void 0:e}writeListMode(e,r,t,i){(i&&"ground"===i.layerContainerType||e&&c(this,t,{},i))&&(r[t]=e)}writeOperationalLayerType(e,r,t,i){e&&"tables"!==i?.layerContainerType&&(r.layerType=e)}writeTitle(e,r){r.title=e??"Layer"}readTimeExtent(e){return e?r.fromArray(e):null}writeTimeExtent(e,r,i,o){e&&"tables"!==o.layerContainerType&&(e.isEmpty?o?.messages&&o.messages.push(new t("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):r[i]=e.toArray())}read(e,r){r&&(r.layer=this),m(this,e,(r=>super.read(e,r)),r)}write(e,r){if(!this.persistenceEnabled&&!r?.ignorePersistenceEnabled)return null;if(r?.origin){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`,i=d[e];let o=!!i?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(o=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(o=!1),!o)return r.messages?.push(new t("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const o=super.write(e,{...r,layer:this}),s=!!r&&!!r.messages&&!!r.messages.filter((e=>e instanceof t&&"web-document-write:property-required"===e.name)).length;return i(o?.url)?(r?.messages?.push(new t("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&s?null:o}beforeSave(){}};return e([o({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],T.prototype,"id",void 0),e([a("id",["id"])],T.prototype,"readId",null),e([o(u)],T.prototype,"listMode",void 0),e([l("listMode")],T.prototype,"writeListMode",null),e([o({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:y}}}}})],T.prototype,"operationalLayerType",void 0),e([l("operationalLayerType")],T.prototype,"writeOperationalLayerType",null),e([o(w)],T.prototype,"opacity",void 0),e([o({type:Boolean,readOnly:!1})],T.prototype,"persistenceEnabled",void 0),e([o({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],T.prototype,"title",void 0),e([l("title"),l(["web-scene"],"title")],T.prototype,"writeTitle",null),e([o({type:r,json:{origins:{"web-scene":{write:{layerContainerTypes:y}}}}})],T.prototype,"visibilityTimeExtent",void 0),e([a("visibilityTimeExtent")],T.prototype,"readTimeExtent",null),e([l(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[s,n]]}})],T.prototype,"writeTimeExtent",null),e([o({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:y}}},name:"visibility",write:!0}})],T.prototype,"visible",void 0),T=e([p("esri.layers.mixins.OperationalLayer")],T),T};function T(e){return"operationalLayerType"in e}export{b as OperationalLayer,T as isOperationalLayer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getEffectiveLayerCapabilities as
|
|
5
|
+
import{isLayerFromCatalog as t}from"../catalog/catalogUtils.js";import{getEffectiveLayerCapabilities as o,getEffectiveEditingEnabled as i}from"./layerUtils.js";function n(t){return"object"==typeof t&&null!=t&&"loaded"in t&&!0===t.loaded&&"type"in t}function e(e){return!(!n(e)||!o(e)?.operations?.supportsEditing||"editingEnabled"in e&&!i(e)||t(e))}export{e as isEditableLayer};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "4.30.0-next.
|
|
3
|
+
"version": "4.30.0-next.20240523",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@esri/arcgis-html-sanitizer": "~4.0.0",
|
|
29
29
|
"@esri/calcite-colors": "~6.1.0",
|
|
30
|
-
"@esri/calcite-components": "^2.8.
|
|
30
|
+
"@esri/calcite-components": "^2.8.3",
|
|
31
31
|
"@vaadin/grid": "~24.3.13",
|
|
32
32
|
"@zip.js/zip.js": "~2.7.44",
|
|
33
33
|
"luxon": "~3.4.4",
|
package/portal/PortalItem.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import{JSONSupportMixin as r}from"../core/JSONSupport.js";import{clone as o,fixJson as s}from"../core/lang.js";import a from"../core/Loadable.js";import{isDataProtocol as n,makeAbsolute as l}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{ensureClass as c}from"../core/accessorSupport/ensureType.js";import{reader as d}from"../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import m from"../geometry/Extent.js";import h from"./Portal.js";import g from"./PortalItemResource.js";import y from"./PortalRating.js";import{a as v}from"../chunks/persistableUrlUtils.js";var w;const f=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Map Service","Media Layer","Scene Service","Stream Service","Vector Tile Service","WFS","WMS","WMTS"]),b=new Set(["KML","GeoJson","CSV"]);let k=w=class extends(r(a)){static from(e){return c(w,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Geocoding Service"===e?i="Locator":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e?.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"Raster function template"===e?i="Raster Function Template":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e?i="Insights Report":"Excalibur Imagery Project"===e?i="Excalibur Project":"3DTiles Service"===e?i="3D tiles layer":"3DTiles Package"===e&&(i="3D tiles package"),i}readExtent(e){return e&&e.length?new m(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let s,a=!1,n=!1,l=!1,p=!1,c=!1,d=!1,u=!1,m=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=i.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.includes("Table"),l=i.includes("Route Layer"),p=i.includes("Markup"),c=i.includes("Spatiotemporal"),d=i.includes("UtilityNetwork"),s=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":d?"utilitynetwork":a?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(c=i.includes("Spatiotemporal"),u=i.includes("Relational"),s=c||u?"mapimages":a||i.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):s="scene service"===e?i.includes("Line")?"sceneweblayerline":i.includes("3DObject")?"sceneweblayermultipatch":i.includes("Point")?"sceneweblayerpoint":i.includes("IntegratedMesh")?"sceneweblayermesh":i.includes("PointCloud")?"sceneweblayerpointcloud":i.includes("Polygon")?"sceneweblayerpolygon":i.includes("Building")?"sceneweblayerbuilding":i.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.includes("Elevation 3D Layer")?"elevationlayer":i.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?i.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?i.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?i.includes("3DObject")?"3dobjecttileslayer":i.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?s="maps":"web scene"===e?s=i.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.includes("configurableApp")?s="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?s="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.includes("ArcGIS Pro")||"explorer map"===e&&i.indexOf("Explorer Document")?s="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?s="datafiles":"360 vr experience"===e?s="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?s="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?s="addindesktop":"pdf"===e?s="pdf":"microsoft word"===e?s="word":"microsoft excel"===e?s="excel":"microsoft powerpoint"===e?s="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&i.includes("Explorer Mapping Application")||i.includes("Document")?s="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?s="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?s="layersgray":"analysis model"===e?s="analysismodel":"scene package"===e?s="scenepackage":"3dtiles package"===e?s="3dtileslayerpackage":"3dtiles service"===e?s="3dtileslayer":"mobile scene package"===e?s="mobilescenepackage":"tile package"===e||"compact tile package"===e?s="tilepackage":"task file"===e?s="taskfile":"report template"===e?s="report-template":"statistical data collection"===e?s="statisticaldatacollection":"insights workbook"===e?s="workbook":"insights model"===e?s="insightsmodel":"insights page"===e?s="insightspage":"insights theme"===e?s="insightstheme":"hub initiative"===e?s="hubinitiative":"hub page"===e?s="hubpage":"hub site application"===e?s="hubsite":"hub event"===e?s="hubevent":"hub project"===e?s="hubproject":"relational database connection"===e?s="relationaldatabaseconnection":"big data file share"===e?s="datastorecollection":"image collection"===e?s="imagecollection":"desktop style"===e?s="desktopstyle":"style"===e?s=i.includes("Dictionary")?"dictionarystyle":"style":"dashboard"===e?s="dashboard":"raster function template"===e?s="rasterprocessingtemplate":"vector tile package"===e?s="vectortilepackage":"ortho mapping project"===e?s="orthomappingproject":"ortho mapping template"===e?s="orthomappingtemplate":"solution"===e?s="solutions":"geopackage"===e?s="geopackage":"deep learning package"===e?s="deeplearningpackage":"real time analytic"===e?s="realtimeanalytics":"big data analytic"===e?s="bigdataanalytics":"feed"===e?s="feed":"excalibur imagery project"===e?s="excaliburimageryproject":"notebook"===e?s="notebook":"storymap"===e?s="storymap":"survey123 add in"===e?s="survey123addin":"mission"===e?s="mission":"mission report"===e?s="missionreport":"mission template"===e?s="missiontemplate":"quickcapture project"===e?s="quickcaptureproject":"pro report"===e?s="proreport":"pro report template"===e?s="proreporttemplate":"urban model"===e?s="urbanmodel":"web experience"===e?s="experiencebuilder":"web experience template"===e?s="webexperiencetemplate":"experience builder widget"===e?s="experiencebuilderwidget":"experience builder widget package"===e?s="experiencebuilderwidgetpackage":"workflow"===e?s="workflow":"kernel gateway connection"===e?s="kernelgatewayconnection":"insights script"===e?s="insightsscript":"hub initiative template"===e?s="hubinitiativetemplate":"storymap theme"===e?s="storymaptheme":"knowledge graph"===e?s="knowledgegraph":"knowledge studio project"===e?s="knowledgestudio":"native application"===e?s="nativeapp":"native application installer"===e?s="nativeappinstaller":"web link chart"===e?s="linkchart":"knowledge graph web investigation"===e?s="investigation":"ogcfeatureserver"===e?s="features":"pro project"===e?s="proproject":"insights workbook package"===e?s="insightsworkbookpackage":"apache parquet"===e?s="apacheparquet":"notebook code snippet library"===e?s="notebookcodesnippets":"suitability model"===e?s="suitabilitymodel":"esri classifier definition"===e?s="classifierdefinition":"esri classification schema"===e?s="classificationschema":"insights data engineering workbook"===e?s="dataengineeringworkbook":"insights data engineering model"===e?s="dataengineeringmodel":"deep learning studio project"===e?s="deeplearningproject":"discussion"===e?s="discussion":"allsource project"===e?s="allsourceproject":"api key"===e?s="apikey":"data pipeline"===e?s="datapipelines":"group layer"===e?(m=i.includes("Map"),s=m?"layergroup2d":"layergroup"):s="media layer"===e?"onlinemedialayer":"form"===e?i.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"maps",s?t(r+s+o+".png"):null}get isLayer(){return null!=this.type&&f.has(this.type)}get itemCdnUrl(){return v(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.username;if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){const t=this.portal??(this.portal=h.getDefault()),i=t.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}};return e instanceof y&&(e=e.rating),null==e||isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new y({rating:e,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new w({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const i of["tags","typeKeywords","categories"])e[i]=e[i]?.join(", ");const{extent:t}=e;return t&&(e.extent=JSON.stringify(t)),e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new y(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},w)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e?.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new i("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:o,folder:s,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===o,folder:"string"==typeof s?s:s?.id,includeResources:!!o,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${r}/copy`,l);return new w({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)n(t)?r.query={data:t}:r.query={url:l(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:i}=await import("./support/resourceUtils.js");return i(this,e,t)}async addResource(e,t,i){const{addOrUpdateResources:r}=await import("./support/resourceUtils.js");return e.portalItem=this,await r(this,[{resource:e,content:t,compress:i?.compress,access:i?.access}],"add",i),e}async removeResource(e,t){const{removeResource:r}=await import("./support/resourceUtils.js");if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await import("./support/resourceUtils.js");return t(this,e)}resourceFromPath(e){return new g({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:o(this.categories),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return s(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new w({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([p({type:["private","shared","org","public"]})],k.prototype,"access",void 0),e([p()],k.prototype,"accessInformation",void 0),e([p({type:String})],k.prototype,"apiKey",void 0),e([p({json:{read:{source:"appProxies"}}})],k.prototype,"applicationProxies",void 0),e([p()],k.prototype,"avgRating",void 0),e([p()],k.prototype,"categories",void 0),e([p({type:Date})],k.prototype,"created",void 0),e([p()],k.prototype,"culture",void 0),e([p()],k.prototype,"description",void 0),e([p({readOnly:!0})],k.prototype,"displayName",null),e([p({type:m})],k.prototype,"extent",void 0),e([d("extent")],k.prototype,"readExtent",null),e([p()],k.prototype,"groupCategories",void 0),e([p({readOnly:!0})],k.prototype,"iconUrl",null),e([p()],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"isLayer",null),e([p({type:Boolean,readOnly:!0})],k.prototype,"isOrgItem",void 0),e([p()],k.prototype,"itemControl",void 0),e([p({readOnly:!0})],k.prototype,"itemPageUrl",null),e([p({readOnly:!0})],k.prototype,"itemUrl",null),e([p()],k.prototype,"licenseInfo",void 0),e([p({type:Date})],k.prototype,"modified",void 0),e([p()],k.prototype,"name",void 0),e([p()],k.prototype,"numComments",void 0),e([p()],k.prototype,"numRatings",void 0),e([p()],k.prototype,"numViews",void 0),e([p()],k.prototype,"owner",void 0),e([p()],k.prototype,"ownerFolder",void 0),e([p({type:h})],k.prototype,"portal",void 0),e([p()],k.prototype,"screenshots",void 0),e([p()],k.prototype,"size",void 0),e([p()],k.prototype,"snippet",void 0),e([p()],k.prototype,"sourceJSON",void 0),e([p({type:String})],k.prototype,"sourceUrl",void 0),e([p({type:String})],k.prototype,"spatialReference",void 0),e([p()],k.prototype,"tags",void 0),e([p()],k.prototype,"thumbnail",void 0),e([p({readOnly:!0})],k.prototype,"thumbnailUrl",null),e([p()],k.prototype,"title",void 0),e([p()],k.prototype,"type",void 0),e([p()],k.prototype,"typeKeywords",void 0),e([p({type:String,json:{read(e,t){if(b.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],k.prototype,"url",void 0),e([p({readOnly:!0})],k.prototype,"userItemUrl",null),k=w=e([u("esri.portal.PortalItem")],k);const S=k;export{S as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import{JSONSupportMixin as r}from"../core/JSONSupport.js";import{clone as o,fixJson as s}from"../core/lang.js";import a from"../core/Loadable.js";import{isDataProtocol as n,makeAbsolute as l}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{ensureClass as c}from"../core/accessorSupport/ensureType.js";import{reader as d}from"../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import m from"../geometry/Extent.js";import h from"./Portal.js";import g from"./PortalItemResource.js";import y from"./PortalRating.js";import{a as w}from"../chunks/persistableUrlUtils.js";var v;const f=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Map Service","Media Layer","Scene Service","Stream Service","Vector Tile Service","WFS","WMS","WMTS"]),b=new Set(["KML","GeoJson","CSV"]);let k=v=class extends(r(a)){static from(e){return c(v,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Geocoding Service"===e?i="Locator":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e?.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"Raster function template"===e?i="Raster Function Template":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e?i="Insights Report":"Excalibur Imagery Project"===e?i="Excalibur Project":"3DTiles Service"===e?i="3D tiles layer":"3DTiles Package"===e&&(i="3D tiles package"),i}readExtent(e){return e&&e.length?new m(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let s,a=!1,n=!1,l=!1,p=!1,c=!1,d=!1,u=!1,m=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=i.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.includes("Table"),l=i.includes("Route Layer"),p=i.includes("Markup"),c=i.includes("Spatiotemporal"),d=i.includes("UtilityNetwork"),s=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":d?"utilitynetwork":a?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(c=i.includes("Spatiotemporal"),u=i.includes("Relational"),s=c||u?"mapimages":a||i.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):s="scene service"===e?i.includes("Line")?"sceneweblayerline":i.includes("3DObject")?"sceneweblayermultipatch":i.includes("Point")?"sceneweblayerpoint":i.includes("IntegratedMesh")?"sceneweblayermesh":i.includes("PointCloud")?"sceneweblayerpointcloud":i.includes("Polygon")?"sceneweblayerpolygon":i.includes("Building")?"sceneweblayerbuilding":i.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.includes("Elevation 3D Layer")?"elevationlayer":i.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?i.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?i.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?i.includes("3DObject")?"3dobjecttileslayer":i.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?s="maps":"web scene"===e?s=i.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.includes("configurableApp")?s="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?s="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.includes("ArcGIS Pro")||"explorer map"===e&&i.indexOf("Explorer Document")?s="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?s="datafiles":"360 vr experience"===e?s="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?s="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?s="addindesktop":"pdf"===e?s="pdf":"microsoft word"===e?s="word":"microsoft excel"===e?s="excel":"microsoft powerpoint"===e?s="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&i.includes("Explorer Mapping Application")||i.includes("Document")?s="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?s="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?s="layersgray":"analysis model"===e?s="analysismodel":"scene package"===e?s="scenepackage":"3dtiles package"===e?s="3dtileslayerpackage":"3dtiles service"===e?s="3dtileslayer":"mobile scene package"===e?s="mobilescenepackage":"tile package"===e||"compact tile package"===e?s="tilepackage":"task file"===e?s="taskfile":"report template"===e?s="report-template":"statistical data collection"===e?s="statisticaldatacollection":"insights workbook"===e?s="workbook":"insights model"===e?s="insightsmodel":"insights page"===e?s="insightspage":"insights theme"===e?s="insightstheme":"hub initiative"===e?s="hubinitiative":"hub page"===e?s="hubpage":"hub site application"===e?s="hubsite":"hub event"===e?s="hubevent":"hub project"===e?s="hubproject":"relational database connection"===e?s="relationaldatabaseconnection":"big data file share"===e?s="datastorecollection":"image collection"===e?s="imagecollection":"desktop style"===e?s="desktopstyle":"style"===e?s=i.includes("Dictionary")?"dictionarystyle":"style":"dashboard"===e?s="dashboard":"raster function template"===e?s="rasterprocessingtemplate":"vector tile package"===e?s="vectortilepackage":"ortho mapping project"===e?s="orthomappingproject":"ortho mapping template"===e?s="orthomappingtemplate":"solution"===e?s="solutions":"geopackage"===e?s="geopackage":"deep learning package"===e?s="deeplearningpackage":"real time analytic"===e?s="realtimeanalytics":"big data analytic"===e?s="bigdataanalytics":"feed"===e?s="feed":"excalibur imagery project"===e?s="excaliburimageryproject":"notebook"===e?s="notebook":"storymap"===e?s="storymap":"survey123 add in"===e?s="survey123addin":"mission"===e?s="mission":"mission report"===e?s="missionreport":"mission template"===e?s="missiontemplate":"quickcapture project"===e?s="quickcaptureproject":"pro report"===e?s="proreport":"pro report template"===e?s="proreporttemplate":"urban model"===e?s="urbanmodel":"web experience"===e?s="experiencebuilder":"web experience template"===e?s="webexperiencetemplate":"experience builder widget"===e?s="experiencebuilderwidget":"experience builder widget package"===e?s="experiencebuilderwidgetpackage":"workflow"===e?s="workflow":"kernel gateway connection"===e?s="kernelgatewayconnection":"insights script"===e?s="insightsscript":"hub initiative template"===e?s="hubinitiativetemplate":"storymap theme"===e?s="storymaptheme":"knowledge graph"===e?s="knowledgegraph":"knowledge graph layer"===e?s="knowledgegraphlayer":"knowledge studio project"===e?s="knowledgestudio":"native application"===e?s="nativeapp":"native application installer"===e?s="nativeappinstaller":"web link chart"===e?s="linkchart":"knowledge graph web investigation"===e?s="investigation":"ogcfeatureserver"===e?s="features":"pro project"===e?s="proproject":"insights workbook package"===e?s="insightsworkbookpackage":"apache parquet"===e?s="apacheparquet":"notebook code snippet library"===e?s="notebookcodesnippets":"suitability model"===e?s="suitabilitymodel":"esri classifier definition"===e?s="classifierdefinition":"esri classification schema"===e?s="classificationschema":"insights data engineering workbook"===e?s="dataengineeringworkbook":"insights data engineering model"===e?s="dataengineeringmodel":"deep learning studio project"===e?s="deeplearningproject":"discussion"===e?s="discussion":"allsource project"===e?s="allsourceproject":"api key"===e?s="apikey":"data pipeline"===e?s="datapipelines":"group layer"===e?(m=i.includes("Map"),s=m?"layergroup2d":"layergroup"):s="media layer"===e?"onlinemedialayer":"form"===e?i.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"maps",s?t(r+s+o+".png"):null}get isLayer(){return null!=this.type&&f.has(this.type)}get itemCdnUrl(){return w(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.username;if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){const t=this.portal??(this.portal=h.getDefault()),i=t.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}};return e instanceof y&&(e=e.rating),null==e||isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new y({rating:e,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new v({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const i of["tags","typeKeywords","categories"])e[i]=e[i]?.join(", ");const{extent:t}=e;return t&&(e.extent=JSON.stringify(t)),e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new y(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},v)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e?.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new i("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:o,folder:s,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===o,folder:"string"==typeof s?s:s?.id,includeResources:!!o,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${r}/copy`,l);return new v({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)n(t)?r.query={data:t}:r.query={url:l(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:i}=await import("./support/resourceUtils.js");return i(this,e,t)}async addResource(e,t,i){const{addOrUpdateResources:r}=await import("./support/resourceUtils.js");return e.portalItem=this,await r(this,[{resource:e,content:t,compress:i?.compress,access:i?.access}],"add",i),e}async removeResource(e,t){const{removeResource:r}=await import("./support/resourceUtils.js");if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await import("./support/resourceUtils.js");return t(this,e)}resourceFromPath(e){return new g({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:o(this.categories),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return s(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new v({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([p({type:["private","shared","org","public"]})],k.prototype,"access",void 0),e([p()],k.prototype,"accessInformation",void 0),e([p({type:String})],k.prototype,"apiKey",void 0),e([p({json:{read:{source:"appProxies"}}})],k.prototype,"applicationProxies",void 0),e([p()],k.prototype,"avgRating",void 0),e([p()],k.prototype,"categories",void 0),e([p({type:Date})],k.prototype,"created",void 0),e([p()],k.prototype,"culture",void 0),e([p()],k.prototype,"description",void 0),e([p({readOnly:!0})],k.prototype,"displayName",null),e([p({type:m})],k.prototype,"extent",void 0),e([d("extent")],k.prototype,"readExtent",null),e([p()],k.prototype,"groupCategories",void 0),e([p({readOnly:!0})],k.prototype,"iconUrl",null),e([p()],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"isLayer",null),e([p({type:Boolean,readOnly:!0})],k.prototype,"isOrgItem",void 0),e([p()],k.prototype,"itemControl",void 0),e([p({readOnly:!0})],k.prototype,"itemPageUrl",null),e([p({readOnly:!0})],k.prototype,"itemUrl",null),e([p()],k.prototype,"licenseInfo",void 0),e([p({type:Date})],k.prototype,"modified",void 0),e([p()],k.prototype,"name",void 0),e([p()],k.prototype,"numComments",void 0),e([p()],k.prototype,"numRatings",void 0),e([p()],k.prototype,"numViews",void 0),e([p()],k.prototype,"owner",void 0),e([p()],k.prototype,"ownerFolder",void 0),e([p({type:h})],k.prototype,"portal",void 0),e([p()],k.prototype,"screenshots",void 0),e([p()],k.prototype,"size",void 0),e([p()],k.prototype,"snippet",void 0),e([p()],k.prototype,"sourceJSON",void 0),e([p({type:String})],k.prototype,"sourceUrl",void 0),e([p({type:String})],k.prototype,"spatialReference",void 0),e([p()],k.prototype,"tags",void 0),e([p()],k.prototype,"thumbnail",void 0),e([p({readOnly:!0})],k.prototype,"thumbnailUrl",null),e([p()],k.prototype,"title",void 0),e([p()],k.prototype,"type",void 0),e([p()],k.prototype,"typeKeywords",void 0),e([p({type:String,json:{read(e,t){if(b.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],k.prototype,"url",void 0),e([p({readOnly:!0})],k.prototype,"userItemUrl",null),k=v=e([u("esri.portal.PortalItem")],k);const S=k;export{S as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{schema_definitions as e}from"./definitions.js";const i={title:"Building Scene Layer config on layer item",type:"object",properties:{layers:{type:"array",items:{properties:{activeFilterId:{type:"string",description:"specifies the id of the currently active filter"},customParameters:{$ref:"#/definitions/customParameters_schema.json"},filters:{type:"array",description:"A list of filters available for this layer. Overrides filters defined on the service.",items:{$ref:"#/definitions/buildingSceneLayer_filter_schema.json"},uniqueItems:!0},id:{type:"integer",description:"ID of the service layer."},layerDefinition:{type:"object",description:"Additional properties that can define an elevation offset for the layer.",allOf:[{$ref:"#/definitions/layerDefinition_schema.json"},{properties:{elevationInfo:{},maxScale:{},minScale:{}},additionalProperties:!1}]},listMode:{type:"string",description:"To show or hide the sublayer in the layer list. If the layer has sublayers, selecting `hide-children` will hide them in the layer list.",enum:["hide","hide-children","show"],default:"show"},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.",minimum:0,maximum:1,default:1},showLegend:{type:"boolean",description:"Boolean value indicating whether to display the layer in the legend. Default value is `true`.",default:!0},sublayers:{type:"array",description:"An array of objects specifying overrides for building scene layer sublayers",items:{$ref:"#/definitions/buildingSceneLayer_sublayer_schema.json"},uniqueItems:!0},
|
|
5
|
+
import{schema_definitions as e}from"./definitions.js";const i={title:"Building Scene Layer config on layer item",type:"object",properties:{layers:{type:"array",items:{properties:{activeFilterId:{type:"string",description:"specifies the id of the currently active filter"},customParameters:{$ref:"#/definitions/customParameters_schema.json"},filters:{type:"array",description:"A list of filters available for this layer. Overrides filters defined on the service.",items:{$ref:"#/definitions/buildingSceneLayer_filter_schema.json"},uniqueItems:!0},id:{type:"integer",description:"ID of the service layer."},layerDefinition:{type:"object",description:"Additional properties that can define an elevation offset for the layer.",allOf:[{$ref:"#/definitions/layerDefinition_schema.json"},{properties:{elevationInfo:{},maxScale:{},minScale:{}},additionalProperties:!1}]},listMode:{type:"string",description:"To show or hide the sublayer in the layer list. If the layer has sublayers, selecting `hide-children` will hide them in the layer list.",enum:["hide","hide-children","show"],default:"show"},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.",minimum:0,maximum:1,default:1},showLegend:{type:"boolean",description:"Boolean value indicating whether to display the layer in the legend. Default value is `true`.",default:!0},sublayers:{type:"array",description:"An array of objects specifying overrides for building scene layer sublayers",items:{$ref:"#/definitions/buildingSceneLayer_sublayer_schema.json"},uniqueItems:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web scene",default:!0},visibilityTimeExtent:{description:"Represents time extent that will control when a layer should be visible based on webscene's current time. Visibility time extent only affects the layer visibility and will not filter the data.",$ref:"#/definitions/timeExtent_schema.json"}},additionalProperties:!1}}},additionalProperties:!1,$schema:"http://json-schema.org/draft-07/schema",definitions:e};export{i as json};
|