@arcgis/core 4.29.5 → 4.29.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{863d14c98737482f6788.js → 0700231efdaf7ce06d19.js} +1 -1
- package/assets/esri/core/workers/chunks/{2146f7e55911da806aec.js → 2ca0fc695c66640a57dd.js} +1 -1
- package/assets/esri/core/workers/chunks/{90b36361651839b1e3f0.js → 326aa2951f7e4da6d6b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{1251638c842dcf895ffe.js → 37133cf60bc9039a7407.js} +1 -1
- package/assets/esri/core/workers/chunks/{de6d54df7ae32694fd70.js → 534abb4408b15ac778dd.js} +1 -1
- package/assets/esri/core/workers/chunks/a068f0c8c1c632e8b2cb.js +1 -0
- package/assets/esri/core/workers/chunks/{2621b755fa5403bd8a4c.js → e232f6fca5629ae66dcc.js} +1 -1
- package/assets/esri/core/workers/chunks/{0e56ff6978ba8d9cf0c0.js → f74eec62bcf3264e2d90.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a9387483b19a5ec5b86.js → fc5ac713872766571e07.js} +1 -1
- package/assets/esri/themes/base/widgets/_LayerList.scss +2 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/core/workers/InvokeHandler.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/utils.js +1 -1
- package/interfaces.d.ts +47 -35
- package/kernel.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/utils.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/PipelineConnectionHandlers.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/widgets/LayerList/support/layerListUtils.js +1 -1
- package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/5db9739e00f15613d1ea.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import o from"../../core/Error.js";import i from"../../core/Logger.js";import{watch as t,initial as s}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as d}from"../../core/support/UpdatingHandles.js";import u from"../../portal/Portal.js";import{hasUserTypeExtension as p}from"../../portal/support/utils.js";import{createFeatureServices as c}from"../../rest/featureService/utils.js";import h from"../../versionManagement/VersionManagementService.js";let l=class extends r{constructor(e){super(e),this._initialValidationsFinished=!1,this._portalLookup=new Map,this._updatingHandles=new d,this._validConstructProperties=!0,this.advancedEditingUserTypeExtensionLookup=new Map,this.executionError=void 0,this.featureServiceLookup=new Map,this.loadError=void 0,this.serverVersionLookup=new Map,this.serviceNameLookup=new Map,this.userLookup=new Map,this.versionIdentifierLookup=new Map,this.versionInfoLookup=new Map,this.versionManagementServiceLookup=new Map}initialize(){this.addHandles([t((()=>this.view?.map.layers.toArray()),(async()=>{await this._onLayersChange()}),s)])}destroy(){this._updatingHandles.destroy()}get state(){return this.loadError||!this._validConstructProperties?"disabled":this.executionError?"failed":this._updatingHandles.updating?"executing":this._initialValidationsFinished?"ready":"loading"}set view(e){this._get("view")!==e&&this._set("view",e)}async alterVersion(e){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const r=this.versionManagementServiceLookup.get(e.featureServerUrl);if(!r)return void this._logNoVersionManagementServiceFoundError();if(!this.serverVersionLookup.has(e.featureServerUrl)||this.serverVersionLookup.get(e.featureServerUrl)<=11.1)return void this._logError("execution-error","no-valid-enterprise-version");if(!this.advancedEditingUserTypeExtensionLookup.get(e.featureServerUrl))return void this._logError("execution-error","no-advanced-editing-user-type-extension");const{featureServerUrl:o,versionIdentifier:i,...t}=e;await r.alterVersion(i,t).catch((async e=>{await this.getVersionInfos(o,!0),this._logExecutionError(e)}))})()):this._logError("load-error",this.loadError)}async changeVersion(e,r,o){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const i=this.versionManagementServiceLookup.get(e);if(!i)return void this._logNoVersionManagementServiceFoundError();const t=this.versionIdentifierLookup.get(e)??{name:i.defaultVersionIdentifier.name,guid:i.defaultVersionIdentifier.guid},s={name:r,guid:o};await i.changeVersion(this.view?.map,t,s).catch((e=>{this._logExecutionError(e)}))&&this.versionIdentifierLookup.set(e,s)})()):this._logError("load-error",this.loadError)}async createVersion(e){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const r=e.featureServerUrl,o=this.versionManagementServiceLookup.get(r);if(!o)return void this._logNoVersionManagementServiceFoundError();const i=this.advancedEditingUserTypeExtensionLookup.get(e.featureServerUrl),t=this.userLookup.get(r).toUpperCase(),s=this._isEmptyString(e.ownerName)?t:e.ownerName?.trim().toUpperCase();if(s!==t){if(this.serverVersionLookup.get(r)<=11.1)return void this._logError("execution-error","versioning-api-error");if(!i)return void this._logError("execution-error","no-advanced-editing-user-type-extension")}if("SDE"===s?.toUpperCase()&&"DEFAULT"===e.versionName.toUpperCase()||this.versionInfoLookup.get(r)?.find((r=>r.versionIdentifier.name.toUpperCase()===(s+"."+e.versionName).toUpperCase()||r.versionIdentifier.name.toUpperCase()===(t+"."+e.versionName).toUpperCase())))return void this._logError("execution-error","no-valid-version-name");const n=await o.createVersion({versionName:e.versionName,access:s!==t?"public":e.access,description:e.description}).catch((e=>{this._logExecutionError(e)}));if(!this.executionError&&s!==t){const{guid:o,name:i}=n.versionIdentifier,a={featureServerUrl:r,versionIdentifier:{guid:o,name:i},access:e.access,ownerName:s};await this.alterVersion(a),this.executionError&&this.deleteVersion(r,t+"."+e.versionName,n.versionIdentifier.guid)}await this.getVersionInfos(r,!0)})()):this._logError("load-error",this.loadError)}async deleteVersion(e,r,o){"disabled"!==this.state?await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const i=this.versionManagementServiceLookup.get(e);if(!i)return void this._logNoVersionManagementServiceFoundError();if(this.serverVersionLookup.get(e)<=11.1)return void this._logError("execution-error","versioning-api-error");if(!this.advancedEditingUserTypeExtensionLookup.get(e))return void this._logError("execution-error","no-advanced-editing-user-type-extension");const t={name:r,guid:o};await i.deleteVersion(t).catch((e=>{this._logExecutionError(e)}))&&await this.getVersionInfos(e,!0).catch((e=>{this._logExecutionError(e)}))})()):this._logError("load-error",this.loadError)}async getVersionInfos(e,r){if("disabled"!==this.state)return await this._updatingHandles.addPromise((async()=>{this._setExecutionError();const o=this.featureServiceLookup.get(e)?.featureService;if(!o)return void this._logError("execution-error","no-feature-service-found");if(!o.loaded){await o.load().catch((e=>{this._logExecutionError(e)}));const r=o.url;this.serverVersionLookup.set(r,o.sourceJSON?.currentVersion??0),this.serverVersionLookup.get(r)<=11.1&&this.advancedEditingUserTypeExtensionLookup.set(r,!1);const i=this.userLookup.get(e);this._portalLookup.get(e)&&i?this.advancedEditingUserTypeExtensionLookup.set(r,await p(this._portalLookup.get(e),i,"advediting")):this.advancedEditingUserTypeExtensionLookup.set(r,!1)}o.versionManagementServiceUrl&&this.versionManagementServiceLookup.set(o.url,new h({url:o.versionManagementServiceUrl}));const i=this.versionManagementServiceLookup.get(e);if(i){if(i.loaded||await i.load().catch((e=>{this._logExecutionError(e)})),!this.versionInfoLookup.get(e)||r){const r=await i.getVersionInfos().catch((e=>{this._logExecutionError(e)}));this.versionInfoLookup.set(e,r)}}else this._logNoVersionManagementServiceFoundError()})()),this.versionInfoLookup.get(e);this._logError("load-error",this.loadError)}_isEmptyString(e){return!e||0===e.trim().length}_logError(e,r){switch(e){case"load-error":this._setLoadError(r),i.getLogger(this).error(new o(e,r));break;case"execution-error":this._setExecutionError(r),i.getLogger(this).error(new o(e,r))}}_logExecutionError(e){this._logError("execution-error",e.message)}_logNoVersionManagementServiceFoundError(){this._logError("execution-error","no-version-management-service-found")}async _onLayersChange(){if(this._initialValidationsFinished=!1,this._setLoadError(),this._validConstructProperties=!0,!this.view)return this._logError("load-error","no-view-property"),void(this._validConstructProperties=!1);if(this.featureServiceLookup=c(this.view.map.layers),!this.featureServiceLookup.size)return this._logError("load-error","no-feature-services"),void(this._validConstructProperties=!1);for(const e of this.featureServiceLookup.keys())if(!this.serviceNameLookup.has(e)){this.serviceNameLookup.set(e,e.split("/").at(-2));const r=new u({authMode:"immediate",url:new URL(e).origin+"/portal"});await r.load(),this._portalLookup.set(e,r);const o=r?.user?.username;o&&this.userLookup.set(e,o)}this._initialValidationsFinished=!0}_setExecutionError(e){this._set("executionError",e)}_setLoadError(e){this._set("loadError",e)}};e([n()],l.prototype,"_initialValidationsFinished",void 0),e([n({readOnly:!0})],l.prototype,"advancedEditingUserTypeExtensionLookup",void 0),e([n({readOnly:!0})],l.prototype,"executionError",void 0),e([n()],l.prototype,"featureServiceLookup",void 0),e([n({readOnly:!0})],l.prototype,"loadError",void 0),e([n({readOnly:!0})],l.prototype,"serverVersionLookup",void 0),e([n()],l.prototype,"serviceNameLookup",void 0),e([n({readOnly:!0})],l.prototype,"state",null),e([n({readOnly:!0})],l.prototype,"userLookup",void 0),e([n({readOnly:!0})],l.prototype,"versionIdentifierLookup",void 0),e([n()],l.prototype,"versionInfoLookup",void 0),e([n()],l.prototype,"versionManagementServiceLookup",void 0),e([n()],l.prototype,"view",null),l=e([a("esri.widgets.VersionManagement.VersionManagementViewModel")],l);const v=l;export{v as default};
|