@arcgis/core 6.0.0-next.11 → 6.0.0-next.13

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.
Files changed (60) hide show
  1. package/arcgisGlobal.d.ts +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/09bd5df07eab80ae7b15.js +1 -0
  4. package/assets/esri/core/workers/chunks/{aaba33611753c6aada68.js → 566e129f3d3805d7370a.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{b5fdcc80d5973b6e26d1.js → 5eae5c29149f2429fe96.js} +1 -1
  6. package/assets/esri/core/workers/chunks/62d6e101e9bd9557a410.js +1 -0
  7. package/assets/esri/core/workers/chunks/67ebc5a3d46b254b725c.js +1 -0
  8. package/assets/esri/core/workers/chunks/{4debf2d9c3465250ef7a.js → 6dc86e7496157c5e4d2c.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{6e62581d933e7298d1f6.js → 6f4e6022a52de0c54aab.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{45800373650fbc8262e6.js → 7d11710e1586a3d75887.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{8d0c2de92770a1567536.js → a4cab24af69260438ff4.js} +1 -1
  12. package/assets/esri/core/workers/chunks/b8337492e2b753aefac4.js +1 -0
  13. package/assets/esri/core/workers/chunks/{58032aab28a20a327f6c.js → d03b82e962c70a3fd377.js} +1 -1
  14. package/assets/esri/core/workers/chunks/e3c1c9e6c62ba5cbcdb8.js +1 -0
  15. package/assets/esri/core/workers/chunks/ead49b513e070951a964.js +1 -0
  16. package/config.js +1 -1
  17. package/geometry/operators/simplifyOGCOperator.d.ts +10 -4
  18. package/geometry/support/TileClipper.js +1 -1
  19. package/interfaces.d.ts +1 -1
  20. package/kernel.js +1 -1
  21. package/layers/CSVLayer.d.ts +1 -1
  22. package/layers/CatalogLayer.d.ts +1 -1
  23. package/layers/FeatureLayer.d.ts +1 -1
  24. package/layers/GeoJSONLayer.d.ts +1 -1
  25. package/layers/ParquetLayer.d.ts +1 -1
  26. package/layers/SceneLayer.d.ts +4 -5
  27. package/layers/SceneLayer.js +1 -1
  28. package/layers/SketchLayer.d.ts +4 -2
  29. package/layers/SubtypeGroupLayer.d.ts +1 -1
  30. package/layers/WFSLayer.d.ts +1 -1
  31. package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +1 -1
  32. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
  33. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -1
  34. package/layers/mixins/ArcGISImageService.d.ts +1 -1
  35. package/layers/support/FeatureFilter.d.ts +1 -1
  36. package/layers/support/SubtypeSublayer.d.ts +1 -1
  37. package/layers/support/{TimeSeriesCalculation.d.ts → TimeSeriesCalculationMethod.d.ts} +6 -6
  38. package/layers/support/{TimeSeriesCalculation.js → TimeSeriesCalculationMethod.js} +1 -1
  39. package/layers/support/TimeSeriesInfo.d.ts +5 -5
  40. package/layers/support/TimeSeriesInfo.js +1 -1
  41. package/layers/support/timeSeriesUtils.d.ts +6 -2
  42. package/layers/support/timeSeriesUtils.js +1 -1
  43. package/package.json +4 -4
  44. package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
  45. package/smartMapping/statistics/support/timeSeriesUtils.js +1 -1
  46. package/symbols/cim/types.d.ts +1 -1
  47. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/projection.js +1 -1
  48. package/views/3d/webgl-engine/core/shaderLibrary/raster/Projection.glsl.js +2 -2
  49. package/views/layers/FeatureLikeLayerView.d.ts +1 -1
  50. package/views/layers/PointCloudLayerView.d.ts +1 -1
  51. package/views/layers/SceneLayerView.d.ts +1 -1
  52. package/widgets/BatchAttributeForm/attachmentUtils.d.ts +10 -0
  53. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -0
  54. package/widgets/BatchAttributeForm/inputs/types.d.ts +10 -1
  55. package/assets/esri/core/workers/chunks/216e6065b224309e1051.js +0 -1
  56. package/assets/esri/core/workers/chunks/37d6a264a3f1d8072aa0.js +0 -1
  57. package/assets/esri/core/workers/chunks/54778dec1598818d93cb.js +0 -1
  58. package/assets/esri/core/workers/chunks/78472a57c2ba146fec65.js +0 -1
  59. package/assets/esri/core/workers/chunks/917f53833b853898facc.js +0 -1
  60. package/assets/esri/core/workers/chunks/d6ad4390df576198e45b.js +0 -1
@@ -1456,7 +1456,7 @@ export default class GeoJSONLayer extends GeoJSONLayerSuperclass {
1456
1456
  */
1457
1457
  createPopupTemplate(options?: CreatePopupTemplateOptions): PopupTemplate | null | undefined;
1458
1458
  /**
1459
- * Creates query parameter object that can be used to fetch features from feature-based layers or
1459
+ * Creates a query parameter object that can be used to fetch features from feature-based layers or
1460
1460
  * image footprints from ImageryLayer that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/#definitionExpression).
1461
1461
  * It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/#capabilities).
1462
1462
  * It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields) property to `["*"]`.
@@ -717,7 +717,7 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
717
717
  */
718
718
  createPopupTemplate(options?: CreatePopupTemplateOptions): PopupTemplate | null | undefined;
719
719
  /**
720
- * Creates query parameter object that can be used to fetch features from feature-based layers or
720
+ * Creates a query parameter object that can be used to fetch features from feature-based layers or
721
721
  * image footprints from ImageryLayer that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#definitionExpression).
722
722
  * It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#capabilities).
723
723
  * It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields) property to `["*"]`.
@@ -1191,12 +1191,11 @@ export default class SceneLayer extends SceneLayerSuperclass {
1191
1191
  */
1192
1192
  createPopupTemplate(options?: CreatePopupTemplateOptions): PopupTemplate | null | undefined;
1193
1193
  /**
1194
- * Creates a query object that can be used to fetch features that
1195
- * satisfy the layer's current definition expression. The query should
1196
- * only be used on the layer and not on the layer view.
1194
+ * Creates a query parameter object that can be used to fetch features that satisfy the layer's configurations such as
1195
+ * [definitionExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/#definitionExpression). It sets the query parameter's
1196
+ * [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields) property to `["*"]`.
1197
1197
  *
1198
- * @returns The query object representing the layer's
1199
- * definition expression.
1198
+ * @returns The query parameter object representing the layer's definition expression and other configurations.
1200
1199
  * @since 4.3
1201
1200
  */
1202
1201
  createQuery(): Query;
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import n from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import a from"../core/Error.js";import{abortHandle as o}from"../core/handleUtils.js";import s from"../core/Logger.js";import{destroyMaybe as c}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,throwIfAborted as d,isAbortError as f,throwIfNotAbortError as p}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as g}from"../core/accessorSupport/decorators.js";import{getProperties as _}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as y}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import x from"./Layer.js";import{NoModelError as ee,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as C}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as ne}from"./mixins/EditBusLayer.js";import{OperationalLayer as re}from"./mixins/OperationalLayer.js";import{PortalLayer as ie}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as ae}from"./mixins/ScaleRangeLayer.js";import{SceneService as oe}from"./mixins/SceneService.js";import{useViewTimeProperty as se}from"./mixins/TemporalLayer.js";import{isHostedAgolService as T}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as ce}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as le}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as D,legendEnabled as O,popupEnabled as k,attributeTableTemplate as A,screenSizePerspectiveEnabled as j,timeInfo as M}from"./support/commonProperties.js";import{getFieldDomain as N,computeEffectiveEditingEnabled as P,getGlobalIdToObjectIdMap as F}from"./support/featureLayerUtils.js";import I from"./support/FeatureReductionSelection.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import R from"./support/FieldsIndex.js";import{fixRendererFields as z,fixTimeInfoFields as B,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as H,I3SMaterialDefinition as U,I3STextureSetDefinition as W,I3SGeometryDefinition as ue}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as de,isFileSupported as fe}from"./support/infoFor3D.js";import pe from"./support/LabelClass.js";import{reader as G}from"./support/labelingInfo.js";import me from"./support/LayerFloorInfo.js";import{layersLoaderMap as he}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ge}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as _e}from"./support/RangeInfo.js";import ve from"./support/SceneFilter.js";import{cacheIsOutOfSync as K}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ye}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as be}from"./support/SceneServiceTimeInfo.js";import xe from"./support/TimeInfo.js";import{loadStyleRenderer as Se}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ce}from"../renderers/support/typeUtils.js";import we from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as q,elevationModeUnsupportedMessage as Te,featureExpressionUnsupportedMessage as Ee}from"../support/elevationInfoUtils.js";import{createPopupTemplate as De}from"../support/popupUtils.js";import{extractZipFiles as Oe}from"../support/zipUtils.js";import J from"../time/TimeExtent.js";import ke from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as je,getFetchPopupTemplate as Me}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Ne}from"../webdoc/support/opacityUtils.js";import{reader as Y}from"../core/accessorSupport/decorators/reader.js";const X=new Set([`3DObject`,`Point`]),Z=L();let Q=class extends ne(oe(w(re(ie(ae(l(te(C(r(x)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType=`ArcGISSceneServiceLayer`,this.type=`scene`,this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}destroy(){this._set(`renderer`,null),this.associatedLayer=c(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let n=this.getField(e)?.domain??null;return this.associatedLayer?N(this.associatedLayer,e,t,n):n}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new R(this.fields)}readNodePages(e,t,n){return t.layerType===`Point`&&(e=t.pointNodePages),typeof e!=`object`||!e?null:H.fromJSON(e,n)}set elevationInfo(e){this._set(`elevationInfo`,e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return this.associatedLayer!=null&&P(this.associatedLayer)}get geometryType(){return Pe[this.profile]||`mesh`}set renderer(e){z(e,this.fieldsIndex),this._set(`renderer`,e)}readCachedDrawingInfo(e){return(typeof e!=`object`||!e)&&(e={}),e.color??(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e??=le;let{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:a,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:s},data:{supportsZ:c,supportsM:l,isVersioned:u,supportsAttachment:d},operations:{supportsEditing:f,supportsAdd:p,supportsUpdate:m,supportsDelete:h,supportsQuery:g,supportsQueryAttachments:_,supportsAsyncConvert3D:v},attachment:y}=e,b=e.operations.supportsChangeTracking,x=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:s,supportsRollbackOnFailure:i,supportsGeometryUpdate:x&&o,supportsUploadWithItemId:a},data:{supportsAttachment:d,supportsZ:c,supportsM:l,isVersioned:u,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:_,supportsEditing:f&&b,supportsAdd:x&&p&&b,supportsDelete:x&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:y}}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeOID`&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeGlobalID`&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){let n=t.store.profile;return n!=null&&$[n]?$[n]:(s.getLogger(this).error(`Unknown or missing profile`,{profile:n,layer:this}),`mesh-pyramids`)}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override(`useViewTime`,e)}get timeInfo(){let e=this.associatedLayer?.timeInfo;if(e==null)return null;let t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override(`timeInfo`,e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override(`timeExtent`,e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override(`timeOffset`,e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override(`datesInUnknownTimezone`,e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let t=e?.signal;await this.loadFromPortal({supportedTypes:[`Scene Service`]},e).catch(u),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await Se(this,{origin:`service`},t),z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){this.filter!=null&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){s.getLogger(this).error(`#_loadFilterGeometries()`,this,`Failed to load filter geometries. Geometry filter will not be applied for this layer.`,{error:e}),this.filter=null}}createQuery(){let e=new we;return this.geometryType===`mesh`?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||`1=1`,e.sqlFormat=`standard`,e.outFields=[`*`],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){let[n,{queryModels:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryModel(e,t){let[n,{queryModel:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){let n=V(this.fieldsIndex,await je(this,Me(this)));return Ae(this.parsedUrl?.path??``,this.attributeStorageInfo??[],e,t,n,this.apiKey,this.customParameters)}async queryCachedFeature(e,n){let r=await this.queryCachedAttributes(e,[n]);if(!r||r.length===0)throw new a(`scenelayer:feature-not-in-cached-data`,`Feature not found in cached data`);let i=new t;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryAttachments(e,t))}getFieldUsageInfo(e){let t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(s.getLogger(this).error(`#getFieldUsageInfo()`,`Unavailable until layer is loaded`),t)}createPopupTemplate(e){return De(this,e)}_getAssociatedLayerForQuery(){let e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a(`scenelayer:query-not-available`,`SceneLayer associated feature layer could not be loaded`,{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return this.statisticsInfo!=null&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`})}async applyEdits(e,t){let{applyEdits:n}=await import(`./graphics/editingSupport.js`),r=t;await this.load();let i=this.associatedLayer;if(!i)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);await i.load();let{globalIdField:o}=i,s=!!i.infoFor3D,c=r?.globalIdUsed??!0;if(s&&o==null)throw new a(`${this.type}-layer:not-editable`,`Valid globalIdField expected on editable SceneLayer`);if(s&&!c)throw new a(`${this.type}-layer:globalid-required`,`globalIdUsed must not be false for SceneLayer editing as globalIds are required.`);return T(i.url)&&s&&e.deleteFeatures!=null&&o!=null&&(r={...r,globalIdToObjectId:await F(i,e.deleteFeatures,o)}),n(this,i.source,e,r)}async uploadAssets(e,t){if(await this.load(),this.associatedLayer==null)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};let n=e=>{throw s.getLogger(this).error(`.convertMesh()`,e.message),e};await this.load(t),this.infoFor3D||n(new a(`invalid:layer`,`SceneLayer has no capability for mesh conversion`));let r=await this.extractAndFilterFiles(e);d(t);let i=r.reduce((e,t)=>de(this.infoFor3D,t)?e+1:e,0);i===0&&n(new ee),i>1&&n(new S);let o=this.spatialReference,c=t.origin,l=await y(c??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:o}),o,t),u=o.isGeographic?`local`:`georeferenced`,{createWithExternalSource:f}=await import(`../geometry/support/meshUtils.js`);d(t);let p=f(l,{type:`client`,files:r},{vertexSpace:u,transform:ge(o),unitConversionDisabled:!0}),[m]=await this.uploadAssets([p],{...t,useAssetOrigin:!c});return m}async extractAndFilterFiles(e){await this.load();let t=this.infoFor3D;return t?(await Oe(e)).filter(e=>fe(t,e)):e}validateLayer(e){if(e.layerType&&!X.has(e.layerType))throw new a(`scenelayer:layer-type-not-supported`,`SceneLayer does not support this layer type`,{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a(`layer:service-version-not-supported`,`Service version is not supported.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});if(this.version.major>2)throw new a(`layer:service-version-too-new`,`Service version is too new.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});t(this.normalReferenceFrame,this.spatialReference);function t(e,t){let n=!1,r=!1;if(e==null)n=!0,r=!0;else{let i=t&&t.isGeographic;switch(e){case`east-north-up`:case`earth-centered`:n=!0,r=i;break;case`vertex-reference-frame`:n=!0,r=!i;break;default:n=!1}}if(!n)throw new a(`scenelayer:unsupported-normal-reference-frame`,`Normal reference frame is invalid.`);if(!r)throw new a(`scenelayer:incompatible-normal-reference-frame`,`Normal reference frame is incompatible with layer spatial reference.`)}}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){let e=[];if(this.profile===`points`)e.push(`Point`);else if(this.profile===`mesh-pyramids`)e.push(`3DObject`);else throw new a(`scenelayer:unknown-profile`,`SceneLayer:save() encountered an unknown SceneLayer profile: `+this.profile);return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(let e of this.fields){let t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),n=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||n,supportsLayerQuery:n};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(let t of this.associatedLayer.fields){let n=this.getField(t.name);n?(!n.domain&&t.domain&&(n.domain=t.domain.clone()),n.editable=t.editable,n.nullable=t.nullable,n.length=t.length):(e||=this.fields?this.fields.slice():[],e.push(t.clone()))}e&&this._set(`fields`,e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;let e=[`popupTemplate`,`popupEnabled`,`attributeTableTemplate`],t=_(this);for(let n=0;n<e.length;n++){let r=e[n],i=this.originIdOf(r),a=this.associatedLayer.originIdOf(r);i<a&&(a===2||a===3)&&t.setAtOrigin(r,this.associatedLayer[r],a)}}_applyAssociatedLayerExtentOverride(){let e=this.associatedLayer?.getAtOrigin(`fullExtent`,`service`);this.associatedLayer?.infoFor3D!=null&&e&&T(this.associatedLayer?.url)&&K(this)&&_(this).setAtOrigin(`fullExtent`,e.clone(),2)}_applyAssociatedLayerPrivileges(){let e=this.associatedLayer;e&&(this._set(`userHasEditingPrivileges`,e.userHasEditingPrivileges),this._set(`userHasFullEditingPrivileges`,e.userHasFullEditingPrivileges),this._set(`userHasUpdateItemPrivileges`,e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if([`mesh-pyramids`,`points`].includes(this.profile))try{let{serverUrl:t,layerId:n,portalItem:r}=await ce(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),i=await he.FeatureLayer();this.associatedLayer=new i({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:n,portalItem:r}),await this.associatedLayer.load()}catch(e){f(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){let e=new AbortController;this.addHandles(o(e));try{await m(()=>this.popupEnabled&&this.popupTemplate!=null,e.signal)}catch(e){p(e);return}let t=`this SceneLayer: ${this.title}`;this.attributeStorageInfo==null?s.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):s.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){let e=this.elevationInfo;this.profile===`mesh-pyramids`&&q(s.getLogger(this),Te(`Mesh scene layers`,`relative-to-scene`,e)),q(s.getLogger(this),Ee(`Scene layers`,e))}async fetchStatistics(e,t){return await ye({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:`scenelayer`,fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??``,customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){let{serviceTimeInfo:t}=this;if(t==null)return;let{startTimeField:n,endTimeField:r}=t;if(n==null&&r==null||K({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;let i=async t=>{let r=null;try{r=(await this.fetchStatistics(t,e))?.stats}catch{}if(r==null)return null;let{minTimeStr:i,min:a,maxTimeStr:o,max:s}=r,c=t===n?i??a:o??s;return c==null?null:new Date(c)},[a,o]=await Promise.all([i(n),i(r)]);if(n!=null&&a==null||r!=null&&o==null)return;let s=new J({start:a,end:o});this.setAtOrigin(`timeInfo`,new xe({endField:r,startField:n,fullTimeExtent:s}),`service`)}};e([h({types:{key:`type`,base:null,typeMap:{selection:I}},json:{origins:{"web-scene":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}},"portal-item":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}}}}})],Q.prototype,`featureReduction`,void 0),e([h({type:[_e],json:{read:!1,origins:{"web-scene":{name:`layerDefinition.rangeInfos`,write:!0},"portal-item":{name:`layerDefinition.rangeInfos`,write:!0}}},clonable:!1})],Q.prototype,`rangeInfos`,void 0),e([h({json:{read:!1}})],Q.prototype,`associatedLayer`,void 0),e([h({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([h({type:[`ArcGISSceneServiceLayer`]})],Q.prototype,`operationalLayerType`,void 0),e([h({json:{read:!1},readOnly:!0})],Q.prototype,`type`,void 0),e([h({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`fields`,void 0),e([h()],Q.prototype,`types`,null),e([h()],Q.prototype,`typeIdField`,null),e([h()],Q.prototype,`templates`,null),e([h()],Q.prototype,`formTemplate`,null),e([h({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([h({readOnly:!0,clonable:!1})],Q.prototype,`fieldsIndex`,null),e([h({type:me,json:{read:{source:`layerDefinition.floorInfo`},write:{target:`layerDefinition.floorInfo`}}})],Q.prototype,`floorInfo`,void 0),e([h(Z.outFields)],Q.prototype,`outFields`,void 0),e([h({type:H,readOnly:!0,json:{read:!1},clonable:!1})],Q.prototype,`nodePages`,void 0),e([Y(`service`,`nodePages`,[`nodePages`,`pointNodePages`])],Q.prototype,`readNodePages`,null),e([h({type:[U],readOnly:!0,clonable:!1})],Q.prototype,`materialDefinitions`,void 0),e([h({type:[W],readOnly:!0,clonable:!1})],Q.prototype,`textureSetDefinitions`,void 0),e([h({type:[ue],readOnly:!0,clonable:!1})],Q.prototype,`geometryDefinitions`,void 0),e([h({readOnly:!0})],Q.prototype,`serviceUpdateTimeStamp`,void 0),e([h({readOnly:!0})],Q.prototype,`attributeStorageInfo`,void 0),e([h({readOnly:!0})],Q.prototype,`statisticsInfo`,void 0),e([h({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.excludeObjectIds`,write:{enabled:!0}}})],Q.prototype,`excludeObjectIds`,void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([h({type:ve,json:{name:`layerDefinition.polygonFilter`,write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Q.prototype,`filter`,void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Q.prototype,`path`,void 0),e([h(E)],Q.prototype,`elevationInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`effectiveCapabilities`,null),e([h({readOnly:!0})],Q.prototype,`effectiveEditingEnabled`,null),e([h({type:String})],Q.prototype,`geometryType`,null),e([h(D)],Q.prototype,`labelsVisible`,void 0),e([h({type:[pe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:{reader:G},write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:G},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([h(O)],Q.prototype,`legendEnabled`,void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:[`opacity`,`layerDefinition.drawingInfo.transparency`],reader(e,t){if(typeof e==`number`&&e>=0&&e<=1)return e;let n=t.layerDefinition?.drawingInfo?.transparency;return n===void 0?void 0:Ne(n)}}},"portal-item":{write:!0},service:{read:!1}}}})],Q.prototype,`opacity`,void 0),e([h({type:[`Low`,`High`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`priority`,void 0),e([h({type:[`Labels`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`semantic`,void 0),e([h({types:Ce,json:{origins:{service:{read:{source:`drawingInfo.renderer`}}},name:`layerDefinition.drawingInfo.renderer`,write:!0},value:null})],Q.prototype,`renderer`,null),e([h({json:{read:!1}})],Q.prototype,`cachedDrawingInfo`,void 0),e([Y(`service`,`cachedDrawingInfo`)],Q.prototype,`readCachedDrawingInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`capabilities`,null),e([h({type:Boolean,json:{read:!1}})],Q.prototype,`editingEnabled`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`infoFor3D`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`relationships`,null),e([h(k)],Q.prototype,`popupEnabled`,void 0),e([h({type:n,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`defaultPopupTemplate`,null),e([h(A)],Q.prototype,`attributeTableTemplate`,void 0),e([h({type:String,json:{read:!1}})],Q.prototype,`objectIdField`,void 0),e([Y(`service`,`objectIdField`,[`objectIdField`,`fields`])],Q.prototype,`readObjectIdField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`globalIdField`,void 0),e([Y(`service`,`globalIdField`,[`globalIdField`,`fields`])],Q.prototype,`readGlobalIdField`,null),e([h({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,`displayField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`profile`,void 0),e([Y(`service`,`profile`,[`store.profile`])],Q.prototype,`readProfile`,null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:`store.normalReferenceFrame`}}},read:!1}})],Q.prototype,`normalReferenceFrame`,void 0),e([h(j)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`serviceItemId`,void 0),e([h(se)],Q.prototype,`useViewTime`,null),e([h(M({disableServiceOrigin:!0,webDocumentOrigin:`web-scene`}))],Q.prototype,`timeInfo`,null),e([h({type:J,json:{read:!1,write:!1}})],Q.prototype,`timeExtent`,null),e([h({type:ke,json:{read:!1,write:!1}})],Q.prototype,`timeOffset`,null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Q.prototype,`datesInUnknownTimezone`,null),e([h({type:be,readOnly:!0,json:{read:{source:`timeInfo`}},clonable:!1})],Q.prototype,`serviceTimeInfo`,void 0),e([h()],Q.prototype,`isUsedAsGroundLayer`,null),Q=e([g(`esri.layers.SceneLayer`)],Q);const $={"mesh-pyramids":`mesh-pyramids`,meshpyramids:`mesh-pyramids`,"features-meshes":`mesh-pyramids`,points:`points`,"features-points":`points`,lines:`lines`,"features-lines":`lines`,polygons:`polygons`,"features-polygons":`polygons`},Pe={"mesh-pyramids":`mesh`,points:`point`},Fe=Q;export{Fe as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import n from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import a from"../core/Error.js";import{abortHandle as o}from"../core/handleUtils.js";import s from"../core/Logger.js";import{destroyMaybe as c}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,throwIfAborted as d,isAbortError as f,throwIfNotAbortError as p}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as g}from"../core/accessorSupport/decorators.js";import{getProperties as _}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as y}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import x from"./Layer.js";import{NoModelError as ee,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as C}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as ne}from"./mixins/EditBusLayer.js";import{OperationalLayer as re}from"./mixins/OperationalLayer.js";import{PortalLayer as ie}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as ae}from"./mixins/ScaleRangeLayer.js";import{SceneService as oe}from"./mixins/SceneService.js";import{useViewTimeProperty as se}from"./mixins/TemporalLayer.js";import{isHostedAgolService as T}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as ce}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as le}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as D,legendEnabled as O,popupEnabled as k,attributeTableTemplate as A,screenSizePerspectiveEnabled as j,timeInfo as M}from"./support/commonProperties.js";import{getFieldDomain as N,computeEffectiveEditingEnabled as P,getGlobalIdToObjectIdMap as F}from"./support/featureLayerUtils.js";import I from"./support/FeatureReductionSelection.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import R from"./support/FieldsIndex.js";import{fixRendererFields as z,fixTimeInfoFields as B,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as H,I3SMaterialDefinition as U,I3STextureSetDefinition as W,I3SGeometryDefinition as ue}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as de,isFileSupported as fe}from"./support/infoFor3D.js";import pe from"./support/LabelClass.js";import{reader as G}from"./support/labelingInfo.js";import me from"./support/LayerFloorInfo.js";import{layersLoaderMap as he}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ge}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as _e}from"./support/RangeInfo.js";import ve from"./support/SceneFilter.js";import{cacheIsOutOfSync as K}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ye}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as be}from"./support/SceneServiceTimeInfo.js";import xe from"./support/TimeInfo.js";import{loadStyleRenderer as Se}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ce}from"../renderers/support/typeUtils.js";import we from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as q,elevationModeUnsupportedMessage as Te,featureExpressionUnsupportedMessage as Ee}from"../support/elevationInfoUtils.js";import{createPopupTemplate as De}from"../support/popupUtils.js";import{extractZipFiles as Oe}from"../support/zipUtils.js";import J from"../time/TimeExtent.js";import ke from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as je,getFetchPopupTemplate as Me}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Ne}from"../webdoc/support/opacityUtils.js";import{reader as Y}from"../core/accessorSupport/decorators/reader.js";const X=new Set([`3DObject`,`Point`]),Z=L();let Q=class extends ne(oe(w(re(ie(ae(l(te(C(r(x)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType=`ArcGISSceneServiceLayer`,this.type=`scene`,this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}destroy(){this._set(`renderer`,null),this.associatedLayer=c(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let n=this.getField(e)?.domain??null;return this.associatedLayer?N(this.associatedLayer,e,t,n):n}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new R(this.fields)}readNodePages(e,t,n){return t.layerType===`Point`&&(e=t.pointNodePages),typeof e!=`object`||!e?null:H.fromJSON(e,n)}set elevationInfo(e){this._set(`elevationInfo`,e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return this.associatedLayer!=null&&P(this.associatedLayer)}get geometryType(){return Pe[this.profile]||`mesh`}set renderer(e){z(e,this.fieldsIndex),this._set(`renderer`,e)}readCachedDrawingInfo(e){return(typeof e!=`object`||!e)&&(e={}),e.color??(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e??=le;let{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:a,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:s},data:{supportsZ:c,supportsM:l,isVersioned:u,supportsAttachment:d},operations:{supportsEditing:f,supportsAdd:p,supportsUpdate:m,supportsDelete:h,supportsQuery:g,supportsQueryAttachments:_,supportsAsyncConvert3D:v},attachment:y}=e,b=e.operations.supportsChangeTracking,x=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:s,supportsRollbackOnFailure:i,supportsGeometryUpdate:x&&o,supportsUploadWithItemId:a},data:{supportsAttachment:d,supportsZ:c,supportsM:l,isVersioned:u,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:_,supportsEditing:f&&b,supportsAdd:x&&p&&b,supportsDelete:x&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:y}}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeOID`&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeGlobalID`&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){let n=t.store.profile;return n!=null&&$[n]?$[n]:(s.getLogger(this).error(`Unknown or missing profile`,{profile:n,layer:this}),`mesh-pyramids`)}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override(`useViewTime`,e)}get timeInfo(){let e=this.associatedLayer?.timeInfo;if(e==null)return null;let t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override(`timeInfo`,e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override(`timeExtent`,e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override(`timeOffset`,e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override(`datesInUnknownTimezone`,e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let t=e?.signal;await this.loadFromPortal({supportedTypes:[`Scene Service`]},e).catch(u),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await Se(this,{origin:`service`},t),z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){this.filter!=null&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){s.getLogger(this).error(`#_loadFilterGeometries()`,this,`Failed to load filter geometries. Geometry filter will not be applied for this layer.`,{error:e}),this.filter=null}}createQuery(){let e=new we;this.geometryType===`mesh`?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0);let{timeOffset:t,timeExtent:n}=this;return e.timeExtent=t!=null&&n!=null?n.offset(-t.value,t.unit):n||null,e.where=this.definitionExpression||`1=1`,e.sqlFormat=`standard`,e.outFields=[`*`],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){let[n,{queryModels:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryModel(e,t){let[n,{queryModel:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){let n=V(this.fieldsIndex,await je(this,Me(this)));return Ae(this.parsedUrl?.path??``,this.attributeStorageInfo??[],e,t,n,this.apiKey,this.customParameters)}async queryCachedFeature(e,n){let r=await this.queryCachedAttributes(e,[n]);if(!r||r.length===0)throw new a(`scenelayer:feature-not-in-cached-data`,`Feature not found in cached data`);let i=new t;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryAttachments(e,t))}getFieldUsageInfo(e){let t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(s.getLogger(this).error(`#getFieldUsageInfo()`,`Unavailable until layer is loaded`),t)}createPopupTemplate(e){return De(this,e)}_getAssociatedLayerForQuery(){let e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a(`scenelayer:query-not-available`,`SceneLayer associated feature layer could not be loaded`,{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return this.statisticsInfo!=null&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`})}async applyEdits(e,t){let{applyEdits:n}=await import(`./graphics/editingSupport.js`),r=t;await this.load();let i=this.associatedLayer;if(!i)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);await i.load();let{globalIdField:o}=i,s=!!i.infoFor3D,c=r?.globalIdUsed??!0;if(s&&o==null)throw new a(`${this.type}-layer:not-editable`,`Valid globalIdField expected on editable SceneLayer`);if(s&&!c)throw new a(`${this.type}-layer:globalid-required`,`globalIdUsed must not be false for SceneLayer editing as globalIds are required.`);return T(i.url)&&s&&e.deleteFeatures!=null&&o!=null&&(r={...r,globalIdToObjectId:await F(i,e.deleteFeatures,o)}),n(this,i.source,e,r)}async uploadAssets(e,t){if(await this.load(),this.associatedLayer==null)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};let n=e=>{throw s.getLogger(this).error(`.convertMesh()`,e.message),e};await this.load(t),this.infoFor3D||n(new a(`invalid:layer`,`SceneLayer has no capability for mesh conversion`));let r=await this.extractAndFilterFiles(e);d(t);let i=r.reduce((e,t)=>de(this.infoFor3D,t)?e+1:e,0);i===0&&n(new ee),i>1&&n(new S);let o=this.spatialReference,c=t.origin,l=await y(c??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:o}),o,t),u=o.isGeographic?`local`:`georeferenced`,{createWithExternalSource:f}=await import(`../geometry/support/meshUtils.js`);d(t);let p=f(l,{type:`client`,files:r},{vertexSpace:u,transform:ge(o),unitConversionDisabled:!0}),[m]=await this.uploadAssets([p],{...t,useAssetOrigin:!c});return m}async extractAndFilterFiles(e){await this.load();let t=this.infoFor3D;return t?(await Oe(e)).filter(e=>fe(t,e)):e}validateLayer(e){if(e.layerType&&!X.has(e.layerType))throw new a(`scenelayer:layer-type-not-supported`,`SceneLayer does not support this layer type`,{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a(`layer:service-version-not-supported`,`Service version is not supported.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});if(this.version.major>2)throw new a(`layer:service-version-too-new`,`Service version is too new.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});t(this.normalReferenceFrame,this.spatialReference);function t(e,t){let n=!1,r=!1;if(e==null)n=!0,r=!0;else{let i=t&&t.isGeographic;switch(e){case`east-north-up`:case`earth-centered`:n=!0,r=i;break;case`vertex-reference-frame`:n=!0,r=!i;break;default:n=!1}}if(!n)throw new a(`scenelayer:unsupported-normal-reference-frame`,`Normal reference frame is invalid.`);if(!r)throw new a(`scenelayer:incompatible-normal-reference-frame`,`Normal reference frame is incompatible with layer spatial reference.`)}}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){let e=[];if(this.profile===`points`)e.push(`Point`);else if(this.profile===`mesh-pyramids`)e.push(`3DObject`);else throw new a(`scenelayer:unknown-profile`,`SceneLayer:save() encountered an unknown SceneLayer profile: `+this.profile);return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(let e of this.fields){let t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),n=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||n,supportsLayerQuery:n};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(let t of this.associatedLayer.fields){let n=this.getField(t.name);n?(!n.domain&&t.domain&&(n.domain=t.domain.clone()),n.editable=t.editable,n.nullable=t.nullable,n.length=t.length):(e||=this.fields?this.fields.slice():[],e.push(t.clone()))}e&&this._set(`fields`,e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;let e=[`popupTemplate`,`popupEnabled`,`attributeTableTemplate`],t=_(this);for(let n=0;n<e.length;n++){let r=e[n],i=this.originIdOf(r),a=this.associatedLayer.originIdOf(r);i<a&&(a===2||a===3)&&t.setAtOrigin(r,this.associatedLayer[r],a)}}_applyAssociatedLayerExtentOverride(){let e=this.associatedLayer?.getAtOrigin(`fullExtent`,`service`);this.associatedLayer?.infoFor3D!=null&&e&&T(this.associatedLayer?.url)&&K(this)&&_(this).setAtOrigin(`fullExtent`,e.clone(),2)}_applyAssociatedLayerPrivileges(){let e=this.associatedLayer;e&&(this._set(`userHasEditingPrivileges`,e.userHasEditingPrivileges),this._set(`userHasFullEditingPrivileges`,e.userHasFullEditingPrivileges),this._set(`userHasUpdateItemPrivileges`,e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if([`mesh-pyramids`,`points`].includes(this.profile))try{let{serverUrl:t,layerId:n,portalItem:r}=await ce(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),i=await he.FeatureLayer();this.associatedLayer=new i({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:n,portalItem:r}),await this.associatedLayer.load()}catch(e){f(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){let e=new AbortController;this.addHandles(o(e));try{await m(()=>this.popupEnabled&&this.popupTemplate!=null,e.signal)}catch(e){p(e);return}let t=`this SceneLayer: ${this.title}`;this.attributeStorageInfo==null?s.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):s.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){let e=this.elevationInfo;this.profile===`mesh-pyramids`&&q(s.getLogger(this),Te(`Mesh scene layers`,`relative-to-scene`,e)),q(s.getLogger(this),Ee(`Scene layers`,e))}async fetchStatistics(e,t){return await ye({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:`scenelayer`,fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??``,customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){let{serviceTimeInfo:t}=this;if(t==null)return;let{startTimeField:n,endTimeField:r}=t;if(n==null&&r==null||K({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;let i=async t=>{let r=null;try{r=(await this.fetchStatistics(t,e))?.stats}catch{}if(r==null)return null;let{minTimeStr:i,min:a,maxTimeStr:o,max:s}=r,c=t===n?i??a:o??s;return c==null?null:new Date(c)},[a,o]=await Promise.all([i(n),i(r)]);if(n!=null&&a==null||r!=null&&o==null)return;let s=new J({start:a,end:o});this.setAtOrigin(`timeInfo`,new xe({endField:r,startField:n,fullTimeExtent:s}),`service`)}};e([h({types:{key:`type`,base:null,typeMap:{selection:I}},json:{origins:{"web-scene":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}},"portal-item":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}}}}})],Q.prototype,`featureReduction`,void 0),e([h({type:[_e],json:{read:!1,origins:{"web-scene":{name:`layerDefinition.rangeInfos`,write:!0},"portal-item":{name:`layerDefinition.rangeInfos`,write:!0}}},clonable:!1})],Q.prototype,`rangeInfos`,void 0),e([h({json:{read:!1}})],Q.prototype,`associatedLayer`,void 0),e([h({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([h({type:[`ArcGISSceneServiceLayer`]})],Q.prototype,`operationalLayerType`,void 0),e([h({json:{read:!1},readOnly:!0})],Q.prototype,`type`,void 0),e([h({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`fields`,void 0),e([h()],Q.prototype,`types`,null),e([h()],Q.prototype,`typeIdField`,null),e([h()],Q.prototype,`templates`,null),e([h()],Q.prototype,`formTemplate`,null),e([h({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([h({readOnly:!0,clonable:!1})],Q.prototype,`fieldsIndex`,null),e([h({type:me,json:{read:{source:`layerDefinition.floorInfo`},write:{target:`layerDefinition.floorInfo`}}})],Q.prototype,`floorInfo`,void 0),e([h(Z.outFields)],Q.prototype,`outFields`,void 0),e([h({type:H,readOnly:!0,json:{read:!1},clonable:!1})],Q.prototype,`nodePages`,void 0),e([Y(`service`,`nodePages`,[`nodePages`,`pointNodePages`])],Q.prototype,`readNodePages`,null),e([h({type:[U],readOnly:!0,clonable:!1})],Q.prototype,`materialDefinitions`,void 0),e([h({type:[W],readOnly:!0,clonable:!1})],Q.prototype,`textureSetDefinitions`,void 0),e([h({type:[ue],readOnly:!0,clonable:!1})],Q.prototype,`geometryDefinitions`,void 0),e([h({readOnly:!0})],Q.prototype,`serviceUpdateTimeStamp`,void 0),e([h({readOnly:!0})],Q.prototype,`attributeStorageInfo`,void 0),e([h({readOnly:!0})],Q.prototype,`statisticsInfo`,void 0),e([h({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.excludeObjectIds`,write:{enabled:!0}}})],Q.prototype,`excludeObjectIds`,void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([h({type:ve,json:{name:`layerDefinition.polygonFilter`,write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Q.prototype,`filter`,void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Q.prototype,`path`,void 0),e([h(E)],Q.prototype,`elevationInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`effectiveCapabilities`,null),e([h({readOnly:!0})],Q.prototype,`effectiveEditingEnabled`,null),e([h({type:String})],Q.prototype,`geometryType`,null),e([h(D)],Q.prototype,`labelsVisible`,void 0),e([h({type:[pe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:{reader:G},write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:G},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([h(O)],Q.prototype,`legendEnabled`,void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:[`opacity`,`layerDefinition.drawingInfo.transparency`],reader(e,t){if(typeof e==`number`&&e>=0&&e<=1)return e;let n=t.layerDefinition?.drawingInfo?.transparency;return n===void 0?void 0:Ne(n)}}},"portal-item":{write:!0},service:{read:!1}}}})],Q.prototype,`opacity`,void 0),e([h({type:[`Low`,`High`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`priority`,void 0),e([h({type:[`Labels`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`semantic`,void 0),e([h({types:Ce,json:{origins:{service:{read:{source:`drawingInfo.renderer`}}},name:`layerDefinition.drawingInfo.renderer`,write:!0},value:null})],Q.prototype,`renderer`,null),e([h({json:{read:!1}})],Q.prototype,`cachedDrawingInfo`,void 0),e([Y(`service`,`cachedDrawingInfo`)],Q.prototype,`readCachedDrawingInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`capabilities`,null),e([h({type:Boolean,json:{read:!1}})],Q.prototype,`editingEnabled`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`infoFor3D`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`relationships`,null),e([h(k)],Q.prototype,`popupEnabled`,void 0),e([h({type:n,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`defaultPopupTemplate`,null),e([h(A)],Q.prototype,`attributeTableTemplate`,void 0),e([h({type:String,json:{read:!1}})],Q.prototype,`objectIdField`,void 0),e([Y(`service`,`objectIdField`,[`objectIdField`,`fields`])],Q.prototype,`readObjectIdField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`globalIdField`,void 0),e([Y(`service`,`globalIdField`,[`globalIdField`,`fields`])],Q.prototype,`readGlobalIdField`,null),e([h({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,`displayField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`profile`,void 0),e([Y(`service`,`profile`,[`store.profile`])],Q.prototype,`readProfile`,null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:`store.normalReferenceFrame`}}},read:!1}})],Q.prototype,`normalReferenceFrame`,void 0),e([h(j)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`serviceItemId`,void 0),e([h(se)],Q.prototype,`useViewTime`,null),e([h(M({disableServiceOrigin:!0,webDocumentOrigin:`web-scene`}))],Q.prototype,`timeInfo`,null),e([h({type:J,json:{read:!1,write:!1}})],Q.prototype,`timeExtent`,null),e([h({type:ke,json:{read:!1,write:!1}})],Q.prototype,`timeOffset`,null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Q.prototype,`datesInUnknownTimezone`,null),e([h({type:be,readOnly:!0,json:{read:{source:`timeInfo`}},clonable:!1})],Q.prototype,`serviceTimeInfo`,void 0),e([h()],Q.prototype,`isUsedAsGroundLayer`,null),Q=e([g(`esri.layers.SceneLayer`)],Q);const $={"mesh-pyramids":`mesh-pyramids`,meshpyramids:`mesh-pyramids`,"features-meshes":`mesh-pyramids`,points:`points`,"features-points":`points`,lines:`lines`,"features-lines":`lines`,polygons:`polygons`,"features-polygons":`polygons`},Pe={"mesh-pyramids":`mesh`,points:`point`},Fe=Q;export{Fe as default};
@@ -37,8 +37,9 @@ export interface SketchLayerProperties extends LayerProperties, PortalLayerPrope
37
37
 
38
38
  /**
39
39
  * The SketchLayer lets you display and modify sketches (features sketched on a web map) from the
40
- * [Map Viewer](https://www.arcgis.com/apps/mapviewer/index.html). A new SketchLayer can also be created
41
- * using the [SketchViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/) in a 2D [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
40
+ * [Map Viewer](https://www.arcgis.com/apps/mapviewer/index.html). A new SketchLayer can also be used with the
41
+ * [Sketch component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/)
42
+ * or the [SketchViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/) in a 2D [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
42
43
  *
43
44
  * Sketches belong to the [graphics](https://developers.arcgis.com/javascript/latest/references/core/layers/SketchLayer/#graphics) collection. Each graphic can have its own
44
45
  * popup template, geometry, and symbol.
@@ -104,6 +105,7 @@ export interface SketchLayerProperties extends LayerProperties, PortalLayerPrope
104
105
  * ```
105
106
  *
106
107
  * @since 5.2
108
+ * @beta
107
109
  * @see [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/)
108
110
  * @see [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/)
109
111
  * @see [SketchViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/)
@@ -395,7 +395,7 @@ export default class SubtypeGroupLayer extends SubtypeGroupLayerSuperclass {
395
395
  */
396
396
  applyEdits(edits: Edits, options?: EditOptions): Promise<EditsResult>;
397
397
  /**
398
- * Creates query parameter object that can be used to fetch features from feature-based layers or
398
+ * Creates a query parameter object that can be used to fetch features from feature-based layers or
399
399
  * image footprints from ImageryLayer that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/SubtypeGroupLayer/#definitionExpression).
400
400
  * It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/SubtypeGroupLayer/#capabilities).
401
401
  * It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields) property to `["*"]`.
@@ -621,7 +621,7 @@ export default class WFSLayer extends WFSLayerSuperclass {
621
621
  */
622
622
  createPopupTemplate(options?: CreatePopupTemplateOptions): PopupTemplate | null | undefined;
623
623
  /**
624
- * Creates query parameter object that can be used to fetch features from feature-based layers or
624
+ * Creates a query parameter object that can be used to fetch features from feature-based layers or
625
625
  * image footprints from ImageryLayer that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/#definitionExpression).
626
626
  * It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/#capabilities).
627
627
  * It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields) property to `["*"]`.
@@ -215,7 +215,7 @@ export default class BuildingComponentSublayer extends BuildingComponentSublayer
215
215
  * satisfy the component sublayer's current [definition expression](https://developers.arcgis.com/javascript/latest/references/core/layers/buildingSublayers/BuildingComponentSublayer/#definitionExpression).
216
216
  * The query should only be used on the layer and not on the layer view.
217
217
  *
218
- * @returns The query object representing the layer's
218
+ * @returns The query parameter object representing the layer's
219
219
  * definition expression.
220
220
  * @since 4.17
221
221
  */
@@ -648,7 +648,7 @@ export default class CatalogFootprintLayer extends CatalogFootprintLayerSupercla
648
648
  */
649
649
  createPopupTemplate(options?: CreatePopupTemplateOptions): PopupTemplate | null | undefined;
650
650
  /**
651
- * Creates query parameter object that can be used to fetch features from feature-based layers or
651
+ * Creates a query parameter object that can be used to fetch features from feature-based layers or
652
652
  * image footprints from ImageryLayer that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/#definitionExpression).
653
653
  * It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/#capabilities).
654
654
  * It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields) property to `["*"]`.
@@ -549,7 +549,7 @@ export default class KnowledgeGraphSublayer extends KnowledgeGraphSublayerSuperc
549
549
  */
550
550
  createPopupTemplate(options?: CreatePopupTemplateOptions): PopupTemplate | null | undefined;
551
551
  /**
552
- * Creates query parameter object that can be used to fetch features from feature-based layers or
552
+ * Creates a query parameter object that can be used to fetch features from feature-based layers or
553
553
  * image footprints from ImageryLayer that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/#definitionExpression).
554
554
  * It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/#capabilities).
555
555
  * It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields) property to `["*"]`.
@@ -836,7 +836,7 @@ export abstract class ArcGISImageService {
836
836
  */
837
837
  computeStatisticsHistograms(parameters: ImageHistogramParameters | ImageHistogramParametersProperties, requestOptions?: RequestOptions): Promise<ImageServiceStatisticsHistogramsResult>;
838
838
  /**
839
- * Creates query parameter object that can be used to fetch features from feature-based layers or
839
+ * Creates a query parameter object that can be used to fetch features from feature-based layers or
840
840
  * image footprints from ImageryLayer that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#definitionExpression).
841
841
  * It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#capabilities).
842
842
  * It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields) property to `["*"]`.
@@ -323,7 +323,7 @@ export default class FeatureFilter extends JSONSupport {
323
323
  * Creates [Query](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/) parameters that can be used to fetch features that
324
324
  * satisfy the layer's current filters and definitions.
325
325
  *
326
- * @returns The query object representing the layer's filters
326
+ * @returns The query parameter object representing the layer's filters
327
327
  * and other definitions.
328
328
  * @example
329
329
  * // Get a query object from the filter's current configuration
@@ -784,7 +784,7 @@ export default class SubtypeSublayer extends SubtypeSublayerSuperclass {
784
784
  * Creates query parameters that can be used to fetch features that
785
785
  * satisfy the layer's current filters, and definitions.
786
786
  *
787
- * @returns The query object representing the layer's definition expression
787
+ * @returns The query parameter object representing the layer's definition expression
788
788
  * and other configurations.
789
789
  * @example
790
790
  * // this snippet shows the query parameter object that is returned
@@ -1,7 +1,7 @@
1
1
  import type { ClonableMixin } from "../../core/Clonable.js";
2
2
  import type { JSONSupport } from "../../core/JSONSupport.js";
3
3
 
4
- export interface TimeSeriesCalculationProperties extends Partial<Pick<TimeSeriesCalculation, "name" | "title" | "type">> {}
4
+ export interface TimeSeriesCalculationMethodProperties extends Partial<Pick<TimeSeriesCalculationMethod, "name" | "title" | "type">> {}
5
5
 
6
6
  /**
7
7
  * The calculation method by which to derive a data value for a time series. By default,
@@ -9,15 +9,15 @@ export interface TimeSeriesCalculationProperties extends Partial<Pick<TimeSeries
9
9
  *
10
10
  * @since 5.2
11
11
  */
12
- export type TimeSeriesCalculationMethod = "change-from-average" | "change-from-first" | "change-from-previous" | "percent-change-from-average" | "percent-change-from-first" | "percent-change-from-previous";
12
+ export type TimeSeriesCalculationMethodType = "change-from-average" | "change-from-first" | "change-from-previous" | "percent-change-from-average" | "percent-change-from-first" | "percent-change-from-previous";
13
13
 
14
14
  /**
15
15
  * Defines a calculation method that can be used to derive data values for a time series.
16
16
  *
17
17
  * @since 5.2
18
18
  */
19
- export default class TimeSeriesCalculation extends TimeSeriesCalculationSuperclass {
20
- constructor(properties?: TimeSeriesCalculationProperties);
19
+ export default class TimeSeriesCalculationMethod extends TimeSeriesCalculationMethodSuperclass {
20
+ constructor(properties?: TimeSeriesCalculationMethodProperties);
21
21
  /**
22
22
  * A unique identifier for the calculation method within the time series.
23
23
  *
@@ -27,6 +27,6 @@ export default class TimeSeriesCalculation extends TimeSeriesCalculationSupercla
27
27
  /** A user-friendly name for the calculation method. */
28
28
  accessor title: string | null | undefined;
29
29
  /** The method by which to calculate a time series data value. */
30
- accessor type: TimeSeriesCalculationMethod | null | undefined;
30
+ accessor type: TimeSeriesCalculationMethodType | null | undefined;
31
31
  }
32
- declare const TimeSeriesCalculationSuperclass: typeof JSONSupport & typeof ClonableMixin
32
+ declare const TimeSeriesCalculationMethodSuperclass: typeof JSONSupport & typeof ClonableMixin
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONSupport as n}from"../../core/JSONSupport.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";let a=class extends t(n){constructor(e){super(e),this.name=null,this.type=null,this.title=null}};e([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,`name`,void 0),e([r({type:[`change-from-average`,`change-from-first`,`change-from-previous`,`percent-change-from-average`,`percent-change-from-first`,`percent-change-from-previous`],json:{write:{isRequired:!0}}})],a.prototype,`type`,void 0),e([r({type:String,json:{write:!0}})],a.prototype,`title`,void 0),a=e([i(`esri.layers.support.TimeSeriesCalculation`)],a);const o=a;export{o as default};
2
+ import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONSupport as n}from"../../core/JSONSupport.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";let a=class extends t(n){constructor(e){super(e),this.name=null,this.type=null,this.title=null}};e([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,`name`,void 0),e([r({type:[`change-from-average`,`change-from-first`,`change-from-previous`,`percent-change-from-average`,`percent-change-from-first`,`percent-change-from-previous`],json:{write:{isRequired:!0}}})],a.prototype,`type`,void 0),e([r({type:String,json:{write:!0}})],a.prototype,`title`,void 0),a=e([i(`esri.layers.support.TimeSeriesCalculationMethod`)],a);const o=a;export{o as default};
@@ -1,11 +1,11 @@
1
- import type TimeSeriesCalculation from "./TimeSeriesCalculation.js";
1
+ import type TimeSeriesCalculationMethod from "./TimeSeriesCalculationMethod.js";
2
2
  import type TimeSeriesFieldTimeMapping from "./TimeSeriesFieldTimeMapping.js";
3
3
  import type TimeExtent from "../../time/TimeExtent.js";
4
4
  import type { ClonableMixin } from "../../core/Clonable.js";
5
5
  import type { JSONSupport } from "../../core/JSONSupport.js";
6
6
  import type { TimeSeriesFieldTimeMappingProperties } from "./TimeSeriesFieldTimeMapping.js";
7
7
  import type { TimeExtentProperties } from "../../time/TimeExtent.js";
8
- import type { TimeSeriesCalculationProperties } from "./TimeSeriesCalculation.js";
8
+ import type { TimeSeriesCalculationMethodProperties } from "./TimeSeriesCalculationMethod.js";
9
9
 
10
10
  /** @since 5.1 */
11
11
  export interface TimeSeriesInfoProperties extends Partial<Pick<TimeSeriesInfo, "name" | "timeInterval" | "timeIntervalUnits" | "timeValueUnits" | "title">> {
@@ -16,7 +16,7 @@ export interface TimeSeriesInfoProperties extends Partial<Pick<TimeSeriesInfo, "
16
16
  * @default null
17
17
  * @since 5.2
18
18
  */
19
- calculationMethods?: TimeSeriesCalculationProperties[] | null;
19
+ calculationMethods?: TimeSeriesCalculationMethodProperties[] | null;
20
20
  /** The mapping between field names and time values for the time series configuration. */
21
21
  fieldTimeMappings?: TimeSeriesFieldTimeMappingProperties[] | null;
22
22
  /**
@@ -113,8 +113,8 @@ export default class TimeSeriesInfo extends TimeSeriesInfoSuperclass {
113
113
  * @default null
114
114
  * @since 5.2
115
115
  */
116
- get calculationMethods(): TimeSeriesCalculation[] | null | undefined;
117
- set calculationMethods(value: TimeSeriesCalculationProperties[] | null | undefined);
116
+ get calculationMethods(): TimeSeriesCalculationMethod[] | null | undefined;
117
+ set calculationMethods(value: TimeSeriesCalculationMethodProperties[] | null | undefined);
118
118
  /** The mapping between field names and time values for the time series configuration. */
119
119
  get fieldTimeMappings(): TimeSeriesFieldTimeMapping[] | null | undefined;
120
120
  set fieldTimeMappings(value: TimeSeriesFieldTimeMappingProperties[] | null | undefined);
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONSupport as n}from"../../core/JSONSupport.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import a from"./TimeSeriesCalculation.js";import o from"./TimeSeriesFieldTimeMapping.js";import s from"../../time/TimeExtent.js";let c=class extends t(n){constructor(e){super(e),this.name=null,this.fieldTimeMappings=null,this.timeExtent=null,this.timeInterval=null,this.timeIntervalUnits=null,this.timeValueUnits=null,this.title=null,this.calculationMethods=null,this.type=`time-series-fields`}};e([r({type:String,json:{write:{isRequired:!0}}})],c.prototype,`name`,void 0),e([r({type:[o],json:{write:{isRequired:!0}}})],c.prototype,`fieldTimeMappings`,void 0),e([r({type:s,json:{write:!0}})],c.prototype,`timeExtent`,void 0),e([r({type:Number,json:{write:{isRequired:!0}}})],c.prototype,`timeInterval`,void 0),e([r({type:String,json:{write:{isRequired:!0}}})],c.prototype,`timeIntervalUnits`,void 0),e([r({type:String,json:{write:{isRequired:!0}}})],c.prototype,`timeValueUnits`,void 0),e([r({type:String,json:{write:!0}})],c.prototype,`title`,void 0),e([r({type:[a],json:{write:!0}})],c.prototype,`calculationMethods`,void 0),e([r({type:String,readOnly:!0,json:{write:{isRequired:!0}}})],c.prototype,`type`,void 0),c=e([i(`esri.layers.support.TimeSeriesInfo`)],c);export{c as default};
2
+ import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONSupport as n}from"../../core/JSONSupport.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import a from"./TimeSeriesCalculationMethod.js";import o from"./TimeSeriesFieldTimeMapping.js";import s from"../../time/TimeExtent.js";let c=class extends t(n){constructor(e){super(e),this.name=null,this.fieldTimeMappings=null,this.timeExtent=null,this.timeInterval=null,this.timeIntervalUnits=null,this.timeValueUnits=null,this.title=null,this.calculationMethods=null,this.type=`time-series-fields`}};e([r({type:String,json:{write:{isRequired:!0}}})],c.prototype,`name`,void 0),e([r({type:[o],json:{write:{isRequired:!0}}})],c.prototype,`fieldTimeMappings`,void 0),e([r({type:s,json:{write:!0}})],c.prototype,`timeExtent`,void 0),e([r({type:Number,json:{write:{isRequired:!0}}})],c.prototype,`timeInterval`,void 0),e([r({type:String,json:{write:{isRequired:!0}}})],c.prototype,`timeIntervalUnits`,void 0),e([r({type:String,json:{write:{isRequired:!0}}})],c.prototype,`timeValueUnits`,void 0),e([r({type:String,json:{write:!0}})],c.prototype,`title`,void 0),e([r({type:[a],json:{write:!0}})],c.prototype,`calculationMethods`,void 0),e([r({type:String,readOnly:!0,json:{write:{isRequired:!0}}})],c.prototype,`type`,void 0),c=e([i(`esri.layers.support.TimeSeriesInfo`)],c);export{c as default};
@@ -5,13 +5,17 @@
5
5
  * @since 5.1
6
6
  */
7
7
  import type TimeSeriesInfo from "./TimeSeriesInfo.js";
8
+ import type { TimeSeriesCalculationMethodType } from "./TimeSeriesCalculationMethod.js";
8
9
 
9
10
  /**
10
11
  * Options for creating a time series Arcade expression.
11
12
  *
12
13
  * @since 5.2
13
14
  */
14
- export interface CreateTimeSeriesExpressionOptions {}
15
+ export interface CreateTimeSeriesExpressionOptions {
16
+ /** The calculation method used to derive a time series data value. */
17
+ calculationMethodType?: TimeSeriesCalculationMethodType;
18
+ }
15
19
 
16
20
  /**
17
21
  * Creates an [Arcade expression](https://developers.arcgis.com/javascript/latest/arcade/) that resolves values from a time series data series using the
@@ -35,7 +39,7 @@ export interface CreateTimeSeriesExpressionOptions {}
35
39
  * timeValueUnits: "years",
36
40
  * });
37
41
  *
38
- * const expression = createTimeSeriesExpression(info, { calculationMethod: "change-from-previous" });
42
+ * const expression = createTimeSeriesExpression(info, { calculationMethodType: "change-from-previous" });
39
43
  * ```
40
44
  */
41
45
  export function createTimeSeriesExpression(dataSeriesInfo: TimeSeriesInfo, options?: CreateTimeSeriesExpressionOptions): string;
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- function e(e,n){let{calculationMethod:r}=n??{},i=e.fieldTimeMappings??[];if(!i.length)return`return null;`;let a=t(e.timeValueUnits??`years`);if(!r){let e=i.map(({fieldName:e,timeValue:t})=>` "${t}", $feature.${e},`);return`var timeFormat = "${a}";
2
+ function e(e,n){let{calculationMethodType:r}=n??{},i=e.fieldTimeMappings??[];if(!i.length)return`return null;`;let a=t(e.timeValueUnits??`years`);if(!r){let e=i.map(({fieldName:e,timeValue:t})=>` "${t}", $feature.${e},`);return`var timeFormat = "${a}";
3
3
 
4
4
  var hasCurrentStart = HasValue($view, ["timeProperties", "currentStart"]);
5
5
  var hasCurrentEnd = HasValue($view, ["timeProperties", "currentEnd"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "6.0.0-next.11",
3
+ "version": "6.0.0-next.13",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -19,12 +19,12 @@
19
19
  "type": "module",
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
- "@amcharts/amcharts5": "~5.21.0",
23
- "@arcgis/toolkit": "6.0.0-next.11",
22
+ "@amcharts/amcharts5": "~5.21.2",
23
+ "@arcgis/toolkit": "6.0.0-next.13",
24
24
  "@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
25
25
  "@esri/calcite-components": "^5.2.0-next.89",
26
26
  "@vaadin/grid": "~25.3.2",
27
- "@zip.js/zip.js": "~2.23.0",
27
+ "@zip.js/zip.js": "~2.24.0",
28
28
  "luxon": "~3.7.2",
29
29
  "marked": "~18.1.0",
30
30
  "tslib": "^2.8.1"
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../core/Error.js";import{getSourceLayer as t,getDataSeriesInfo as n}from"../../../layers/support/dataSeriesUtils.js";import{createTimeSeriesExpression as r}from"../../../layers/support/timeSeriesUtils.js";import{getTimeSeriesCalculation as i}from"../../statistics/support/timeSeriesUtils.js";function a(e,t,n){let r=e.dataSeriesInfos?.indexOf(t)??-1,i=t.title||`${t.name} ${r}`;return n?.title||(n?.type?`${i} ${n.type}`:i)}function o(o){if(!o.dataSeriesName||!o.layer){if(o.dataSeriesCalculationName!=null)throw new e(`resolve-data-series-info:invalid-parameters`,`'dataSeriesCalculationName' requires a valid 'dataSeriesName' and 'layer'`);return o}let s=t(o.layer);if(!s)throw new e(`resolve-data-series-info:invalid-parameters`,`'layer' must support dataSeriesInfos`);let c=n(s,o.dataSeriesName);if(!c)throw new e(`resolve-data-series-info:invalid-parameters`,`'dataSeriesName' is not valid`);if(c.type!==`time-series-fields`)throw new e(`resolve-data-series-info:invalid-parameters`,`'dataSeriesName' has unsupported type`);let l=i(c,o.dataSeriesCalculationName,`resolve-data-series-info`);return o.valueExpression=r(c,{calculationMethod:l?.type??void 0}),o.valueExpressionTitle=a(s,c,l),`field`in o&&(o.field=null),o}export{o as resolveDataSeriesInfo};
2
+ import e from"../../../core/Error.js";import{getSourceLayer as t,getDataSeriesInfo as n}from"../../../layers/support/dataSeriesUtils.js";import{createTimeSeriesExpression as r}from"../../../layers/support/timeSeriesUtils.js";import{getTimeSeriesCalculationMethod as i}from"../../statistics/support/timeSeriesUtils.js";function a(e,t,n){let r=e.dataSeriesInfos?.indexOf(t)??-1,i=t.title||`${t.name} ${r}`;return n?.title||(n?.type?`${i} ${n.type}`:i)}function o(o){if(!o.dataSeriesName||!o.layer){if(o.dataSeriesCalculationName!=null)throw new e(`resolve-data-series-info:invalid-parameters`,`'dataSeriesCalculationName' requires a valid 'dataSeriesName' and 'layer'`);return o}let s=t(o.layer);if(!s)throw new e(`resolve-data-series-info:invalid-parameters`,`'layer' must support dataSeriesInfos`);let c=n(s,o.dataSeriesName);if(!c)throw new e(`resolve-data-series-info:invalid-parameters`,`'dataSeriesName' is not valid`);if(c.type!==`time-series-fields`)throw new e(`resolve-data-series-info:invalid-parameters`,`'dataSeriesName' has unsupported type`);let l=i(c,o.dataSeriesCalculationName,`resolve-data-series-info`);return o.valueExpression=r(c,{calculationMethodType:l?.type??void 0}),o.valueExpressionTitle=a(s,c,l),`field`in o&&(o.field=null),o}export{o as resolveDataSeriesInfo};
@@ -21,4 +21,4 @@ var comparisonValue = $feature.${c};
21
21
  if (IsEmpty(currentValue) || IsEmpty(comparisonValue)${s?` || comparisonValue == 0`:``}) {
22
22
  return null;
23
23
  }
24
- return ${s?`Round(100 * (currentValue - comparisonValue) / comparisonValue, 2)`:`currentValue - comparisonValue`};`,sqlExpression:s?`CASE WHEN ${c} IS NULL OR ${c} = 0 OR ${n} IS NULL THEN NULL ELSE ROUND(100.0 * (${u} - ${l}) / ${l}, 2) END`:`CASE WHEN ${c} IS NULL OR ${n} IS NULL THEN NULL ELSE ${u} - ${l} END`}})}function p(e){let t=e.filter(e=>e.count),n=t.reduce((e,t)=>e+(t.count??0),0);if(!n)return{count:0};let r=Math.min(...t.map(e=>e.min)),i=Math.max(...t.map(e=>e.max)),a=t.reduce((e,t)=>e+(t.sum??0),0),o=a/n,s=t.reduce((e,t)=>e+(t.variance??0)*Math.max((t.count??0)-1,0),0),c=t.reduce((e,t)=>e+(t.count??0)*((t.avg??0)-o)**2,0),l=n>1?(s+c)/(n-1):0;return{min:r,max:i,sum:a,avg:o,count:n,variance:l,stddev:Math.sqrt(l)}}function m(e){let t=e[0];return t?{minValue:t.minValue,maxValue:t.maxValue,bins:t.bins.map((t,n)=>({...t,count:e.reduce((e,t)=>e+t.bins[n].count,0)}))}:{bins:[]}}export{m as combineHistograms,p as combineSummaryStatistics,u as getTimeSeriesCalculation,d as getTimeSeriesStatisticInputs,l as processTimeSeriesParams};
24
+ return ${s?`Round(100 * (currentValue - comparisonValue) / comparisonValue, 2)`:`currentValue - comparisonValue`};`,sqlExpression:s?`CASE WHEN ${c} IS NULL OR ${c} = 0 OR ${n} IS NULL THEN NULL ELSE ROUND(100.0 * (${u} - ${l}) / ${l}, 2) END`:`CASE WHEN ${c} IS NULL OR ${n} IS NULL THEN NULL ELSE ${u} - ${l} END`}})}function p(e){let t=e.filter(e=>e.count),n=t.reduce((e,t)=>e+(t.count??0),0);if(!n)return{count:0};let r=Math.min(...t.map(e=>e.min)),i=Math.max(...t.map(e=>e.max)),a=t.reduce((e,t)=>e+(t.sum??0),0),o=a/n,s=t.reduce((e,t)=>e+(t.variance??0)*Math.max((t.count??0)-1,0),0),c=t.reduce((e,t)=>e+(t.count??0)*((t.avg??0)-o)**2,0),l=n>1?(s+c)/(n-1):0;return{min:r,max:i,sum:a,avg:o,count:n,variance:l,stddev:Math.sqrt(l)}}function m(e){let t=e[0];return t?{minValue:t.minValue,maxValue:t.maxValue,bins:t.bins.map((t,n)=>({...t,count:e.reduce((e,t)=>e+t.bins[n].count,0)}))}:{bins:[]}}export{m as combineHistograms,p as combineSummaryStatistics,u as getTimeSeriesCalculationMethod,d as getTimeSeriesStatisticInputs,l as processTimeSeriesParams};
@@ -374,7 +374,7 @@ export interface CIMBackgroundCallout extends CIMLineCallout {
374
374
  *
375
375
  * @since 5.0
376
376
  */
377
- backgroundSymbol?: CIMPolygonSymbol;
377
+ backgroundSymbol?: CIMPolygonSymbol | null;
378
378
  /**
379
379
  * The line symbol used to draw an accent bar. If `null`, the accent bar will not draw.
380
380
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{uniform as t,texture as n,UniformGroup as r,TextureGroup as i}from"../../../GraphShaderModule.js";import{step as a,Vec2 as o,Bool as s,texture2D as c,floor as l,fract as u,IVec2 as d,int as f,Vec3 as p,ifElse as m,lessThanEqual as h,texelFetch as g,Int as _,dot as v,Sampler2D as y}from"../../../graph/glsl.js";import{sampleBicubicBSpline as b}from"../bitmapUtils.js";import{oneMinus as x}from"../utils.js";import{sampleBilinear as S}from"./sampleBilinear.js";class C extends r{}e([t(o)],C.prototype,`targetImageSize`,void 0),e([t(o)],C.prototype,`transformSpacing`,void 0),e([t(o)],C.prototype,`transformGridSize`,void 0);class w extends i{}e([n(y)],w.prototype,`transformTexture`,void 0);function T(e,t){let n=c(t.transformTexture,e);return new o(n.r,n.g)}function E(e,t,n){let{targetImageSize:r,transformSpacing:i}=t,{transformTexture:a}=n,s=l(e.multiply(r)),c=new o(4,1),g=l(s.divide(i)).multiply(c),_=u(s.add(new o(.5,.5)).divide(i)),v=new d(f(g.x),f(g.y)),y=new p(_,1);return m(h(_.x,_.y),D(a,v,y),O(a,v,y))}function D(e,t,n){let r=g(e,t,new _(0)),i=new d(t.x.add(1),t.y),a=g(e,i,new _(0));return new o(v(r.rgb,n),v(a.rgb,n))}function O(e,t,n){let r=new d(t.x.add(2),t.y),i=g(e,r,new _(0)),a=new d(t.x.add(3),t.y),s=g(e,a,new _(0));return new o(v(i.rgb,n),v(s.rgb,n))}function k(e){let t=a(new o(-1e-5,-1e-5),e).multiply(a(e,new o(1.00001,1.00001))),n=x(t.x.multiply(t.y));return new s(n)}function A(e,t,n,r=!1){return t&&n?r?T(e,n):E(e,t,n):e}function j(e,t,n){let{bicubic:r=!1,bilinear:i=!1,nearestOnEdge:a=!1}=n??{};return r||i?r?b(t.texture,e,t.srcImageSize):S(t.texture,e,t.srcImageSize,a):c(t.texture,e)}export{C as ProjectionConfig,w as ProjectionTextures,j as getPixel,A as getPixelLocation,k as isOutside};
2
+ import{__decorate as e}from"tslib";import{uniform as t,texture as n,UniformGroup as r,TextureGroup as i}from"../../../GraphShaderModule.js";import{step as a,Vec2 as o,Bool as s,texture2D as c,floor as l,fract as u,IVec2 as d,int as f,Vec3 as p,ifElse as m,lessThanEqual as h,texelFetch as g,Int as _,dot as v,Sampler2D as y}from"../../../graph/glsl.js";import{sampleBicubicBSpline as b}from"../bitmapUtils.js";import{oneMinus as x}from"../utils.js";import{sampleBilinear as S}from"./sampleBilinear.js";class C extends r{}e([t(o)],C.prototype,`targetImageSize`,void 0),e([t(o)],C.prototype,`transformSpacing`,void 0),e([t(o)],C.prototype,`transformGridSize`,void 0);class w extends i{}e([n(y)],w.prototype,`transformTexture`,void 0);function T(e,t){let n=c(t.transformTexture,e);return new o(n.r,n.g)}function E(e,t,n){let{targetImageSize:r,transformSpacing:i}=t,{transformTexture:a}=n,s=e.multiply(r),c=new o(4,1),g=l(s.divide(i)).multiply(c),_=u(s.divide(i)),v=new d(f(g.x),f(g.y)),y=new p(_,1);return m(h(_.x,_.y),D(a,v,y),O(a,v,y))}function D(e,t,n){let r=g(e,t,new _(0)),i=new d(t.x.add(1),t.y),a=g(e,i,new _(0));return new o(v(r.rgb,n),v(a.rgb,n))}function O(e,t,n){let r=new d(t.x.add(2),t.y),i=g(e,r,new _(0)),a=new d(t.x.add(3),t.y),s=g(e,a,new _(0));return new o(v(i.rgb,n),v(s.rgb,n))}function k(e){let t=a(new o(-1e-5,-1e-5),e).multiply(a(e,new o(1.00001,1.00001))),n=x(t.x.multiply(t.y));return new s(n)}function A(e,t,n,r=!1){return t&&n?r?T(e,n):E(e,t,n):e}function j(e,t,n){let{bicubic:r=!1,bilinear:i=!1,nearestOnEdge:a=!1}=n??{};return r||i?r?b(t.texture,e,t.srcImageSize):S(t.texture,e,t.srcImageSize,a):c(t.texture,e)}export{C as ProjectionConfig,w as ProjectionTextures,j as getPixel,A as getPixelLocation,k as isOutside};
@@ -1,9 +1,9 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  import{Float2PassUniform as e}from"../../shaderModules/Float2PassUniform.js";import{glsl as t}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as n}from"../../shaderModules/Texture2DPassUniform.js";function r(r){r.fragment.uniforms.add(new n(`u_transformGrid`,e=>e.u_transformGrid),new e(`u_transformSpacing`,e=>e.common.u_transformSpacing),new e(`u_targetImageSize`,e=>e.common.u_targetImageSize)),r.fragment.code.add(t`vec2 projectPixelLocation(vec2 coords) {
3
- vec2 index_image = floor(coords * u_targetImageSize);
3
+ vec2 index_image = coords * u_targetImageSize;
4
4
  vec2 oneTransformPixel = vec2(4.0, 1.0);
5
5
  vec2 index_transform = floor(index_image / u_transformSpacing) * oneTransformPixel;
6
- vec2 pos = fract((index_image + 0.5) / u_transformSpacing);
6
+ vec2 pos = fract(index_image / u_transformSpacing);
7
7
  vec2 transform_location = index_transform + 0.5;
8
8
  vec2 srcLocation;
9
9
  if (pos.s <= pos.t) {
@@ -376,7 +376,7 @@ export default abstract class FeatureLikeLayerView extends LayerView {
376
376
  */
377
377
  get maximumNumberOfFeaturesExceeded(): boolean;
378
378
  /**
379
- * Creates query parameter object that can be used to [fetch aggregate features](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/#queryAggregates) as they are being
379
+ * Creates a query parameter object that can be used to [fetch aggregate features](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/#queryAggregates) as they are being
380
380
  * displayed. It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields)
381
381
  * property to `["*"]` and [Query.returnGeometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#returnGeometry) to `true`.
382
382
  * The output spatial reference [Query.outSpatialReference](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outSpatialReference)
@@ -36,7 +36,7 @@ export abstract class PointCloudLayerViewMixin {
36
36
  /** The point cloud layer being viewed. */
37
37
  get layer(): PointCloudLayer;
38
38
  /**
39
- * Creates query parameter object that can be used to fetch points as they are being
39
+ * Creates a query parameter object that can be used to fetch points as they are being
40
40
  * displayed. It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields)
41
41
  * property to `["*"]` and [Query.returnGeometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#returnGeometry) to `true`.
42
42
  * The output spatial reference is set to the spatial reference of the view.
@@ -112,7 +112,7 @@ export default abstract class SceneLayerView extends LayerView {
112
112
  */
113
113
  get maximumNumberOfFeaturesExceeded(): boolean;
114
114
  /**
115
- * Creates query parameter object that can be used to fetch features as they are being
115
+ * Creates a query parameter object that can be used to fetch features as they are being
116
116
  * displayed. It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields)
117
117
  * property to `["*"]` and [Query.returnGeometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#returnGeometry) to `true`.
118
118
  * The output spatial reference is set to the spatial reference of the view. The filter that currently
@@ -1,5 +1,15 @@
1
1
  import type { NestableAttachmentInputUnion } from "../../form/elements/inputs/attachments/types.js";
2
2
 
3
+ /**
4
+ * @param name - name of attachment
5
+ * @returns attachment name parts
6
+ * @internal
7
+ */
8
+ export function getAttachmentFilenameParts(name: string | null | undefined): {
9
+ baseName: string;
10
+ extension: string;
11
+ };
12
+
3
13
  /**
4
14
  * @param file - The Blob or File whose duration should be read.
5
15
  * @param mediaType - The media element type to create.
@@ -37,6 +37,8 @@ export default class AttachmentElementInput extends EditableInput<any> {
37
37
  /** The attachments applicable to this input. */
38
38
  accessor attachments: AttachmentInfo[];
39
39
  /** @internal */
40
+ get canUploadFiles(): boolean;
41
+ /** @internal */
40
42
  get categories(): ReadonlySet<AttachmentTypeCategory>;
41
43
  /**
42
44
  * The attachments visible on the default page before showing the full attachments list action.
@@ -37,7 +37,16 @@ export type FieldInputMessage = FieldInputError | FormValidationWarning;
37
37
  *
38
38
  * @internal
39
39
  */
40
- export interface AttachmentEditState {}
40
+ export interface AttachmentEditState {
41
+ /** @internal */
42
+ initialName: string | null;
43
+ /** @internal */
44
+ isDeleted: boolean;
45
+ /** @internal */
46
+ isRenamed: boolean;
47
+ /** @internal */
48
+ isReplaced: boolean;
49
+ }
41
50
 
42
51
  /**
43
52
  * Various categories that attachments belong to based on the content type.