@arcgis/core 4.30.3 → 4.30.4
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/{88e8547079b299572bfe.js → 618f825d56d4981594c5.js} +1 -1
- package/assets/esri/themes/base/widgets/_Grid.scss +0 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/kernel.js +1 -1
- package/package.json +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/support/revision.js +1 -1
- package/widgets/FeatureTable/support/tableUtils.js +1 -1
package/kernel.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as e}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const r="4.30";let t,i=r;i="4.30.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as e}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const r="4.30";let t,i=r;i="4.30.4";function n(o){t=o}function m(s){const e=t?.findCredential(s);return e?.token?o(s,"token",e.token):s}has("host-webworker");export{m as addTokenParameter,s as buildDate,i as fullVersion,t as id,e as revision,n as setId,r as version};
|
package/package.json
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Error.js";import{parse as t}from"../../layers/support/arcgisLayerUrl.js";import{fetchFeatureService as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as a}from"../../layers/support/LayerLoadContext.js";import{populateGroupLayer as o}from"../../layers/support/layersCreator.js";import{layerLookupMap as n}from"../../layers/support/lazyLayerLoader.js";import s from"../Portal.js";import{createForItemRead as
|
|
5
|
+
import e from"../../core/Error.js";import{parse as t}from"../../layers/support/arcgisLayerUrl.js";import{fetchFeatureService as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as a}from"../../layers/support/LayerLoadContext.js";import{populateGroupLayer as o}from"../../layers/support/layersCreator.js";import{layerLookupMap as n}from"../../layers/support/lazyLayerLoader.js";import s from"../Portal.js";import{createForItemRead as i}from"./jsonContext.js";import{getFirstLayerOrTable as l,preprocessFSItemData as c,populateSceneServiceItemData as u,getNumLayersAndTables as p,createSublayerData as y,instanceTypeToLayerType as f,getSublayersByLayerType as m,layerTypeToLayerModuleType as d}from"./loadUtils.js";import{hasTypeKeyword as w}from"./portalItemUtils.js";import{loadStyleRenderer as h}from"../../renderers/support/styleUtils.js";import{fetchArcGISServiceJSON as I}from"../../support/requestPresets.js";async function g(e,t){const r=e.instance.portalItem;if(r?.id)return await r.load(t),b(e),e.validateItem&&e.validateItem(r),L(e,t)}function b(t){const r=t.instance.portalItem;if(!r?.type||!t.supportedTypes.includes(r.type))throw new e("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:r?.type,expectedType:t.supportedTypes.join(", ")})}async function L(e,t){const r=e.instance,o=r.portalItem;if(!o)return;const{url:n,title:s}=o,l=i(o,"portal-item");if("group"===r.type)return S(r,l,e);n&&"media"!==r.type&&r.read({url:n},l);const c=new a,u=await M(e,c,t);return u&&r.read(u,l),r.resourceReferences={portalItem:o,paths:l.readResourcePaths??[]},"subtype-group"!==r.type&&r.read({title:s},l),h(r,l)}async function S(t,r,a){const o=t.portalItem;if(!t.sourceIsPortalItem)return;const{title:n,type:s}=o;if("Group Layer"===s){if(!w(o,"Map"))throw new e("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return T(t)}return t.read({title:n},r),v(t,a)}async function T(e){const t=e.portalItem,r=await t.fetchData("json");if(!r)return;const a=i(t,"web-map");e.read(r,a),await o(e,r,{context:a}),e.resourceReferences={portalItem:t,paths:a.readResourcePaths??[]}}async function v(t,r){let o;const{portalItem:n}=t;if(!n)return;const s=n.type,i=r.layerModuleTypeMap;switch(s){case"Feature Service":case"Feature Collection":o=i.FeatureLayer;break;case"Stream Service":o=i.StreamLayer;break;case"Scene Service":o=i.SceneLayer;break;default:throw new e("portal:unsupported-item-type-as-group",`The item type '${s}' is not supported as a 'IGroupLayer'`)}const y=new a;let[f,m]=await Promise.all([o(),M(r,y)]),d=()=>f;if("Feature Service"===s){const e=l(m)?.customParameters;m=n.url?await c(m,n.url,y):{},d=await E(m,i)||d;const r=await k(n.url,{customParameters:e,loadContext:y});return await F(t,d,m,r)}return"Scene Service"===s&&n.url&&(m=await u(n,m,y)),p(m)>0?await F(t,d,m):await j(t,d)}async function j(e,t){const{portalItem:r}=e;if(!r?.url)return;const a=await I(r.url);a&&F(e,t,{layers:a.layers?.map(y),tables:a.tables?.map(y)})}async function F(e,t,r,a){let o=r.layers||[];const s=r.tables||[];if("Feature Collection"===e.portalItem?.type?(o.forEach(((e,t)=>{e.id=t,"Table"===e?.layerDefinition?.type&&s.push(e)})),o=o.filter((e=>"Table"!==e?.layerDefinition?.type))):(o.reverse(),s.reverse()),o.forEach((o=>{const n=a?.(o);if(n||!a){const a=P(e,t(o),r,o,n);e.add(a)}})),s.length){const t=await n.FeatureLayer();s.forEach((o=>{const n=a?.(o);if(n||!a){const a=P(e,t,r,o,n);e.tables.add(a)}}))}}function P(e,t,r,a,o){const n=e.portalItem,i={portalItem:n.clone(),layerId:a.id};null!=a.url&&(i.url=a.url);const l=new t(i);if("sourceJSON"in l&&(l.sourceJSON=o),"subtype-group"!==l.type&&"catalog"!==l.type&&(l.sublayerTitleMode="service-name"),"Feature Collection"===n.type){const e={origin:"portal-item",portal:n.portal||s.getDefault()};l.read(a,e);const t=r.showLegend;null!=t&&l.read({showLegend:t},e)}return l}async function M(e,t,r){if(!1===e.supportsData)return;const a=e.instance,o=a.portalItem;if(!o)return;let n=null;try{n=await o.fetchData("json",r)}catch(s){}if(D(a)){let e=null;const r=await x(o,n,t);if((n?.layers||n?.tables)&&r>0){if(null==a.layerId){const e=f(a.type),t=e?m(n,e)[0]:l(n);t&&(a.layerId=t.id)}e=C(n,a),"OrientedImageryLayer"===e?.layerType&&"oriented-imagery"===a.type&&a.supportedSourceTypes.add("Feature Layer"),e&&null!=n.showLegend&&(e.showLegend=n.showLegend)}return r>1&&"sublayerTitleMode"in a&&"service-name"!==a.sublayerTitleMode&&(a.sublayerTitleMode="item-title-and-service-name"),e}return n}async function x(e,r,a){if(r?.layers&&r?.tables)return p(r);const o=t(e.url);if(!o)return 1;const n=await a.fetchServiceMetadata(o.url.path,{customParameters:l(r)?.customParameters}).catch((()=>null));return(r?.layers?.length??n?.layers?.length??0)+(r?.tables?.length??n?.tables?.length??0)}function C(e,t){const{layerId:r}=t,a=e.layers?.find((e=>e.id===r))||e.tables?.find((e=>e.id===r));return a&&G(a,t)?a:null}function D(e){return"stream"!==e.type&&"layerId"in e}function G(e,t){const r="layerType"in e&&e.layerType,{type:a}=t;return!("feature"===a&&r&&"ArcGISFeatureLayer"!==e.layerType||"catalog"===a&&!r||"oriented-imagery"===a&&!r||"subtype-group"===a&&!r)}async function k(e,t){const{layersJSON:a}=await r(e,t);if(!a)return null;const o=[...a.layers,...a.tables];return e=>o.find((t=>t.id===e.id))}async function E(e,t){const{layers:r}=e;if(!r?.length)return;const a=new Set,o=[];for(const{layerType:i}of r){const e=i??"ArcGISFeatureLayer";if(a.has(e))continue;a.add(e);const r=t[d(e)];o.push(r())}const n=await Promise.all(o),s=new Map;return Array.from(a).forEach(((e,t)=>{s.set(e,n[t])})),({layerType:e})=>{const t=e??"ArcGISFeatureLayer";return s.get(t)}}export{g as load};
|
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const b="20240702",c="b3fdbacb90688f739129bee4d59bd0ab6c69fcd4";export{b as buildDate,c as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const e={action:"EsriFeatureTableActionColumn",attachments:"EsriFeatureTableAttachmentsColumn",relationship:"EsriFeatureTableRelationshipColumn"};function n(e){return e&&"selection"===e.type}function t(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"id"in e&&"load"in e&&"objectIdField"in e&&"type"in e&&"when"in e}function i(e){return t(e)&&"queryAttachments"in e}function r(e){return t(e)&&"editingEnabled"in e&&"applyEdits"in e}function a(e){return t(e)&&"relationships"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e}function u(e){return null!=e&&"object"==typeof e&&"type"in e&&null!==e.type&&("column"===e.type||"field"===e.type||"group"===e.type)}function l(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-image"===e.type}function s(e,n,{relatedTableId:t}){if(!n?.map)return;const i="scene"===e.type&&e.associatedLayer?e.associatedLayer.url:e.url,r=n=>!(!a(n)||n===e)&&("sublayer"===n.type?n.id===t:i===n.url&&n.layerId===t);if("sublayer"===e.type&&l(e.parent)){const n=e.parent,
|
|
5
|
+
const e={action:"EsriFeatureTableActionColumn",attachments:"EsriFeatureTableAttachmentsColumn",relationship:"EsriFeatureTableRelationshipColumn"};function n(e){return e&&"selection"===e.type}function t(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"id"in e&&"load"in e&&"objectIdField"in e&&"type"in e&&"when"in e}function i(e){return t(e)&&"queryAttachments"in e}function r(e){return t(e)&&"editingEnabled"in e&&"applyEdits"in e}function a(e){return t(e)&&"relationships"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e}function u(e){return null!=e&&"object"==typeof e&&"type"in e&&null!==e.type&&("column"===e.type||"field"===e.type||"group"===e.type)}function l(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-image"===e.type}function s(e,n,{relatedTableId:t}){if(!n?.map)return;const i="scene"===e.type&&e.associatedLayer?e.associatedLayer.url:e.url,r=n=>!(!a(n)||n===e)&&("sublayer"===n.type&&n.layer?.url===e.url?n.id===t:i===n.url&&n.layerId===t);if("sublayer"===e.type&&l(e.parent)){const n=n=>a(n)&&n!==e&&n.id===t,i=e.parent,r=i.sublayers?.find(n)||i.subtables?.find(n);if(a(r))return r}const u=[...n.map.allLayers,...n.map.allTables];let s=null;for(const a of u)if(l(a)){const e=a.sublayers?.find(r)||a.subtables?.find(r);if(e){s=e;break}}else if(r(a)){s=a;break}return a(s)?s:void 0}export{s as findRelatedLayer,t as isIFeatureTableSupportedLayer,i as isIFeatureTableSupportedLayerWithAttachments,r as isIFeatureTableSupportedLayerWithEditing,a as isIFeatureTableSupportedLayerWithRelationships,l as isMapImageLayer,n as isSelectionFilter,u as isTemplateObjectWithType,e as uniqueColumnNames};
|