@arcgis/core 4.34.0-next.106 → 4.34.0-next.108

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 (114) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{e5bcc44f3dc6fc90835a.js → 0461ac6ddd44f8da2eec.js} +1 -1
  3. package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
  4. package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
  5. package/assets/esri/core/workers/chunks/1ae3d331da5baa8e4b6a.js +1 -0
  6. package/assets/esri/core/workers/chunks/1d807057327ba90ab770.js +1 -0
  7. package/assets/esri/core/workers/chunks/297b11752f9c251cd7be.js +1 -0
  8. package/assets/esri/core/workers/chunks/378bed624605fe8f62b1.js +1 -0
  9. package/assets/esri/core/workers/chunks/{b92287544ddf73ed7156.js → 38bfd13c09e4a4fbb88c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
  11. package/assets/esri/core/workers/chunks/44e40484acb577039c82.js +1 -0
  12. package/assets/esri/core/workers/chunks/4640f9add1cc9af14468.js +1 -0
  13. package/assets/esri/core/workers/chunks/5e60542f80bdacb6e7af.js +1 -0
  14. package/assets/esri/core/workers/chunks/616e3d1947eda575a25a.js +1 -0
  15. package/assets/esri/core/workers/chunks/6a61aa3ee10687c6973d.js +1 -0
  16. package/assets/esri/core/workers/chunks/{c454d741907a2c4de93e.js → 75535e2e487ed2616acf.js} +1 -1
  17. package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
  18. package/assets/esri/core/workers/chunks/{b96eb0ea506379182d62.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
  19. package/assets/esri/core/workers/chunks/{2f03d33f4ca8a48461fc.js → 7786fc1b3779df832e0a.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{5d3998e15df273a89078.js → 7e099070c03e8f95dd47.js} +1 -1
  21. package/assets/esri/core/workers/chunks/81501abaabf10e9bef1b.js +1 -0
  22. package/assets/esri/core/workers/chunks/{2651f2b84e1ead967bb8.js → 8cf2669900bb45cb094a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/8ec6ad6d76b4755a4cf6.js +1 -0
  24. package/assets/esri/core/workers/chunks/9bbf1ee424d480b62d48.js +1 -0
  25. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
  26. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
  27. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  28. package/assets/esri/core/workers/chunks/{3ee5c5b946d578a9d003.js → af0f82f7efa6e983eca5.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{b0cc6d63c3a0fef920a3.js → bf9b2949894cc2a1e6b3.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{8b086e49e377cf218f3d.js → cd3b843ffd4010038c74.js} +1 -1
  31. package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
  32. package/assets/esri/core/workers/chunks/d0767001601412f17ada.js +1 -0
  33. package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js → d391bfbaf0e790cd10d6.js} +2 -2
  34. package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
  35. package/assets/esri/core/workers/chunks/d5fa879de92da4441771.js +1 -0
  36. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  37. package/assets/esri/core/workers/chunks/d9aee7ee4ab75b446ef1.js +1 -0
  38. package/assets/esri/core/workers/chunks/e97bffa614ad89105f38.js +1 -0
  39. package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
  40. package/assets/esri/core/workers/chunks/f06d185e7defc4272ae7.js +1 -0
  41. package/assets/esri/core/workers/chunks/{d1abc375bfa664a907bf.js → f2f3ce7a0f3e394d27c4.js} +1 -1
  42. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  43. package/assets/esri/core/workers/chunks/{fe3f95fda29e4844b153.js → fa6e59e72c6e1fa79cf8.js} +1 -1
  44. package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
  45. package/assets/esri/core/workers/chunks/{c89fff4052fe75345080.js → fd410a56286f9b8a5903.js} +1 -1
  46. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
  47. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
  48. package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
  49. package/assets/esri/themes/dark/main.css +1 -1
  50. package/assets/esri/themes/light/main.css +1 -1
  51. package/assets/esri/themes/light/view.css +1 -1
  52. package/config.js +1 -1
  53. package/form/FormTemplate.js +1 -1
  54. package/form/elements/Element.js +1 -1
  55. package/form/elements/FieldElement.js +1 -1
  56. package/form/elements/GroupElement.js +1 -1
  57. package/interfaces.d.ts +19 -23
  58. package/kernel.js +1 -1
  59. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  60. package/layers/knowledgeGraph/layerUtils.js +1 -1
  61. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  62. package/package.json +2 -2
  63. package/smartMapping/renderers/size.js +1 -1
  64. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  65. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  66. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  67. package/smartMapping/support/adapters/support/utils.js +1 -1
  68. package/support/revision.js +1 -1
  69. package/symbols/support/utils.js +1 -1
  70. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  71. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  72. package/views/layers/FeatureLayerView.js +1 -1
  73. package/views/support/PromiseQueue.js +1 -1
  74. package/views/support/Scheduler.js +1 -1
  75. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  76. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  77. package/widgets/Editor/EditorViewModel.js +1 -1
  78. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  79. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  80. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  81. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  82. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  83. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  84. package/widgets/Editor/UpdateWorkflow.js +1 -1
  85. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  86. package/widgets/Editor/support/SketchController.js +1 -1
  87. package/widgets/Editor/support/errors.js +5 -0
  88. package/widgets/Editor/workflowUtils.js +1 -1
  89. package/widgets/Editor.js +1 -1
  90. package/widgets/Legend/LegendViewModel.js +1 -1
  91. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  92. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  93. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  94. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  95. package/assets/esri/core/workers/chunks/02e7c1f5200c3fed2bee.js +0 -1
  96. package/assets/esri/core/workers/chunks/1762ff76350065750c75.js +0 -1
  97. package/assets/esri/core/workers/chunks/1af644d93d1cf4a8266b.js +0 -1
  98. package/assets/esri/core/workers/chunks/456161a323be7d640c61.js +0 -1
  99. package/assets/esri/core/workers/chunks/49ef0430852cac3fec06.js +0 -1
  100. package/assets/esri/core/workers/chunks/5a527a47285a5995cff9.js +0 -1
  101. package/assets/esri/core/workers/chunks/5a833a08c5b68dc087ec.js +0 -1
  102. package/assets/esri/core/workers/chunks/655360995c1cbc78a5a3.js +0 -1
  103. package/assets/esri/core/workers/chunks/693103f75c8a44a7d289.js +0 -1
  104. package/assets/esri/core/workers/chunks/6f4bd0ee85e7e5a74340.js +0 -1
  105. package/assets/esri/core/workers/chunks/83be98ea5306e79b9f4d.js +0 -1
  106. package/assets/esri/core/workers/chunks/a665cc81854df7d60254.js +0 -1
  107. package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
  108. package/assets/esri/core/workers/chunks/b96eb0ea506379182d62.js +0 -2
  109. package/assets/esri/core/workers/chunks/c4b2a7ec35924ac41615.js +0 -1
  110. package/assets/esri/core/workers/chunks/d1ebd5fb5cc7101a7a84.js +0 -1
  111. package/assets/esri/core/workers/chunks/db43dc0ea893624721c1.js +0 -1
  112. package/assets/esri/core/workers/chunks/db98d0809cea8088956d.js +0 -1
  113. package/assets/esri/core/workers/chunks/dd6ba7d5503abba204e6.js +0 -1
  114. package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
package/config.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.34/esri/copyright.txt for details.
4
4
  */
5
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.106";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
5
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.108";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{JSONSupport as t}from"../core/JSONSupport.js";import{clone as s}from"../core/lang.js";import{addMaybe as r,addMany as o}from"../core/SetUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import{cast as n}from"../core/accessorSupport/decorators/cast.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import m from"./ExpressionInfo.js";import a from"./elements/GroupElement.js";import{ensureType as d,buildTypeMaps as f,fromJSON as u,toJSON as h,isTextElement as y,isGroupElement as j,isFieldElement as x}from"./support/formUtils.js";import{collectArcadeFieldNames as E,collectFields as w,extractSubstitutionTemplatesFromString as v,collectField as S}from"../layers/support/fieldUtils.js";var I;const b=f(a);let F=I=class extends t{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.title=null}castElements(e){return d(e,b)}readElements(e,t){return u(t.formElements,b)}writeElements(e,t){t.formElements=h(e,b)}clone(){return new I({description:this.description,expressionInfos:s(this.expressionInfos),elements:s(this.elements),title:this.title,preserveFieldValuesWhenHidden:this.preserveFieldValuesWhenHidden})}async getFieldsUsed(e,t){const s=new Set,{description:r,elements:o,expressionInfos:i,title:n}=this;if(U(s,e,r),U(s,e,n),!o)return[];const l=k(o,i).map(t=>E(s,e,null,t));await Promise.all(l);for(const p of o)g(s,{fieldsIndex:e,relationships:t},p);return Array.from(s).sort()}};function g(e,t,s){const{fieldsIndex:r}=t;if(!r||r.fields.length!==e.size)switch(U(e,r,s.label),U(e,r,s.description),s.type){case"field":S(e,r,s.fieldName);break;case"group":s.elements.forEach(s=>g(e,t,s));break;case"relationship":if(t.relationships){const o=t.relationships.find(e=>e.id===s.relationshipId);o&&S(e,r,o.keyField)}w(e,r,s.orderByFields?.map(e=>e.field));break;case"text":U(e,r,s.text)}}function k(e,t){if(!t||0===t.length)return[];const s=H(e),r=[];for(const o of t)s.has(o.name)&&r.push(o.expression);return r}function H(e){const t=new Set;for(const s of e)if(r(t,s.visibilityExpression),!y(s))if(j(s))o(t,H(s.elements));else if(r(t,s.editableExpression),x(s)){const{requiredExpression:e,valueExpression:r}=s;o(t,[e,r])}return t}function U(e,t,s){w(e,t,v(s))}e([i({type:String,json:{write:!0}})],F.prototype,"description",void 0),e([i({json:{write:!0}})],F.prototype,"elements",void 0),e([n("elements")],F.prototype,"castElements",null),e([l("elements",["formElements"])],F.prototype,"readElements",null),e([c("elements")],F.prototype,"writeElements",null),e([i({type:[m],json:{write:!0}})],F.prototype,"expressionInfos",void 0),e([i({type:Boolean,json:{default:!1,write:!0}})],F.prototype,"preserveFieldValuesWhenHidden",void 0),e([i({type:String,json:{write:!0}})],F.prototype,"title",void 0),F=I=e([p("esri.form.FormTemplate")],F);const V=F;export{V as default};
5
+ import{__decorate as e}from"tslib";import{JSONSupport as t}from"../core/JSONSupport.js";import{clone as s}from"../core/lang.js";import{addMaybe as r,addMany as o}from"../core/SetUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import{cast as n}from"../core/accessorSupport/decorators/cast.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../core/accessorSupport/decorators/writer.js";import c from"./ExpressionInfo.js";import a from"./elements/GroupElement.js";import{ensureType as d,fromJSON as f,toJSON as u,isTextElement as h,isGroupElement as y,isFieldElement as j,buildTypeMaps as x}from"./support/formUtils.js";import{collectArcadeFieldNames as E,collectFields as w,extractSubstitutionTemplatesFromString as v,collectField as S}from"../layers/support/fieldUtils.js";var I;const b=x(a);let F=I=class extends t{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.title=null}castElements(e){return d(e,b)}readElements(e,t){return f(t.formElements,b)}writeElements(e,t){t.formElements=u(e,b)}clone(){return new I({description:this.description,expressionInfos:s(this.expressionInfos),elements:s(this.elements),title:this.title,preserveFieldValuesWhenHidden:this.preserveFieldValuesWhenHidden})}async getFieldsUsed(e,t){const s=new Set,{description:r,elements:o,expressionInfos:i,title:n}=this;if(U(s,e,r),U(s,e,n),!o)return[];const l=k(o,i).map(t=>E(s,e,null,t));await Promise.all(l);for(const p of o)g(s,{fieldsIndex:e,relationships:t},p);return Array.from(s).sort()}};function g(e,t,s){const{fieldsIndex:r}=t;if(!r||r.fields.length!==e.size)switch(U(e,r,s.label),U(e,r,s.description),s.type){case"field":S(e,r,s.fieldName);break;case"group":s.elements.forEach(s=>g(e,t,s));break;case"relationship":if(t.relationships){const o=t.relationships.find(e=>e.id===s.relationshipId);o&&S(e,r,o.keyField)}w(e,r,s.orderByFields?.map(e=>e.field));break;case"text":U(e,r,s.text)}}function k(e,t){if(!t||0===t.length)return[];const s=H(e),r=[];for(const o of t)s.has(o.name)&&r.push(o.expression);return r}function H(e){const t=new Set;for(const s of e)if(r(t,s.visibilityExpression),!h(s))if(y(s))o(t,H(s.elements));else if(r(t,s.editableExpression),j(s)){const{requiredExpression:e,valueExpression:r}=s;o(t,[e,r])}return t}function U(e,t,s){w(e,t,v(s))}e([i({type:String,json:{write:!0}})],F.prototype,"description",void 0),e([i({json:{write:!0}})],F.prototype,"elements",void 0),e([n("elements")],F.prototype,"castElements",null),e([l("elements",["formElements"])],F.prototype,"readElements",null),e([m("elements")],F.prototype,"writeElements",null),e([i({type:[c],json:{write:!0}})],F.prototype,"expressionInfos",void 0),e([i({type:Boolean,json:{default:!1,write:!0}})],F.prototype,"preserveFieldValuesWhenHidden",void 0),e([i({type:String,json:{write:!0}})],F.prototype,"title",void 0),F=I=e([p("esri.form.FormTemplate")],F);export{F as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";let s=class extends o{constructor(t){super(t),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};t([r({type:String,json:{write:!0}})],s.prototype,"description",void 0),t([r({type:String,json:{write:!0}})],s.prototype,"label",void 0),t([r()],s.prototype,"type",void 0),t([r({type:String,json:{write:!0}})],s.prototype,"visibilityExpression",void 0),s=t([e("esri.form.elements.Element")],s);const i=s;export{i as default};
5
+ import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";let s=class extends o{constructor(t){super(t),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};t([r({type:String,json:{write:!0}})],s.prototype,"description",void 0),t([r({type:String,json:{write:!0}})],s.prototype,"label",void 0),t([r()],s.prototype,"type",void 0),t([r({type:String,json:{write:!0}})],s.prototype,"visibilityExpression",void 0),s=t([e("esri.form.elements.Element")],s);export{s as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import o from"./Element.js";import{types as s}from"./inputs.js";import{fromJSON as r,types as p}from"../../layers/support/domains.js";var n;let l=n=class extends o{constructor(e){super(e),this.domain=null,this.editable=null,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}clone(){return new n({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};e([t({types:p,json:{read:{reader:r},write:!0}})],l.prototype,"domain",void 0),e([t({type:Boolean,json:{write:!0}})],l.prototype,"editable",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"editableExpression",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"fieldName",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"hint",void 0),e([t({types:s,json:{read:{source:"inputType"},write:{target:"inputType"}}})],l.prototype,"input",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"requiredExpression",void 0),e([t({type:String,json:{read:!1,write:!0}})],l.prototype,"type",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"valueExpression",void 0),l=n=e([i("esri.form.elements.FieldElement")],l);const d=l;export{d as default};
5
+ import{__decorate as e}from"tslib";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import o from"./Element.js";import{types as r}from"./inputs.js";import{fromJSON as s,types as p}from"../../layers/support/domains.js";var n;let l=n=class extends o{constructor(e){super(e),this.domain=null,this.editable=null,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}clone(){return new n({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};e([t({types:p,json:{read:{reader:s},write:!0}})],l.prototype,"domain",void 0),e([t({type:Boolean,json:{write:!0}})],l.prototype,"editable",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"editableExpression",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"fieldName",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"hint",void 0),e([t({types:r,json:{read:{source:"inputType"},write:{target:"inputType"}}})],l.prototype,"input",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"requiredExpression",void 0),e([t({type:String,json:{read:!1,write:!0}})],l.prototype,"type",void 0),e([t({type:String,json:{write:!0}})],l.prototype,"valueExpression",void 0),l=n=e([i("esri.form.elements.FieldElement")],l);export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{clone as t}from"../../core/lang.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{cast as o}from"../../core/accessorSupport/decorators/cast.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import l from"./Element.js";import{ensureType as n,fromJSON as m,toJSON as a,buildTypeMaps as c}from"../support/formUtils.js";var d;let u=d=class extends l{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return n(e,f,!1)}readElements(e,t){return m(t.formElements,f,!1)}writeElements(e,t){t.formElements=a(e,f,!1)}clone(){return new d({description:this.description,elements:t(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};e([r({json:{write:!0}})],u.prototype,"elements",void 0),e([o("elements")],u.prototype,"castElements",null),e([s("elements",["formElements"])],u.prototype,"readElements",null),e([p("elements")],u.prototype,"writeElements",null),e([r({type:["collapsed","expanded"],json:{write:!0}})],u.prototype,"initialState",void 0),e([r({type:String,json:{read:!1,write:!0}})],u.prototype,"type",void 0),u=d=e([i("esri.form.elements.GroupElement")],u);const f=c(u),y=u;export{y as default};
5
+ import{__decorate as e}from"tslib";import{clone as t}from"../../core/lang.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{cast as o}from"../../core/accessorSupport/decorators/cast.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import l from"./Element.js";import{ensureType as n,buildTypeMaps as m,fromJSON as a,toJSON as c}from"../support/formUtils.js";var d;let u=d=class extends l{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return n(e,f,!1)}readElements(e,t){return a(t.formElements,f,!1)}writeElements(e,t){t.formElements=c(e,f,!1)}clone(){return new d({description:this.description,elements:t(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};e([r({json:{write:!0}})],u.prototype,"elements",void 0),e([o("elements")],u.prototype,"castElements",null),e([s("elements",["formElements"])],u.prototype,"readElements",null),e([p("elements")],u.prototype,"writeElements",null),e([r({type:["collapsed","expanded"],json:{write:!0}})],u.prototype,"initialState",void 0),e([r({type:String,json:{read:!1,write:!0}})],u.prototype,"type",void 0),u=d=e([i("esri.form.elements.GroupElement")],u);const f=m(u),y=u;export{y as default};
package/interfaces.d.ts CHANGED
@@ -20343,7 +20343,7 @@ declare namespace __esri {
20343
20343
  | (FeatureReductionSelectionProperties & { type: "selection" })
20344
20344
  | nullish);
20345
20345
  /**
20346
- * An array of field configuration objects that define the display properties of fields.
20346
+ * An array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldConfiguration.html FieldConfiguration} objects that control how fields are displayed in popups and other UI elements.
20347
20347
  *
20348
20348
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fieldConfigurations Read more...}
20349
20349
  */
@@ -20584,7 +20584,7 @@ declare namespace __esri {
20584
20584
  */
20585
20585
  getFieldAlias(fieldName: string): string | nullish;
20586
20586
  /**
20587
- * Returns the field configuration for the specified field.
20587
+ * Returns the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldConfiguration.html FieldConfigurations} for the specified field.
20588
20588
  *
20589
20589
  * @param fieldName The name of the field.
20590
20590
  *
@@ -20871,7 +20871,7 @@ declare namespace __esri {
20871
20871
  | (FeatureReductionSelectionProperties & { type: "selection" })
20872
20872
  | nullish;
20873
20873
  /**
20874
- * An array of field configuration objects that define the display properties of fields.
20874
+ * An array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldConfiguration.html FieldConfiguration} objects that control how fields are displayed in popups and other UI elements.
20875
20875
  *
20876
20876
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fieldConfigurations Read more...}
20877
20877
  */
@@ -36082,9 +36082,7 @@ declare namespace __esri {
36082
36082
 
36083
36083
  export class FieldConfiguration {
36084
36084
  /**
36085
- * The alias of the field.
36086
- *
36087
- * @default null
36085
+ * The alias (or display name) for the field.
36088
36086
  *
36089
36087
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldConfiguration.html#alias Read more...}
36090
36088
  */
@@ -36096,7 +36094,7 @@ declare namespace __esri {
36096
36094
  */
36097
36095
  name: string;
36098
36096
  /**
36099
- * More description to come.
36097
+ * The `FieldConfiguration` class defines how fields in a layer are displayed and formatted within widgets and UI components.
36100
36098
  *
36101
36099
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldConfiguration.html Read more...}
36102
36100
  */
@@ -36136,7 +36134,7 @@ declare namespace __esri {
36136
36134
 
36137
36135
  interface FieldConfigurationProperties {
36138
36136
  /**
36139
- * The alias of the field.
36137
+ * The alias (or display name) for the field.
36140
36138
  *
36141
36139
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldConfiguration.html#alias Read more...}
36142
36140
  */
@@ -37643,16 +37641,12 @@ declare namespace __esri {
37643
37641
  /**
37644
37642
  * The maximum number of decimal places to display.
37645
37643
  *
37646
- * @default 3
37647
- *
37648
37644
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-NumberFieldFormat.html#maximumFractionDigits Read more...}
37649
37645
  */
37650
37646
  maximumFractionDigits: number;
37651
37647
  /**
37652
37648
  * The minimum number of decimal places to display.
37653
37649
  *
37654
- * @default 0
37655
- *
37656
37650
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-NumberFieldFormat.html#minimumFractionDigits Read more...}
37657
37651
  */
37658
37652
  minimumFractionDigits: number;
@@ -37663,7 +37657,7 @@ declare namespace __esri {
37663
37657
  *
37664
37658
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-NumberFieldFormat.html#style Read more...}
37665
37659
  */
37666
- style: "decimal";
37660
+ readonly style: "decimal";
37667
37661
  /**
37668
37662
  * The type of field format.
37669
37663
  *
@@ -37679,7 +37673,7 @@ declare namespace __esri {
37679
37673
  */
37680
37674
  useGrouping: "always" | "auto" | "never";
37681
37675
  /**
37682
- * More description to come.
37676
+ * The `NumberFieldFormat` class defines the formatting options for numeric field {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type types}.
37683
37677
  *
37684
37678
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-NumberFieldFormat.html Read more...}
37685
37679
  */
@@ -37721,12 +37715,6 @@ declare namespace __esri {
37721
37715
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-NumberFieldFormat.html#minimumFractionDigits Read more...}
37722
37716
  */
37723
37717
  minimumFractionDigits?: number;
37724
- /**
37725
- * The formatting style to use.
37726
- *
37727
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-NumberFieldFormat.html#style Read more...}
37728
- */
37729
- style?: "decimal";
37730
37718
  /**
37731
37719
  * Indicates whether to use grouping separators, such as thousands separators.
37732
37720
  *
@@ -116081,6 +116069,7 @@ declare namespace __esri {
116081
116069
  | "awaiting-feature-to-create"
116082
116070
  | "awaiting-feature-to-update"
116083
116071
  | "awaiting-update-feature-candidate"
116072
+ | "choosing-key-feature"
116084
116073
  | "creating-features"
116085
116074
  | "disabled"
116086
116075
  | "drawing-splitter-geometry"
@@ -116390,7 +116379,14 @@ declare namespace __esri {
116390
116379
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-MergeFeaturesWorkflow.html Read more...}
116391
116380
  */
116392
116381
  interface MergeFeaturesWorkflow {
116393
- readonly featureFormViewModel: FeatureFormViewModel;
116382
+ readonly formViewModel: FeatureFormViewModel;
116383
+ readonly layer: | GeoJSONLayer
116384
+ | FeatureLayer
116385
+ | OrientedImageryLayer
116386
+ | SceneLayer
116387
+ | SubtypeSublayer
116388
+ | KnowledgeGraphSublayer
116389
+ | nullish;
116394
116390
  readonly type: "merge-features";
116395
116391
  }
116396
116392
 
@@ -116426,9 +116422,9 @@ declare namespace __esri {
116426
116422
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html FeatureFormViewModel} used by the
116427
116423
  * workflow to manage the attributes of the resulting features.
116428
116424
  *
116429
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-SplitFeatureWorkflow.html#featureFormViewModel Read more...}
116425
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-SplitFeatureWorkflow.html#formViewModel Read more...}
116430
116426
  */
116431
- readonly featureFormViewModel: FeatureFormViewModel;
116427
+ readonly formViewModel: FeatureFormViewModel;
116432
116428
  /**
116433
116429
  * The layer to which the feature being split belongs.
116434
116430
  *
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.34/esri/copyright.txt for details.
4
4
  */
5
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.106",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
5
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.108",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../PopupTemplate.js";import r from"../../core/Error.js";import{clone as i}from"../../core/lang.js";import o from"../../core/Logger.js";import{MultiOriginJSONMixin as n}from"../../core/MultiOriginJSONSupport.js";import"../../core/workers/workers.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import l from"../../geometry/Extent.js";import y from"../../geometry/Point.js";import u from"../../geometry/Polygon.js";import d from"../../geometry/Polyline.js";import{initializeProjection as h,project as m}from"../../geometry/projectionUtils.js";import c from"../../geometry/SpatialReference.js";import{wgs84 as g}from"../../geometry/support/spatialReferenceUtils.js";import{featureGeometryTypeKebabDictionary as f}from"../../geometry/support/typeUtils.js";import b from"../../graphic/KnowledgeGraphGraphicOrigin.js";import j from"../../graphic/LinkChartGraphicOrigin.js";import w from"../Layer.js";import T from"../graphics/data/FeatureStore.js";import{QueryEngine as v}from"../graphics/data/QueryEngine.js";import{createDrawingInfo as I}from"../graphics/sources/support/clientSideDefaults.js";import{systemOidFieldName as E,systemAggregationCountFieldName as O,systemIsSpatialFieldName as S,systemLayoutGeometryFieldName as x,systemOriginIdFieldName as N,systemDestinationIdFieldName as L}from"./constants.js";import{KnowledgeGraphSublayerBase as F}from"./KnowledgeGraphSublayerBase.js";import{createCapabilitiesFromKnowledgeGraph as _,getDisplayLabelProperty as R,getLinkChartDefaultLabelingInfo as C,getMapDefaultLabelingInfo as k,getKGSublayerSymbolColor as Q,getDefaultLCRelationshipSublayerSymbol as M,convertLayerEditsToGraphEdits as P,convertGraphEditsResultToFeatureEdits as G}from"./layerUtils.js";import{BlendLayer as D,blendModeProperty as J,effectProperty as q}from"../mixins/BlendLayer.js";import{DisplayFilteredLayer as U,displayFilterEnabledProperty as A,displayFilterInfoProperty as B}from"../mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as Z,featureEffectProperty as K}from"../mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as V}from"../mixins/FeatureReductionLayer.js";import{OrderedLayer as H,orderByProperty as W}from"../mixins/OrderedLayer.js";import{RefreshableLayer as Y}from"../mixins/RefreshableLayer.js";import{ScaleRangeLayer as z}from"../mixins/ScaleRangeLayer.js";import{TemporalLayer as X,useViewTimeProperty as $}from"../mixins/TemporalLayer.js";import{legendEnabled as ee,maxScale as te,minScale as re,opacity as ie,popupEnabled as oe}from"../support/commonProperties.js";import{featureReductionProperty as ne}from"../support/featureReductionUtils.js";import se from"../support/Field.js";import{fixRendererFields as ae,fixTimeInfoFields as pe}from"../support/fieldUtils.js";import le from"../support/LabelClass.js";import{reader as ye}from"../support/labelingInfo.js";import ue from"../support/TimeInfo.js";import de from"../../renderers/SimpleRenderer.js";import{fromJSON as he}from"../../renderers/support/jsonUtils.js";import{rendererTypes as me}from"../../renderers/support/typeUtils.js";import{executeApplyEdits as ce}from"../../rest/knowledgeGraphService.js";import ge from"../../rest/support/FeatureSet.js";import fe from"../../rest/support/Query.js";import{createPopupTemplate as be}from"../../support/popupUtils.js";import{applyColorToSymbol as je}from"../../symbols/support/utils.js";import we from"../../core/workers/RemoteClient.js";function Te(e){if(!e.json)return e;e.json.write=ve(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=ve(e.write))}return e}function ve(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=Ie(e)),e):!0===e?Ee():e}function Ie(e){const{target:t,writer:r,overridePolicy:i,...o}=e;return function(e,t){const r=Oe.call(this,e,t);return r.enabled?{...o,...r}:r}}function Ee(){return{overridePolicy:Oe}}function Oe(e,t){const r=!!this.geometryType;let i={enabled:r};return r&&(i={...i,...Se.call(this,e,t)}),i}function Se(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let xe=class extends(F(U(V(Z(D(H(X(z(Y(n(w))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=E,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new we(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=fe.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:_(null)}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.capabilities.operations.supportsEditing}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get isTable(){return"link-chart"!==this.parentCompositeLayer.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(se.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(se.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),se.fromJSON({name:O,type:"esriFieldTypeInteger",alias:O,editable:!1}),se.fromJSON({name:S,type:"esriFieldTypeInteger",alias:S,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?f.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return x;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new b(this.parent,this);case"link-chart":return new j(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?R(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?C(this.graphType,this.graphTypeName,e):k(this.graphTypeName,this.geometryType,e)}set renderer(e){ae(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),r=Q(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new de({type:"simple",symbol:M(r)});const e=he(I(f.toJSON("point")).renderer);return je(e.symbol,r),e}const i=he(I(f.toJSON(this.geometryType)).renderer);return je(i.symbol,r),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??c.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return be(this,e)}createQuery(){return new fe({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e),o=this.graphicOrigin,n=ge.fromJSON(await i.executeQuery(r.toJSON(),t?.signal));return n.features.forEach(e=>{e.sourceLayer=this,e.origin=o}),n}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const r={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:o}=await this._setupQueryObjects(r),n=await o.executeQueryForExtent(i.toJSON(),t?.signal);let s;return s=null!=n.extent?.xmin&&null!=n.extent?.xmax&&null!=n.extent?.ymin&&null!=n.extent?.ymax?new l(n.extent):new l,{count:n.count,extent:s}}async queryObjectIds(e,t){await this.load();const r=fe.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(r.toJSON(),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer.dataManager.knowledgeGraph)throw new r("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");const t=P(e,this);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const i=await ce(this.parentCompositeLayer.dataManager.knowledgeGraph,t),o=G(i,this.graphTypeName),n={addedFeatures:o.addFeatureResults,updatedFeatures:o.updateFeatureResults,deletedFeatures:o.deleteFeatureResults,addedAttachments:o.addAttachmentResults,deletedAttachments:o.deleteAttachmentResults,updatedAttachments:o.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",n),this.emit("apply-edits",{result:Promise.resolve(n)}),o}loadQueryEngine(e){const t=new T({geometryType:f.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new v({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:f.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new fe({where:"1=1",outFields:[E]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>pe(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const r=fe.from(e),i=r.geometry;if(i&&!i.spatialReference?.isWGS84&&(await h(i.spatialReference,g),r.geometry=m(i instanceof u||i instanceof d||i instanceof y?i:i.extent,g)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine};const o=await this.parentCompositeLayer.dataManager.getData(r,this,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(o)}}};function Ne(e,t,r){const i=[["ESRI__AGGREGATION_COUNT",O],["ESRI__ORIGIN_ID",N],["ESRI__DESTINATION_ID",L],["ESRI__LAYOUT_GEOMETRY",x]];try{for(const t of e)for(const[e,r]of i)t.labelExpression=t.labelExpression?.replaceAll(e,r),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,r))}catch(n){o.getLogger(this).warn("Error updating labelingInfo",n)}return ye(e,t,r)}e([s(Te(i(J)))],xe.prototype,"blendMode",void 0),e([s({readOnly:!0})],xe.prototype,"capabilities",null),e([s({readOnly:!0})],xe.prototype,"userHasUpdateItemPrivileges",null),e([s({type:Boolean})],xe.prototype,"editingEnabled",null),e([s()],xe.prototype,"isTable",null),e([s({json:{origins:{"web-scene":{write:!1}},write:Ee()}})],xe.prototype,"charts",void 0),e([s({readOnly:!0})],xe.prototype,"defaultPopupTemplate",null),e([s({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],xe.prototype,"definitionExpression",void 0),e([s(Te(i(A)))],xe.prototype,"displayFilterEnabled",void 0),e([s(Te(i(B)))],xe.prototype,"displayFilterInfo",void 0),e([s(Te(i(q)))],xe.prototype,"effect",void 0),e([s()],xe.prototype,"elevationInfo",void 0),e([s(Te(i(K)))],xe.prototype,"featureEffect",void 0),e([s(Te(i(ne)))],xe.prototype,"featureReduction",null),e([s()],xe.prototype,"fields",null),e([s()],xe.prototype,"geometryType",null),e([s()],xe.prototype,"geometryFieldName",null),e([s({readOnly:!0})],xe.prototype,"graphicOrigin",null),e([s({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],xe.prototype,"graphType",void 0),e([s({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],xe.prototype,"graphTypeName",null),e([s()],xe.prototype,"hasM",null),e([s()],xe.prototype,"hasZ",null),e([s({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],xe.prototype,"id",void 0),e([s({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],xe.prototype,"labelsVisible",void 0),e([s({type:[le],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:Ne,write:Ee()}})],xe.prototype,"labelingInfo",null),e([s({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],xe.prototype,"layerType",void 0),e([s(Te(i(ee)))],xe.prototype,"legendEnabled",void 0),e([s(Te(i(te)))],xe.prototype,"maxScale",void 0),e([s(Te(i(re)))],xe.prototype,"minScale",void 0),e([s()],xe.prototype,"objectIdField",void 0),e([s()],xe.prototype,"objectType",void 0),e([s(Te(i(ie)))],xe.prototype,"opacity",void 0),e([s(Te(i(W)))],xe.prototype,"orderBy",void 0),e([s({clonable:!1})],xe.prototype,"parent",void 0),e([s()],xe.prototype,"parentCompositeLayer",void 0),e([s(Te(i(oe)))],xe.prototype,"popupEnabled",void 0),e([s({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],xe.prototype,"popupTemplate",void 0),e([s({type:Number,json:{write:{overridePolicy:Se}}})],xe.prototype,"refreshInterval",void 0),e([s({types:me,json:{name:"layerDefinition.drawingInfo.renderer",write:Ee()}})],xe.prototype,"renderer",null),e([s()],xe.prototype,"source",void 0),e([s()],xe.prototype,"spatialReference",null),e([s({type:ue,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:Se},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:Se}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:Se}}}}})],xe.prototype,"timeInfo",null),e([s({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],xe.prototype,"title",null),e([p("title")],xe.prototype,"writeTitle",null),e([s({json:{read:!1}})],xe.prototype,"type",void 0),e([s(Te(i($)))],xe.prototype,"useViewTime",void 0),e([s({type:Boolean,json:{name:"visibility",write:Ee()}})],xe.prototype,"visible",void 0),xe=e([a("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],xe);export{xe as default};
5
+ import{__decorate as e}from"tslib";import t from"../../PopupTemplate.js";import r from"../../core/Error.js";import{clone as i}from"../../core/lang.js";import o from"../../core/Logger.js";import{MultiOriginJSONMixin as s}from"../../core/MultiOriginJSONSupport.js";import"../../core/workers/workers.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import l from"../../geometry/Extent.js";import y from"../../geometry/Point.js";import d from"../../geometry/Polygon.js";import u from"../../geometry/Polyline.js";import{initializeProjection as m,project as h}from"../../geometry/projectionUtils.js";import c from"../../geometry/SpatialReference.js";import{wgs84 as g}from"../../geometry/support/spatialReferenceUtils.js";import{featureGeometryTypeKebabDictionary as f}from"../../geometry/support/typeUtils.js";import b from"../../graphic/KnowledgeGraphGraphicOrigin.js";import j from"../../graphic/LinkChartGraphicOrigin.js";import w from"../Layer.js";import T from"../graphics/data/FeatureStore.js";import{QueryEngine as v}from"../graphics/data/QueryEngine.js";import{createDrawingInfo as I}from"../graphics/sources/support/clientSideDefaults.js";import{systemOidFieldName as O,systemAggregationCountFieldName as E,systemIsSpatialFieldName as S,systemLayoutGeometryFieldName as x,systemOriginIdFieldName as L,systemDestinationIdFieldName as N}from"./constants.js";import{KnowledgeGraphSublayerBase as _}from"./KnowledgeGraphSublayerBase.js";import{createCapabilitiesFromKnowledgeGraph as F,createDefaultKGSLFormTemplate as R,getDisplayLabelProperty as C,getLinkChartDefaultLabelingInfo as k,getMapDefaultLabelingInfo as Q,getKGSublayerSymbolColor as M,getDefaultLCRelationshipSublayerSymbol as P,createDefaultKGSLFeatureTemplates as G,convertLayerEditsToGraphEdits as D,convertGraphEditsResultToFeatureEdits as J}from"./layerUtils.js";import{BlendLayer as q,blendModeProperty as U,effectProperty as A}from"../mixins/BlendLayer.js";import{DisplayFilteredLayer as B,displayFilterEnabledProperty as Z,displayFilterInfoProperty as K}from"../mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as V,featureEffectProperty as H}from"../mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as W}from"../mixins/FeatureReductionLayer.js";import{OrderedLayer as Y,orderByProperty as z}from"../mixins/OrderedLayer.js";import{RefreshableLayer as X}from"../mixins/RefreshableLayer.js";import{ScaleRangeLayer as $}from"../mixins/ScaleRangeLayer.js";import{TemporalLayer as ee,useViewTimeProperty as te}from"../mixins/TemporalLayer.js";import{legendEnabled as re,maxScale as ie,minScale as oe,opacity as se,popupEnabled as ne}from"../support/commonProperties.js";import{featureReductionProperty as ae}from"../support/featureReductionUtils.js";import pe from"../support/Field.js";import{fixRendererFields as le,fixTimeInfoFields as ye}from"../support/fieldUtils.js";import de from"../support/LabelClass.js";import{reader as ue}from"../support/labelingInfo.js";import me from"../support/TimeInfo.js";import he from"../../renderers/SimpleRenderer.js";import{fromJSON as ce}from"../../renderers/support/jsonUtils.js";import{rendererTypes as ge}from"../../renderers/support/typeUtils.js";import{executeApplyEdits as fe}from"../../rest/knowledgeGraphService.js";import be from"../../rest/support/FeatureSet.js";import je from"../../rest/support/Query.js";import{createPopupTemplate as we}from"../../support/popupUtils.js";import{applyColorToSymbol as Te}from"../../symbols/support/utils.js";import ve from"../../core/workers/RemoteClient.js";function Ie(e){if(!e.json)return e;e.json.write=Oe(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=Oe(e.write))}return e}function Oe(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=Ee(e)),e):!0===e?Se():e}function Ee(e){const{target:t,writer:r,overridePolicy:i,...o}=e;return function(e,t){const r=xe.call(this,e,t);return r.enabled?{...o,...r}:r}}function Se(){return{overridePolicy:xe}}function xe(e,t){const r=!!this.geometryType;let i={enabled:r};return r&&(i={...i,...Le.call(this,e,t)}),i}function Le(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let Ne=class extends(_(B(W(V(q(Y(ee($(X(s(w))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=O,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new ve(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=je.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:F(null)}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.capabilities.operations.supportsEditing}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get isTable(){return"link-chart"!==this.parentCompositeLayer.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(pe.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(pe.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),pe.fromJSON({name:E,type:"esriFieldTypeInteger",alias:E,editable:!1}),pe.fromJSON({name:S,type:"esriFieldTypeInteger",alias:S,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):R(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?f.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return x;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new b(this.parent,this);case"link-chart":return new j(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?C(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?k(this.graphType,this.graphTypeName,e):Q(this.graphTypeName,this.geometryType,e)}set renderer(e){le(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),r=M(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new he({type:"simple",symbol:P(r)});const e=ce(I(f.toJSON("point")).renderer);return Te(e.symbol,r),e}const i=ce(I(f.toJSON(this.geometryType)).renderer);return Te(i.symbol,r),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??c.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):G(this)}set templates(e){this._overrideIfSome("templates",e)}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return we(this,e)}createQuery(){return new je({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e),o=this.graphicOrigin,s=be.fromJSON(await i.executeQuery(r.toJSON(),t?.signal));return s.features.forEach(e=>{e.sourceLayer=this,e.origin=o}),s}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const r={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:o}=await this._setupQueryObjects(r),s=await o.executeQueryForExtent(i.toJSON(),t?.signal);let n;return n=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new l(s.extent):new l,{count:s.count,extent:n}}async queryObjectIds(e,t){await this.load();const r=je.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(r.toJSON(),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer.dataManager.knowledgeGraph)throw new r("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");const t=await D(e,this);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const i=await fe(this.parentCompositeLayer.dataManager.knowledgeGraph,t),o=J(i,this.graphTypeName),s={addedFeatures:o.addFeatureResults,updatedFeatures:o.updateFeatureResults,deletedFeatures:o.deleteFeatureResults,addedAttachments:o.addAttachmentResults,deletedAttachments:o.deleteAttachmentResults,updatedAttachments:o.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",s),this.emit("apply-edits",{result:Promise.resolve(s)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...s.addedFeatures.map(e=>e.globalId),...s.updatedFeatures.map(e=>e.globalId),...s.deletedFeatures.map(e=>e.globalId)]),o}loadQueryEngine(e){const t=new T({geometryType:f.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new v({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:f.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new je({where:"1=1",outFields:[O]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>ye(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const r=je.from(e),i=r.geometry;if(i&&!i.spatialReference?.isWGS84&&(await m(i.spatialReference,g),r.geometry=h(i instanceof d||i instanceof u||i instanceof y?i:i.extent,g)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine};const o=await this.parentCompositeLayer.dataManager.getData(r,this,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(o)}}};function _e(e,t,r){const i=[["ESRI__AGGREGATION_COUNT",E],["ESRI__ORIGIN_ID",L],["ESRI__DESTINATION_ID",N],["ESRI__LAYOUT_GEOMETRY",x]];try{for(const t of e)for(const[e,r]of i)t.labelExpression=t.labelExpression?.replaceAll(e,r),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,r))}catch(s){o.getLogger(this).warn("Error updating labelingInfo",s)}return ue(e,t,r)}e([n(Ie(i(U)))],Ne.prototype,"blendMode",void 0),e([n({readOnly:!0})],Ne.prototype,"capabilities",null),e([n({readOnly:!0})],Ne.prototype,"userHasUpdateItemPrivileges",null),e([n({type:Boolean})],Ne.prototype,"editingEnabled",null),e([n()],Ne.prototype,"isTable",null),e([n({json:{origins:{"web-scene":{write:!1}},write:Se()}})],Ne.prototype,"charts",void 0),e([n({readOnly:!0})],Ne.prototype,"defaultPopupTemplate",null),e([n({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],Ne.prototype,"definitionExpression",void 0),e([n(Ie(i(Z)))],Ne.prototype,"displayFilterEnabled",void 0),e([n(Ie(i(K)))],Ne.prototype,"displayFilterInfo",void 0),e([n(Ie(i(A)))],Ne.prototype,"effect",void 0),e([n()],Ne.prototype,"elevationInfo",void 0),e([n(Ie(i(H)))],Ne.prototype,"featureEffect",void 0),e([n(Ie(i(ae)))],Ne.prototype,"featureReduction",null),e([n()],Ne.prototype,"fields",null),e([n()],Ne.prototype,"formTemplate",null),e([n()],Ne.prototype,"geometryType",null),e([n()],Ne.prototype,"geometryFieldName",null),e([n({readOnly:!0})],Ne.prototype,"graphicOrigin",null),e([n({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],Ne.prototype,"graphType",void 0),e([n({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],Ne.prototype,"graphTypeName",null),e([n()],Ne.prototype,"hasM",null),e([n()],Ne.prototype,"hasZ",null),e([n({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],Ne.prototype,"id",void 0),e([n({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],Ne.prototype,"labelsVisible",void 0),e([n({type:[de],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:_e,write:Se()}})],Ne.prototype,"labelingInfo",null),e([n({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],Ne.prototype,"layerType",void 0),e([n(Ie(i(re)))],Ne.prototype,"legendEnabled",void 0),e([n(Ie(i(ie)))],Ne.prototype,"maxScale",void 0),e([n(Ie(i(oe)))],Ne.prototype,"minScale",void 0),e([n()],Ne.prototype,"objectIdField",void 0),e([n()],Ne.prototype,"objectType",void 0),e([n(Ie(i(se)))],Ne.prototype,"opacity",void 0),e([n(Ie(i(z)))],Ne.prototype,"orderBy",void 0),e([n({clonable:!1})],Ne.prototype,"parent",void 0),e([n()],Ne.prototype,"parentCompositeLayer",void 0),e([n(Ie(i(ne)))],Ne.prototype,"popupEnabled",void 0),e([n({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],Ne.prototype,"popupTemplate",void 0),e([n({type:Number,json:{write:{overridePolicy:Le}}})],Ne.prototype,"refreshInterval",void 0),e([n({types:ge,json:{name:"layerDefinition.drawingInfo.renderer",write:Se()}})],Ne.prototype,"renderer",null),e([n()],Ne.prototype,"source",void 0),e([n()],Ne.prototype,"spatialReference",null),e([n()],Ne.prototype,"templates",null),e([n({type:me,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:Le},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:Le}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:Le}}}}})],Ne.prototype,"timeInfo",null),e([n({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],Ne.prototype,"title",null),e([p("title")],Ne.prototype,"writeTitle",null),e([n({json:{read:!1}})],Ne.prototype,"type",void 0),e([n(Ie(i(te)))],Ne.prototype,"useViewTime",void 0),e([n({type:Boolean,json:{name:"visibility",write:Se()}})],Ne.prototype,"visible",void 0),Ne=e([a("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],Ne);export{Ne as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../Color.js";import{getOrCreateMapValue as t}from"../../core/MapUtils.js";import{queryBinsCapabilities as s,queryCapabilities as o}from"../graphics/data/QueryEngineCapabilities.js";import{systemOidFieldName as a}from"./constants.js";import r from"../support/LabelClass.js";import n from"../support/LabelExpressionInfo.js";import{fetchClientDataAtKeys as p}from"../../rest/knowledgeGraphService.js";import i from"../../rest/knowledgeGraph/Entity.js";import l from"../../rest/knowledgeGraph/GraphApplyEdits.js";import u from"../../rest/knowledgeGraph/Relationship.js";import{isGraphic as d}from"../../support/guards.js";import c from"../../symbols/CIMSymbol.js";import y from"../../symbols/TextSymbol.js";const m={initializeLayersFromClientData:async(e,t,s)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const o=new Map;for(const r of t)o.set(r,f(e,r));const a=await p(e.dataManager.knowledgeGraph,Array.from(o.values()),{requestOptions:{signal:s?.signal}});for(const r of[...e.layers,...e.tables]){const t=r.objectType.name;if(null==t)continue;const s=a.get(f(e,t));if(s){const e=JSON.parse(s);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),r.read(e,{origin:"service"})}}}},f=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function b(e,t,s){return m.initializeLayersFromClientData(e,t,s)}const h=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"],g="#8f8f82";function w(t){return t<0||t>=h.length?new e(g):new e(h[t])}function I(e){const t=e.toArray();return new c({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function C(e){let t="ESRI__ID",s=4;for(const o of e)if(o.name){if("name"===o.name.toLowerCase()){t=o.name;break}o.name.toLowerCase().includes("name")?(t=o.name,s=2):"esriFieldTypeString"===o.fieldType&&s>3&&(t=o.name,s=3)}return t}function S(e,t,s){const o={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},a=new r({labelExpressionInfo:new n({expression:"ESRI__ID"===s?`${t}`:`$feature.${s}`}),labelPlacement:"above-center",symbol:new y(o)}),p=new r({labelExpressionInfo:new n({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new y({...o,yoffset:"12px"})});return"entity"===e?[a]:[p]}function A(e,t,s){const o={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},a="ESRI__ID"===s?`${e}`:`$feature.${s}`;return"point"===t?[new r({labelExpressionInfo:new n({expression:a}),labelPlacement:"above-center",symbol:new y(o)})]:"polyline"===t?[new r({labelExpressionInfo:new n({expression:a}),labelPlacement:"center-along",repeatLabel:!0,symbol:new y(o)})]:"polygon"===t?[new r({labelExpressionInfo:new n({expression:a}),labelPlacement:"always-horizontal",symbol:new y(o)})]:null}const M={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function L(e){const{capabilities:t,allowGeometryUpdates:a,serviceCapabilities:{geometryCapabilities:{supportsZValues:r,supportsMValues:n}}}=e?.serviceDefinition||M,p=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),i=new Set(p);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:n,supportsZ:r},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:i.has("Create"),supportsDelete:i.has("Delete"),supportsEditing:i.has("Editing"),supportsChangeTracking:!1,supportsQuery:i.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:i.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:o,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&a,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:i.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:i.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}function R(e,s){const o=new l,r=s.graphTypeName,n=s.graphType,p=e=>{const t={...e};for(const o of s.fields)o.editable||delete t[o.name];for(const s of Object.keys(e))s.includes("ESRI__")&&delete t[s];return t};for(const t of e.addFeatures??[]){const e=p(t.attributes);t.sourceLayer.graphTypeName===r&&("entity"===n?(o.entityAdds||(o.entityAdds=[]),o.entityAdds.push(new i({properties:e,typeName:r}))):(o.relationshipAdds||(o.relationshipAdds=[]),o.relationshipAdds.push(new u({properties:e,typeName:r}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[a],s=p(t.attributes);t.sourceLayer.graphTypeName===r&&("entity"===n?(o.entityUpdates||(o.entityUpdates=[]),o.entityUpdates.push(new i({id:e,properties:s,typeName:r}))):(o.relationshipUpdates||(o.relationshipUpdates=[]),o.relationshipUpdates.push(new u({id:e,properties:s,typeName:r}))))}const c=new Map;for(const i of e.deleteFeatures??[])if(d(i)){const e=i,s=t(c,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===r&&s.ids.push(e.attributes[a])}else if(i.objectId&&"string"==typeof i.objectId){t(c,r,()=>({typeName:r,ids:[]})).ids.push(i.objectId)}for(const t of c.values())t.ids.length>0&&("entity"===n?(o.entityDeletes||(o.entityDeletes=[]),o.entityDeletes.push({typeName:t.typeName,ids:t.ids})):(o.relationshipDeletes||(o.relationshipDeletes=[]),o.relationshipDeletes.push({typeName:t.typeName,ids:t.ids})));return o}function j(e,t){const s={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const o of e.editResults)if(o.typeName===t){for(const e of o.adds)s.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of o.updates)s.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of o.deletes)s.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return s}export{j as convertGraphEditsResultToFeatureEdits,R as convertLayerEditsToGraphEdits,L as createCapabilitiesFromKnowledgeGraph,g as fallbackKGSublayerSymbolHexColor,I as getDefaultLCRelationshipSublayerSymbol,C as getDisplayLabelProperty,w as getKGSublayerSymbolColor,S as getLinkChartDefaultLabelingInfo,A as getMapDefaultLabelingInfo,b as initializeLayersFromClientData,m as layerUtils};
5
+ import e from"../../Color.js";import{getOrCreateMapValue as t}from"../../core/MapUtils.js";import{FieldElement as s}from"../../form/elements.js";import o from"../../form/FormTemplate.js";import{initializeProjection as r,project as a}from"../../geometry/projectionUtils.js";import n from"../../geometry/SpatialReference.js";import{normalizeCentralMeridian as p}from"../../geometry/support/normalizeUtils.js";import{queryBinsCapabilities as i,queryCapabilities as l}from"../graphics/data/QueryEngineCapabilities.js";import{systemOidFieldName as u}from"./constants.js";import c from"../support/FeatureTemplate.js";import d from"../support/LabelClass.js";import y from"../support/LabelExpressionInfo.js";import{isKnowledgeGraphSublayer as m}from"../support/layerUtils.js";import{fetchClientDataAtKeys as f}from"../../rest/knowledgeGraphService.js";import b from"../../rest/knowledgeGraph/Entity.js";import h from"../../rest/knowledgeGraph/GraphApplyEdits.js";import g from"../../rest/knowledgeGraph/Relationship.js";import{isGraphic as w}from"../../support/guards.js";import I from"../../symbols/CIMSymbol.js";import C from"../../symbols/TextSymbol.js";const j={initializeLayersFromClientData:async(e,t,s)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const o=new Map;for(const a of t)o.set(a,S(e,a));const r=await f(e.dataManager.knowledgeGraph,Array.from(o.values()),{requestOptions:{signal:s?.signal}});for(const a of[...e.layers,...e.tables]){const t=a.objectType.name;if(null==t)continue;const s=r.get(S(e,t));if(s){const e=JSON.parse(s);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),a.read(e,{origin:"service"})}}}},S=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function L(e,t,s){return j.initializeLayersFromClientData(e,t,s)}const A=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"],M="#8f8f82";function R(t){return t<0||t>=A.length?new e(M):new e(A[t])}function T(e){const t=e.toArray();return new I({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function k(e){let t="ESRI__ID",s=4;for(const o of e)if(o.name){if("name"===o.name.toLowerCase()){t=o.name;break}o.name.toLowerCase().includes("name")?(t=o.name,s=2):"esriFieldTypeString"===o.fieldType&&s>3&&(t=o.name,s=3)}return t}function N(e,t,s){const o={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new d({labelExpressionInfo:new y({expression:"ESRI__ID"===s?`${t}`:`$feature.${s}`}),labelPlacement:"above-center",symbol:new C(o)}),a=new d({labelExpressionInfo:new y({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new C({...o,yoffset:"12px"})});return"entity"===e?[r]:[a]}function E(e,t,s){const o={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===s?`${e}`:`$feature.${s}`;return"point"===t?[new d({labelExpressionInfo:new y({expression:r}),labelPlacement:"above-center",symbol:new C(o)})]:"polyline"===t?[new d({labelExpressionInfo:new y({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new C(o)})]:"polygon"===t?[new d({labelExpressionInfo:new y({expression:r}),labelPlacement:"always-horizontal",symbol:new C(o)})]:null}const x={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function F(e){const{capabilities:t,allowGeometryUpdates:s,serviceCapabilities:{geometryCapabilities:{supportsZValues:o,supportsMValues:r}}}=e?.serviceDefinition||x,a=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),n=new Set(a);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:r,supportsZ:o},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:n.has("Create"),supportsDelete:n.has("Delete"),supportsEditing:n.has("Editing"),supportsChangeTracking:!1,supportsQuery:n.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:n.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:l,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&s,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:n.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:n.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function U(e,s){const o=new h,i=s.graphTypeName,l=s.graphType,c="knowledge-graph"===s.parentCompositeLayer.type?s.geometryFieldName:null,d=!!s.fieldsIndex.get(c)?.editable,y=e=>{const t={...e};for(const o of s.fields)o.editable||delete t[o.name];for(const s of Object.keys(e))s.includes("ESRI__")&&delete t[s];return t},f=async e=>{await r(e.spatialReference,n.WGS84);const t=a(e,n.WGS84);if("point"===t.type)return t.normalize();return(await p(t))[0]};for(const t of e.addFeatures??[]){const e=y(t.attributes);m(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===l?(o.entityAdds||(o.entityAdds=[]),c&&t.geometry&&(e[c]=await f(t.geometry)),o.entityAdds.push(new b({properties:e,typeName:i}))):(o.relationshipAdds||(o.relationshipAdds=[]),o.relationshipAdds.push(new g({properties:e,typeName:i}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[u],s=y(t.attributes);m(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===l?(o.entityUpdates||(o.entityUpdates=[]),c&&d&&t.geometry&&(s[c]=await f(t.geometry)),o.entityUpdates.push(new b({id:e,properties:s,typeName:i}))):(o.relationshipUpdates||(o.relationshipUpdates=[]),o.relationshipUpdates.push(new g({id:e,properties:s,typeName:i}))))}const I=new Map;for(const r of e.deleteFeatures??[])if(w(r)){const e=r,s=t(I,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===i&&s.ids.push(e.attributes[u])}else if(r.objectId&&"string"==typeof r.objectId){t(I,i,()=>({typeName:i,ids:[]})).ids.push(r.objectId)}for(const t of I.values())t.ids.length>0&&("entity"===l?(o.entityDeletes||(o.entityDeletes=[]),o.entityDeletes.push({typeName:t.typeName,ids:t.ids})):(o.relationshipDeletes||(o.relationshipDeletes=[]),o.relationshipDeletes.push({typeName:t.typeName,ids:t.ids})));return o}function D(e,t){const s={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const o of e.editResults)if(o.typeName===t){for(const e of o.adds)s.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of o.updates)s.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of o.deletes)s.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return s}function v(e){if(!e.objectType)return null;const t=[];for(const o of e.fields)!o.name.includes("ESRI__")&&o.editable&&"geometry"!==o.type&&t.push(new s({fieldName:o.name}));return new o({elements:t})}function G(e){if(!e.objectType)return null;let t=null;switch(e.geometryType){case"point":case"multipoint":t="point";break;case"polyline":t="line";break;case"polygon":t="polygon";break;default:t=null}return[new c({name:e.graphTypeName,drawingTool:t,prototype:{}})]}export{D as convertGraphEditsResultToFeatureEdits,U as convertLayerEditsToGraphEdits,F as createCapabilitiesFromKnowledgeGraph,G as createDefaultKGSLFeatureTemplates,v as createDefaultKGSLFormTemplate,M as fallbackKGSublayerSymbolHexColor,T as getDefaultLCRelationshipSublayerSymbol,k as getDisplayLabelProperty,R as getKGSublayerSymbolColor,N as getLinkChartDefaultLabelingInfo,E as getMapDefaultLabelingInfo,L as initializeLayersFromClientData,j as layerUtils};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{isArrayLike as e}from"../../../core/arrayUtils.js";import{deg2rad as t}from"../../../core/mathUtils.js";import{clone as a,zeros as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import i from"../../../geometry/Point.js";import{isElevationSource as n}from"../core/ElevationSourceDefinitions.js";import{rectifyMapPointPanoramic as o,rectifyMapPoint as c}from"./rectifyMapPoint.js";import{getWebMercatorScalingFactor as s,hasAngles as f,convertPixelToHeadingPitch as l,isElevationSampler as m,reducerFn as p,validatePixelsToTransform as h,validateRotationMatrix as u,computeFarplaneVertices as y,computeHFOVAndVFOV as d,vecToPoint as w,or as g,isUpdateElevationWithElevationSource as v,scaleAndAddWithFactor as x,computeNewReferenceCoordinates as M,projectiveTransform as R}from"./utils.js";import{worldToImage as A}from"./worldToImage.js";import{viewingLimit as P}from"../../../widgets/OrientedImageryViewer/constants.js";async function V(e,t,a){const{verticalFieldOfView:r,imageBoundaries:i,scalingFactor:n,farPlaneVertices:o,cameraLocation:c,pixelsToTransform:s,vecToPoint:f,pixelDepths:l}=S(e,t),m=new Array;return await j(s,o,i,f,t,m,c,n,r,a,l),Array.isArray(e)?m:m[0]}async function j(e,t,a,r,n,o,s,f,l,p,h){let u=n.averageElevation,y=0;for(const d of e){const e=L(t,a,d,r,n),w=h?.at(y);if("number"==typeof w){const t=F(e,s,f),a=w*f,r=[s[0]+t[0]*a,s[1]+t[1]*a,s[2]+t[2]*w];o.push(new i(r,n.cameraLocation.spatialReference));continue}if(y+=1,p&&g(m(p.elevationSample),v(p))){u=(await c(r(e),{x:d[0],y:d[1]},{...n,...p,farPlaneVertices:t.map(r)}))[2]}o.push(r(b(e,s,f,u,n.cameraPitch,l)))}}function F(e,t,a){const i=e[0]-t[0],n=e[1]-t[1],o=e[2]-t[2],c=Math.hypot(i,n)/a,s=Math.hypot(o,c)*a,f=r();return f[0]=i/s,f[1]=n/s,f[2]=o/s,f[2]=f[2]*a,f}function b(e,t,r,i,n,o){let c=a(e);const s=F(e,t,r);if(T(e[2],i,n,o)){const e=Math.abs((t[2]-i)/-s[2])*r;c=x(t,s,e,r)}else c[2]=i;return c}function T(e,t,a,r){return e<t||a+r/2<P}function L(e,t,a,r,i){let n=null;const o=9;let c,s=0,f=e,l=t;for(;s<=o;){const e=D(a,l,f,i);if(c=e.error,n=e.transformedPoint,g(c<=1,s===o))break;f=M(f,c,a,t),l=O(f,r,i),s++}return n}function O(e,t,a){return A(e.map(t),a).map(({x:e,y:t})=>[e,t,1])}function D(e,t,a,r){const{cameraLocation:n}=r,o=R(e,t,a),{x:c,y:s}=A(new i(o,n.spatialReference),r);return{transformedPoint:o,error:E(e,[c,s,1])}}function E(e,t){return Math.abs(e[0]-t[0])+Math.abs(e[1]-t[1])}function S(t,a){const r=e(t)||"items"in t?t:[t],{cameraLocation:n,rotationMatrix:o}=a;if(h(r,n),u(o),9!==o?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix");const c=s(n.y,n.spatialReference),f=y({...a,scalingFactor:c}),l=A(f.map(e=>new i(e,n.spatialReference)),a),{vfov:m}=d(a.horizontalFieldOfView,a.verticalFieldOfView,a.cameraRoll);return{cameraLocation:n.toArray(),imageBoundaries:l.map(({x:e,y:t})=>[e,t,1]),verticalFieldOfView:m,farPlaneVertices:f,scalingFactor:c,pixelsToTransform:r.map(e=>[e.x,e.y,1]),vecToPoint:w(n.spatialReference),pixelDepths:r.map(e=>B(e)?e.depth:void 0)}}function B(e){return"depth"in e&&"number"==typeof e.depth}async function H(e,a,r){const{cameraHeading:c,cameraLocation:h,farDistance:u,imageHeight:y,imageWidth:d,verticalFieldOfView:w}=a,g=s(h.y,h.spatialReference),v=u*g,x=new Array,[M,R,A]=h.toArray(),P=Array.isArray(e)?e:[e];for(const s of P){let e,P;const V=B(s),j=V?s.depth*g:v;if(f(s))e=s.heading,P=s.pitch;else{const t=l({x:s.x,y:s.y},d,y);e=t.heading,P=t.pitch}e=(e+c)%360;const F=[M+Math.sin(t(e))*Math.sin(t(P))*j,R+Math.cos(t(e))*Math.sin(t(P))*j,A+-Math.cos(t(P))*(V?s.depth:u)];if(V){x.push(new i(F,h.spatialReference));continue}let T=a.averageElevation;if(r&&(n(r)||m(r.elevationSample))){T=(await o(new i(F,h.spatialReference),{heading:e,pitch:P},{...a,...r,farPlaneVertices:p(u,u).map(([e,t])=>new i([h.x+e,h.y+t],h.spatialReference))}))[2]}x.push(new i(b(F,h.toArray(),g,T,P,w),h.spatialReference))}return Array.isArray(e)?x:x[0]}export{V as imageToWorld,H as imageToWorldPanoramic};
5
+ import{isArrayLike as e}from"../../../core/arrayUtils.js";import{deg2rad as t}from"../../../core/mathUtils.js";import{clone as a,zeros as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import i from"../../../geometry/Point.js";import{isElevationSource as n}from"../core/ElevationSourceDefinitions.js";import{rectifyMapPointPanoramic as o,rectifyMapPoint as c}from"./rectifyMapPoint.js";import{getWebMercatorScalingFactor as s,hasAngles as f,convertPixelToHeadingPitch as l,isElevationSampler as m,reducerFn as p,validatePixelsToTransform as h,validateRotationMatrix as u,computeFarplaneVertices as y,computeHFOVAndVFOV as d,vecToPoint as w,or as g,isUpdateElevationWithElevationSource as v,scaleAndAddWithFactor as x,computeNewReferenceCoordinates as M,projectiveTransform as R}from"./utils.js";import{worldToImage as A}from"./worldToImage.js";import{viewingLimit as P}from"../../../widgets/OrientedImageryViewer/constants.js";async function V(e,t,a){const{verticalFieldOfView:r,imageBoundaries:i,scalingFactor:n,farPlaneVertices:o,cameraLocation:c,pixelsToTransform:s,vecToPoint:f,pixelDepths:l}=S(e,t),m=new Array;return await j(s,o,i,f,t,m,c,n,r,a,l),Array.isArray(e)?m:m[0]}async function j(e,t,a,r,n,o,s,f,l,p,h){let u=n.averageElevation;const y=e.length;for(let d=0;d<y;d+=1){const y=e.at(d),w=L(t,a,y,r,n),x=h?.at(d);if("number"==typeof x){const e=F(w,s,f),t=x*f,a=[s[0]+e[0]*t,s[1]+e[1]*t,s[2]+e[2]*x];o.push(new i(a,n.cameraLocation.spatialReference));continue}if(p&&g(m(p.elevationSample),v(p))){u=(await c(r(w),{x:y[0],y:y[1]},{...n,...p,farPlaneVertices:t.map(r)}))[2]}o.push(r(b(w,s,f,u,n.cameraPitch,l)))}}function F(e,t,a){const i=e[0]-t[0],n=e[1]-t[1],o=e[2]-t[2],c=Math.hypot(i,n)/a,s=Math.hypot(o,c)*a,f=r();return f[0]=i/s,f[1]=n/s,f[2]=o/s,f[2]=f[2]*a,f}function b(e,t,r,i,n,o){let c=a(e);const s=F(e,t,r);if(T(e[2],i,n,o)){const e=Math.abs((t[2]-i)/-s[2])*r;c=x(t,s,e,r)}else c[2]=i;return c}function T(e,t,a,r){return e<t||a+r/2<P}function L(e,t,a,r,i){let n=null;const o=9;let c,s=0,f=e,l=t;for(;s<=o;){const e=D(a,l,f,i);if(c=e.error,n=e.transformedPoint,g(c<=1,s===o))break;f=M(f,c,a,t),l=O(f,r,i),s++}return n}function O(e,t,a){return A(e.map(t),a).map(({x:e,y:t})=>[e,t,1])}function D(e,t,a,r){const{cameraLocation:n}=r,o=R(e,t,a),{x:c,y:s}=A(new i(o,n.spatialReference),r);return{transformedPoint:o,error:E(e,[c,s,1])}}function E(e,t){return Math.abs(e[0]-t[0])+Math.abs(e[1]-t[1])}function S(t,a){const r=e(t)||"items"in t?t:[t],{cameraLocation:n,rotationMatrix:o}=a;if(h(r,n),u(o),9!==o?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix");const c=s(n.y,n.spatialReference),f=y({...a,scalingFactor:c}),l=A(f.map(e=>new i(e,n.spatialReference)),a),{vfov:m}=d(a.horizontalFieldOfView,a.verticalFieldOfView,a.cameraRoll);return{cameraLocation:n.toArray(),imageBoundaries:l.map(({x:e,y:t})=>[e,t,1]),verticalFieldOfView:m,farPlaneVertices:f,scalingFactor:c,pixelsToTransform:r.map(e=>[e.x,e.y,1]),vecToPoint:w(n.spatialReference),pixelDepths:r.map(e=>B(e)?e.depth:void 0)}}function B(e){return"depth"in e&&"number"==typeof e.depth}async function H(e,a,r){const{cameraHeading:c,cameraLocation:h,farDistance:u,imageHeight:y,imageWidth:d,verticalFieldOfView:w}=a,g=s(h.y,h.spatialReference),v=u*g,x=new Array,[M,R,A]=h.toArray(),P=Array.isArray(e)?e:[e];for(const s of P){let e,P;const V=B(s),j=V?s.depth*g:v;if(f(s))e=s.heading,P=s.pitch;else{const t=l({x:s.x,y:s.y},d,y);e=t.heading,P=t.pitch}e=(e+c)%360;const F=[M+Math.sin(t(e))*Math.sin(t(P))*j,R+Math.cos(t(e))*Math.sin(t(P))*j,A+-Math.cos(t(P))*(V?s.depth:u)];if(V){x.push(new i(F,h.spatialReference));continue}let T=a.averageElevation;if(r&&(n(r)||m(r.elevationSample))){T=(await o(new i(F,h.spatialReference),{heading:e,pitch:P},{...a,...r,farPlaneVertices:p(u,u).map(([e,t])=>new i([h.x+e,h.y+t],h.spatialReference))}))[2]}x.push(new i(b(F,h.toArray(),g,T,P,w),h.spatialReference))}return Array.isArray(e)?x:x[0]}export{V as imageToWorld,H as imageToWorldPanoramic};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.34.0-next.106",
3
+ "version": "4.34.0-next.108",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -21,7 +21,7 @@
21
21
  "@amcharts/amcharts5": "~5.14.1",
22
22
  "@arcgis/toolkit": "^4.34.0-next.157",
23
23
  "@esri/arcgis-html-sanitizer": "~4.1.0",
24
- "@esri/calcite-components": "^3.3.1",
24
+ "@esri/calcite-components": "^3.3.2",
25
25
  "@vaadin/grid": "~24.9.1",
26
26
  "@zip.js/zip.js": "~2.8.7",
27
27
  "luxon": "~3.7.2",