@arcgis/core 4.30.5 → 4.30.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{dabbdef0275ffa4d9b23.js → f3d6389f84da63a2d5f9.js} +2 -2
- package/assets/esri/core/workers/chunks/{dabbdef0275ffa4d9b23.js.LICENSE.txt → f3d6389f84da63a2d5f9.js.LICENSE.txt} +1 -1
- package/kernel.js +1 -1
- package/package.json +2 -2
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/support/relatedFeatureUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @esri/arcgis-html-sanitizer - v4.0.
|
|
2
|
+
* @esri/arcgis-html-sanitizer - v4.0.3 - Wed Jul 03 2024 17:50:35 GMT-0400 (Eastern Daylight Time)
|
|
3
3
|
* Copyright (c) 2024 - Environmental Systems Research Institute, Inc.
|
|
4
4
|
* Apache-2.0
|
|
5
5
|
*
|
package/kernel.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as e}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const r="4.30";let t,i=r;i="4.30.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as e}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const r="4.30";let t,i=r;i="4.30.7";function n(o){t=o}function m(s){const e=t?.findCredential(s);return e?.token?o(s,"token",e.token):s}has("host-webworker");export{m as addTokenParameter,s as buildDate,i as fullVersion,t as id,e as revision,n as setId,r as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "4.30.
|
|
3
|
+
"version": "4.30.7",
|
|
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": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"process": false
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@esri/arcgis-html-sanitizer": "~4.0.
|
|
28
|
+
"@esri/arcgis-html-sanitizer": "~4.0.3",
|
|
29
29
|
"@esri/calcite-colors": "~6.1.0",
|
|
30
30
|
"@esri/calcite-components": "^2.8.5",
|
|
31
31
|
"@vaadin/grid": "~24.3.13",
|
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const e="20240709",a="a3bf6191bdb06e64f3f9ce36ea155a1a70cfbc0e";export{e as buildDate,a as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{numericHash as t}from"../../../../../../core/string.js";import{FeatureTechniqueInstance as
|
|
5
|
+
import{numericHash as t}from"../../../../../../core/string.js";import{FeatureTechniqueInstance as n}from"./TechniqueInstance.js";import{castInstanceId as e}from"./mesh/instanceIdUtils.js";class s{constructor(){this._instanceById=new Map}destroy(){this._instanceById.clear()}get size(){return this._instanceById.size}entries(){return this._instanceById.entries()}updateStart(){this._instanceByIdNext=new Map}updateEnd(){if(!this._instanceByIdNext)throw new Error("InternalError: Found updateEnd call without corresponding updateStart");for(const t of this._instanceById.keys())this._instanceByIdNext.has(t)||this._instanceById.delete(t);for(const[t,n]of this._instanceByIdNext.entries()){const e=this._instanceById.get(t);e?e.setInput(n.getInput()):this._instanceById.set(t,n)}this._instanceByIdNext=null}values(){return this._instanceById.values()}ensureInstance(s,i){let r;if("object"==typeof i&&"optionalAttributes"in i&&"uniforms"in i){r=`${s.type}${JSON.stringify(i.optionalAttributes)}`;const t=i.uniforms;if("object"==typeof t)for(const n in t)r+=`${n}.${null!=t[n]}`}else r=`${s.type}.${JSON.stringify(i)}`;const a=t(r);if(this._instanceByIdNext){const t=new n(e(a),s,i);return this._instanceByIdNext.set(a,t),t}if(!this._instanceById.has(a)){const t=new n(e(a),s,i);this._instanceById.set(a,t)}return this._instanceById.get(a)}getInstance(t){return this._instanceById.get(t)}}export{s as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{isSome as o}from"../../../core/arrayUtils.js";import{ClonableMixin as l}from"../../../core/Clonable.js";import
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{isSome as o}from"../../../core/arrayUtils.js";import{ClonableMixin as l}from"../../../core/Clonable.js";import s from"../../../core/Collection.js";import{IdentifiableMixin as a}from"../../../core/Identifiable.js";import{ignoreAbortErrors as i,debounce as n}from"../../../core/promiseUtils.js";import{watch as u,initial as d}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as y}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../rest/support/RelationshipQuery.js";import{getFixedFieldName as c,findRelatedLayer as C}from"../support/featureUtils.js";import{getFieldsInTitleAndDesc as b}from"../../FeatureForm/featureFormUtils.js";const g=100;let _=class extends(l(a(r))){constructor(e){super(e),this._loaded=!1,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featuresPerPage=10,this.description=null,this.graphic=null,this.layer=null,this.map=null,this.orderByFields=null,this.featureCount=0,this.relationshipId=null,this.showAllEnabled=!1,this.title=null,this._cancelQuery=()=>{const{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{const{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await i(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();const e=new AbortController;this._queryFeatureCountAbortController=e,await i(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{const e=new AbortController;this._queryPageAbortController=e,await i(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=n(this._queryController,g),this._queryFeatureCountDebounced=n(this._queryFeatureCountController,g),this._queryPageDebounced=n(this._queryPageController,g),this._query=async()=>{const{_queryAbortController:e,relatedFeatures:t}=this;this.featureCount&&(this._destroyRelatedFeatureViewModels(),this.featurePage=1,t.destroyAll(),this.destroyed||t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal}))))},this.addHandles([u((()=>[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount]),(()=>this._queryDebounced()),d),u((()=>[this.featurePage,this.showAllEnabled]),(()=>this._queryPageDebounced())),u((()=>[this.layer,this.relationshipId,this.objectId,this.canQuery]),(()=>this._queryFeatureCountDebounced()))])}destroy(){this._destroyRelatedFeatureViewModels(),this.relatedFeatures.destroyAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage()}set featurePage(e){const{featuresPerPage:t,featureCount:r}=this,o=1,l=Math.ceil(r/t)||1;this._set("featurePage",Math.min(Math.max(e,o),l))}get featurePage(){return this._get("featurePage")}get orderByFieldsFixedCasing(){const{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map((e=>{const r=e.clone();return r.field=c(e.field,t),r})):e??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get canLoad(){return!!this.map&&null!=this.relationshipId&&"number"==typeof this.objectId}get canQuery(){const e=this.layer?.capabilities?.queryRelated;return!!(this.relatedLayer&&this.relationship&&null!=this.relationshipId&&null!=this.objectId&&e?.supportsCount&&e?.supportsPagination)}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}set displayCount(e){const t=0,r=10;this._set("displayCount",Math.min(Math.max(e,t),r))}get displayCount(){return this._get("displayCount")}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedFeatures(){return this._get("relatedFeatures")||new s}get relatedLayer(){const{layer:e,map:t,relationship:r}=this;return e?.loaded&&t&&r?C(t,e,r)??null:null}get relationship(){const{relationshipId:e,layer:t}=this;return null!=e?t?.relationships?.find((({id:t})=>t===e))??null:null}get relatedFeatureViewModels(){return this._get("relatedFeatureViewModels")||new s}get state(){const{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,canQuery:o,_loaded:l,canLoad:s}=this;return t||s&&!l?"loading":e||r?"querying":o?"ready":"disabled"}getRelatedFeatureByObjectId(e){return this.relatedFeatures.find((t=>t.getObjectId()===e))}refresh(){this._queryFeatureCountDebounced()}_destroyRelatedFeatureViewModels(){this.relatedFeatureViewModels?.destroyAll()}async _queryFeatureCount(){const{layer:e,relatedLayer:t,relationshipId:r,objectId:o,_queryFeatureCountAbortController:l,canQuery:s,supportsCacheHint:a}=this;if(await(e?.load()),await(t?.load()),!s||!e||!t||null==o)return void this._set("featureCount",0);const i=t.createQuery(),{historicMoment:n,gdbVersion:u}=e,d=new p({cacheHint:a,gdbVersion:u,historicMoment:n,relationshipId:r,returnGeometry:!1,objectIds:[o],where:i.where??void 0}),h=await e.queryRelatedFeaturesCount(d,{signal:l?.signal});this._set("featureCount",h[o]||0)}_sliceFeatures(e){const{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){const{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:o,featureCount:l}=this;!r||t<2||!l||e.addMany(await this._queryRelatedFeatures({signal:o?.signal}))}async _queryRelatedFeatures(e){const{orderByFieldsFixedCasing:t,showAllEnabled:r,featuresPerPage:l,displayCount:s,layer:a,relationshipId:i,featurePage:n,featureCount:u,relatedLayer:d,supportsCacheHint:h}=this,{canQuery:y,objectId:c}=this;if(!y||!a||!d||null==c)return[];const C=r?((n-1)*l+u)%u:0,g=r?l:s,_=d.objectIdField,F=[...t.map((e=>e.field)),...b(d),_].filter(o),m=t.map((e=>`${e.field} ${e.order}`)),f=d.createQuery(),{historicMoment:q,gdbVersion:A}=a,P=new p({orderByFields:m,start:C,num:g,outFields:F,cacheHint:h,historicMoment:q,gdbVersion:A,relationshipId:i,returnGeometry:!1,objectIds:[c],where:f.where??void 0}),w=await a.queryRelatedFeatures(P,{signal:e?.signal}),j=w[c]?.features||[];return j.forEach((e=>{e.sourceLayer=d,e.layer=d})),j}};e([h()],_.prototype,"_loaded",void 0),e([h()],_.prototype,"_queryAbortController",void 0),e([h()],_.prototype,"_queryPageAbortController",void 0),e([h()],_.prototype,"_queryFeatureCountAbortController",void 0),e([h({value:1})],_.prototype,"featurePage",null),e([h()],_.prototype,"featuresPerPage",void 0),e([h({readOnly:!0})],_.prototype,"orderByFieldsFixedCasing",null),e([h({readOnly:!0})],_.prototype,"supportsCacheHint",null),e([h({readOnly:!0})],_.prototype,"canLoad",null),e([h({readOnly:!0})],_.prototype,"canQuery",null),e([h()],_.prototype,"description",void 0),e([h({readOnly:!0})],_.prototype,"itemDescriptionFieldName",null),e([h({value:3})],_.prototype,"displayCount",null),e([h({type:t})],_.prototype,"graphic",void 0),e([h()],_.prototype,"layer",void 0),e([h()],_.prototype,"map",void 0),e([h({readOnly:!0})],_.prototype,"objectId",null),e([h({readOnly:!0})],_.prototype,"objectIdField",null),e([h()],_.prototype,"orderByFields",void 0),e([h({readOnly:!0})],_.prototype,"relatedFeatures",null),e([h({readOnly:!0})],_.prototype,"relatedLayer",null),e([h({readOnly:!0})],_.prototype,"relationship",null),e([h()],_.prototype,"featureCount",void 0),e([h({readOnly:!0})],_.prototype,"relatedFeatureViewModels",null),e([h()],_.prototype,"relationshipId",void 0),e([h()],_.prototype,"showAllEnabled",void 0),e([h()],_.prototype,"state",null),e([h()],_.prototype,"title",void 0),_=e([y("esri.widgets.Feature.FeatureRelationship.FeatureRelationshipViewModel")],_);const 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.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../request.js";import{unique as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import o from"../../../core/Logger.js";import{whenOrAbort as i,eachAlways as s}from"../../../core/promiseUtils.js";import{isNumericField as n}from"../../../layers/support/fieldUtils.js";import"../../../core/has.js";import"../../../layers/support/source/DataLayerSource.js";import{executeQueryJSON as l}from"../../../rest/query/executeQueryJSON.js";import"../../../config.js";import"../../../kernel.js";import"../../../core/urlUtils.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../geometry/support/aaBoundingBox.js";import"../../../core/mathUtils.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../geometry.js";import"../../../core/pbf.js";import"../../../rest/support/FeatureSet.js";import a from"../../../rest/support/Query.js";import"../../../rest/query/support/AttachmentInfo.js";import"../../../rest/support/AttachmentQuery.js";import u from"../../../rest/support/RelationshipQuery.js";import"../../../rest/support/TopFeaturesQuery.js";import p from"../../../rest/support/StatisticDefinition.js";import{isRelatedField as c}from"./featureUtils.js";const f="esri.widgets.Feature.support.relatedFeatureUtils",m=()=>o.getLogger(f),d=new Map;function y(e){if(!c(e))return null;const[t,r]=e.split("/").slice(1);return{layerId:t,fieldName:r}}function j(e,t){if(!t.relationships)return null;let r=null;const{relationships:o}=t;return o.some((t=>t.id===parseInt(e,10)&&(r=t,!0))),r}function g({originRelationship:e,relationships:t,layerId:r}){return t.find((({relatedTableId:t,id:o})=>`${t}`===r&&o===e?.id))??null}function h(e,t){const r=t.toLowerCase();for(const o in e)if(o.toLowerCase()===r)return e[o];return null}function F(e,t){const r=j(e,t);if(!r)return;return{url:`${t.url}/${r.relatedTableId}`,sourceSpatialReference:t.spatialReference,relation:r,relatedFields:[],outStatistics:[]}}function I(e,t){if(!t)return;if(!e)return;const{features:r,statsFeatures:o}=e,i=r?.value;t.relatedFeatures=i?i.features:[];const s=o?.value;t.relatedStatsFeatures=s?s.features:[]}function S(e,t,r,o){const i=new u;return i.outFields=["*"],i.relationshipId="number"==typeof t.id?t.id:parseInt(t.id,10),i.objectIds=[e.attributes[r.objectIdField]],r.queryRelatedFeatures?.(i,o)??Promise.resolve({})}function
|
|
5
|
+
import e from"../../../request.js";import{unique as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import o from"../../../core/Logger.js";import{whenOrAbort as i,eachAlways as s}from"../../../core/promiseUtils.js";import{isNumericField as n}from"../../../layers/support/fieldUtils.js";import"../../../core/has.js";import"../../../layers/support/source/DataLayerSource.js";import{executeQueryJSON as l}from"../../../rest/query/executeQueryJSON.js";import"../../../config.js";import"../../../kernel.js";import"../../../core/urlUtils.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../geometry/support/aaBoundingBox.js";import"../../../core/mathUtils.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../geometry.js";import"../../../core/pbf.js";import"../../../rest/support/FeatureSet.js";import a from"../../../rest/support/Query.js";import"../../../rest/query/support/AttachmentInfo.js";import"../../../rest/support/AttachmentQuery.js";import u from"../../../rest/support/RelationshipQuery.js";import"../../../rest/support/TopFeaturesQuery.js";import p from"../../../rest/support/StatisticDefinition.js";import{isRelatedField as c}from"./featureUtils.js";const f="esri.widgets.Feature.support.relatedFeatureUtils",m=()=>o.getLogger(f),d=new Map;function y(e){if(!c(e))return null;const[t,r]=e.split("/").slice(1);return{layerId:t,fieldName:r}}function j(e,t){if(!t.relationships)return null;let r=null;const{relationships:o}=t;return o.some((t=>t.id===parseInt(e,10)&&(r=t,!0))),r}function g({originRelationship:e,relationships:t,layerId:r}){return t.find((({relatedTableId:t,id:o})=>`${t}`===r&&o===e?.id))??null}function h(e,t){const r=t.toLowerCase();for(const o in e)if(o.toLowerCase()===r)return e[o];return null}function F(e,t){const r=j(e,t);if(!r)return;return{url:`${t.url}/${r.relatedTableId}`,sourceSpatialReference:t.spatialReference,relation:r,relatedFields:[],outStatistics:[]}}function I(e,t){if(!t)return;if(!e)return;const{features:r,statsFeatures:o}=e,i=r?.value;t.relatedFeatures=i?i.features:[];const s=o?.value;t.relatedStatsFeatures=s?s.features:[]}function S(e,t,r,o){const i=new u;return i.outFields=["*"],i.relationshipId="number"==typeof t.id?t.id:parseInt(t.id,10),i.objectIds=[e.attributes[r.objectIdField]],i.gdbVersion=r.gdbVersion??null,i.historicMoment=r.historicMoment??null,r.queryRelatedFeatures?.(i,o)??Promise.resolve({})}function b(e,t,r){let o=0;const i=[];for(;o<t.length;)i.push(`${e} IN (${t.slice(o,r+o)})`),o+=r;return i.join(" OR ")}function w(e){return e?t(e):void 0}function R(e){return e?t(e,((e,t)=>JSON.stringify(e.toJSON())===JSON.stringify(t.toJSON()))):void 0}async function U(e,t,r,o){const i=r.layerId.toString(),{layerInfo:u,relation:p,relatedFields:c,outStatistics:f,url:m,sourceSpatialReference:d}=t,y=w(c),j=R(f);if(!u||!p)return null;const F=g({originRelationship:p,relationships:u.relationships,layerId:i});if(F?.relationshipTableId&&F.keyFieldInRelationshipTable){const t=(await S(e,F,r,o))[e.attributes[r.objectIdField]];if(!t)return null;const i=t.features.map((e=>e.attributes[u.objectIdField]));if(j?.length&&u.supportsStatistics){const e=new a;e.where=b(u.objectIdField,i,1e3),e.outFields=y,e.outStatistics=j,e.sourceSpatialReference=d;const r={features:Promise.resolve(t),statsFeatures:l(m,e)};return s(r)}}const I=F?.keyField;if(I){const t=n(v(u.fields,I)),i=h(e.attributes,p.keyField),c=t?`${I}=${i}`:`${I}='${i}'`,f=r.historicMoment,g=r.gdbVersion,F=l(m,new a({where:c,outFields:y,sourceSpatialReference:d,historicMoment:f,gdbVersion:g}),o),S=!!j?.length&&u.supportsStatistics?l(m,new a({where:c,outFields:y,outStatistics:j,sourceSpatialReference:d}),o):null,b={features:F};return S&&(b.statsFeatures=S),s(b)}return null}function $(t,r){return e(t,{query:{f:"json"},signal:r?.signal})}function N({relatedInfos:e,layer:t},o){const n={};return e.forEach(((e,o)=>{const{relation:i}=e;if(!i){const e=new r("relation-required","A relation is required on a layer to retrieve related records.");throw m().error(e),e}const{relatedTableId:s}=i;if("number"!=typeof s){const e=new r("A related table ID is required on a layer to retrieve related records.");throw m().error(e),e}const l=`${t.url}/${s}`,a=d.get(l),u=a??$(l);a||d.set(l,u),n[o]=u})),i(s(n),o)}function T({graphic:e,relatedInfos:t,layer:r},o){const i={};return t.forEach(((t,s)=>{t.layerInfo&&(i[s]=U(e,t,r,o))})),s(i)}function q({relatedInfo:e,fieldName:t,fieldInfo:r}){if(e.relatedFields?.push(t),r.statisticType){const o=new p({statisticType:r.statisticType,onStatisticField:t,outStatisticFieldName:t});e.outStatistics?.push(o)}}function v(e,t){if(null!=e){t=t.toLowerCase();for(const r of e)if(r&&r.name.toLowerCase()===t)return r}return null}export{F as createRelatedInfo,g as getDestinationRelation,y as getRelatedFieldInfo,w as getUniqueOutFields,R as getUniqueOutStatistics,N as queryLayerInfos,T as queryRelatedFeatures,I as setRelatedFeatures,q as updateRelatedInfo};
|
package/widgets/FeatureForm.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import"../core/has.js";import i from"../core/Logger.js";import{createResolver as o}from"../core/promiseUtils.js";import{watch as n,whenOnce as a}from"../core/reactiveUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{isIntegerField as l}from"../layers/support/fieldUtils.js";import d from"./Widget.js";import{Prompt as p}from"./Editor/components/Prompt.js";import{css as u}from"./FeatureForm/css.js";import{isGroupInput as c,isFieldInput as m,isRelationshipInput as h,isTextElementInput as v,flattenInputs as g,isInputInGroupInput as _,isFieldElementWithInputType as b,getErrorMessageForFieldInput as C,getIconForFeature as f,isNumberFieldInput as y,subtypeChangeShouldPrompt as F}from"./FeatureForm/featureFormUtils.js";import w from"./FeatureForm/FeatureFormViewModel.js";import{loadCalciteComponents as R}from"./support/componentsUtils.js";import{isString as O}from"./support/dataUtils.js";import{getLabelForDateFieldValue as k,getIntlOptionsForField as I,numberingSystem as x,prepareISOFieldValueForDateComponents as M,prepareUnixFieldValueForDateComponents as D,normalizeTimeOnlyString as N,getISOFieldValueFromDateComponents as V,getUnixFieldValueFromDateComponents as T}from"./support/dateUtils.js";import{globalCss as L}from"./support/globalCss.js";import{Heading as S,incrementHeadingLevel as j}from"./support/Heading.js";import"./support/widgetUtils.js";import{messageBundle as E}from"./support/decorators/messageBundle.js";import{vmEvent as U}from"./support/decorators/vmEvent.js";import{tsx as P}from"./support/jsxFactory.js";import{substitute as A}from"../intl/substitute.js";const $="data-field-name";let H=class extends d{constructor(e,t){super(e,t),this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._inputsWithChanges=new Set,this._focusedFieldName=null,this._pendingSubtypeChoice=null,this._listObserverNode=null,this._listObserver=new IntersectionObserver((e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()}),{root:window.document}),this._prompt=null,this.groupDisplay="all",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new w,this._onShowAllRelatedRecordsClick=e=>{const{feature:t,relatedRecordCallbacks:i}=this;t&&i?.showAllRelatedRecords&&i.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t)=>{const{feature:i,relatedRecordCallbacks:o}=this;i&&o?.addRelatedRecord&&o.addRelatedRecord({parentFeature:i,relatedLayer:t,relationshipId:e})},this._onFormKeyDown=this._onFormKeyDown.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onGroupToggle=this._onGroupToggle.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentKeyDown=this._onComponentKeyDown.bind(this),this._afterComponentCreate=this._afterComponentCreate.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentCreateOrUpdate=this._afterDateComponentCreateOrUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n((()=>this.feature),(()=>{this._inputsWithChanges.clear(),this._dateComponentMap.clear(),a((()=>!this.viewModel.updating)).then((()=>{const e=this._getFocusableInput("forward");this._syncGroupInputStates(),this._focusedFieldName=e?.name||null,this._attemptFocusOnNextRender=!0}))})),n((()=>this.groupDisplay),(()=>this._syncGroupInputStates())),this.on("submit",(e=>{if(e.invalid.length>0){const[t]=e.invalid;e.invalid.forEach((e=>this._inputsWithChanges.add(e))),this._focusedFieldName=t,this._attemptFocusOnNextRender=!0,this.scheduleRender()}})),n((()=>[this.viewModel.activeRelationshipInput,this._listObserverNode]),(()=>this._onObserverChange()))])}loadDependencies(){return R({block:()=>import("@esri/calcite-components/dist/components/calcite-block.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.js"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),input:()=>import("@esri/calcite-components/dist/components/calcite-input.js"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker.js"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message.js"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number.js"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker.js"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button.js"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group.js"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch.js"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area.js")})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){const e=this.relatedRecordCallbacks;return!(!e||!(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get icon(){return"form-field"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get relatedRecordCallbacks(){return this.viewModel.relatedRecordCallbacks}set relatedRecordCallbacks(e){this.viewModel.relatedRecordCallbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get showPrompt(){return e=>{this._prompt?.cancel?.(),this._prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get clearPrompt(){return()=>this._prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){const{state:e}=this.viewModel;return P("div",{class:this.classes(u.base,L.widget,L.panel)},"ready"===e?this._renderForm():null)}_renderForm(){return P("div",null,P("form",{class:u.form,novalidate:!0,onkeydown:this._onFormKeyDown,onsubmit:this._onFormSubmit},this._renderHeader(),this._renderContent()),this._prompt?P(p,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderHeader(){const e=this.viewModel;if(!e.formHeaderVisible)return;const t=null!=e.formTitle&&P(S,{key:"title",level:this.headingLevel},e.formTitle),i=null!=e.formDescription&&P("p",{class:u.description,key:"description"},e.formDescription);return P("div",{class:u.formHeader},t,i)}_renderContent(){const{viewModel:e}=this;return e.activeRelationshipInput?this._renderRelationshipInput(e.activeRelationshipInput):e.inputs.filter(t).filter((e=>e.visible)).map((e=>this._renderInput(e)))}_renderInput(e){return c(e)?this._renderGroup(e):m(e)?this._renderLabeledField(e):h(e)?this._renderRelationshipInput(e):v(e)?this._renderTextElementInput(e):void 0}_renderDescriptionOrEmpty(e,t){return null==e?null:P("div",{class:this.classes(u.description),id:t},e)}_renderGroup(e){const{disabled:t,formTemplate:i,headingLevel:o}=this,{description:n,id:a,inputs:s,label:r,open:l}=e,d=s.filter((e=>e.visible)),p=this.viewModel.findField(this._focusedFieldName),c=p?.group===e,m="sequential"===this.groupDisplay;return P("calcite-block",{class:this.classes(u.group,m?u.groupSequential:null,c?u.groupActive:null,t?u.inputDisabled:null),collapsible:!0,"data-group":e,description:n||void 0,disabled:t,heading:`${r}`,headingLevel:i?.title?j(o):o,id:a,key:a,open:l,onCalciteBlockToggle:({target:t})=>this._onGroupToggle(t,e)},d.map((e=>this._renderInput(e))))}_getFocusableInput(e,t){const i=g(this.viewModel.inputs);let o;if("backward"===e&&i.reverse(),t)if(c(t)){const e=t.inputs.find((e=>e.visible));o=e?i.indexOf(e):0}else{let n;if(_(t)&&!t.group.open){const i=t.group.inputs.filter(m);n="forward"===e?i[i.length-1]:i[0]}else n=t;o=i.indexOf(n)+1}else o=0;for(let n=o;n<i.length;n++){const e=i[n];if(e.visible&&m(e))return e}return null}_renderLabeledField(e){const{dataType:t,feature:i,label:o,layer:n,required:a}=e,s={"aria-label":a?A(this.messages.requiredFieldLabel,{name:o}):o,class:u.label,key:`${n.id}-${i.uid}-${e.name}`},r=[P("div",{class:u.labelTextContent,key:"labelTextContainer"},o,a?P("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==t?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e)];return"date"===t&&"coded-value"!==e.domain?.type?P("label",{...s},r):P("calcite-label",{...s},r)}_renderFieldInput(e){const{dataType:t,domain:i,inputType:o,name:n}=e,a=this.getCommonInputProps(e);if("coded-value"===i?.type){const t=this.viewModel.getFieldValueOptionsForField(n,this.messages.empty);return"switch"!==o||e.hasInvalidSwitchValue?"radio-buttons"===o?this._renderRadioButtonComponents(e,t.flat(),a):this._renderComboBoxComponent(e,t,a):this._renderSwitchComponent(e,a)}return"datetime-picker"===o||"date"===t?this._renderDateComponents(e,a):"number"===t?this._renderNumberComponent(e,a):this._renderStringComponent(e,a)}_renderStringComponent(e,t){return"text-area"===e.inputType?t.readOnly?P("calcite-input",{...t,loading:e.updating,type:"textarea",onCalciteInputInput:e=>this._saveValueFromComponent(e.target)}):P("calcite-text-area",{...t,resize:"vertical",onCalciteTextAreaInput:e=>this._saveValueFromComponent(e.target)}):P("calcite-input",{...t,loading:e.updating,type:"text",onCalciteInputInput:e=>this._saveValueFromComponent(e.target)})}_renderNumberComponent(e,t){return P("calcite-input-number",{...t,integer:l(e.field),loading:e.updating,type:"number",onCalciteInputNumberInput:e=>this._saveValueFromComponent(e.target)})}_renderDateComponents(e,t){const{field:i}=e;switch(i.type){case"date":return this._renderDateFieldComponents(e,t);case"date-only":return this._renderDateOnlyFieldComponent(e,t);case"time-only":return this._renderTimeOnlyFieldComponent(e,t);case"timestamp-offset":return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,k(i,t.value,{timeZone:this.timeZone,...I(i)}))}}_renderDateOnlyFieldComponent(e,t){const{range:i,valid:o,value:n}=e,{class:a,key:s,readOnly:r}=t,{rawMax:l,rawMin:d}=i;return P("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!o,class:a,"data-date-part":"date","data-field-name":t[$],key:`${s}-date-input`,max:O(l)?l:void 0,min:O(d)?d:void 0,numberingSystem:x,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:r,value:null!=n?`${n}`:void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)})}_renderTimeOnlyFieldComponent(e,t){const{valid:i,value:o}=e,{class:n,key:a,readOnly:s}=t;return P("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,class:n,"data-date-part":"time","data-field-name":t[$],key:`${a}-time-input`,numberingSystem:x,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:s,step:e.timeStep,value:null!=o?`${o}`:void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)})}_renderTimestampOffsetFieldComponents(e,t){const{name:i,range:o,timeZone:n,valid:a,value:s}=e,{class:r,key:l,readOnly:d}=t,{rawMax:p,rawMin:c}=o,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!a,numberingSystem:x,overlayPositioning:"fixed",readOnly:d,[$]:i,onfocus:this._onComponentFocus},h=M(p,n),v=M(c,n),g=M(s,n);return P("div",{class:u.dateInputContainer,key:`${l}-date-time-container`},P("calcite-input-date-picker",{...m,class:r,"data-date-part":"date",key:`${l}-date-input`,max:h?.date??void 0,min:v?.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:g.date??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)}),P("calcite-input-time-picker",{...m,class:r,"data-date-part":"time",key:`${l}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:e.timeStep,value:g.time??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)}),e.includeTimeOffset?P("calcite-input-time-zone",{...m,class:r,"data-date-part":"timeZone",disabled:d,key:`${l}-timezone-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:g.timeZoneOffset??"0",onCalciteInputTimeZoneChange:e=>this._saveValueFromDateComponent(e.target)}):null)}_renderDateFieldComponents(e,t){const{includeTime:i,name:o,valid:n,value:a}=e,{class:s,key:r,max:l,min:d,readOnly:p}=t,{timeZone:c}=this,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!n,numberingSystem:x,overlayPositioning:"fixed",readOnly:p,[$]:o,onfocus:this._onComponentFocus},h=D(a,c),v=D(l,c),g=D(d,c);return P("div",{class:u.dateInputContainer,key:`${r}-date-time-container`},P("calcite-input-date-picker",{...m,class:s,"data-date-part":"date",key:`${r}-date-input`,max:v?.date??void 0,min:g?.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:h.date??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)}),i?P("calcite-input-time-picker",{...m,class:s,"data-date-part":"time",key:`${r}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:1,value:h.time??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)}):null)}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return P("calcite-input",{...i,class:this.classes(u.fieldInput,u.inputDisabled),readOnly:!0,type:"text",value:null!=t?`${t}`:i.value})}_renderComboBoxComponent(e,t,i){const{value:o,name:n}=e,{viewModel:a,_inputsWithChanges:s}=this,r="INSERT"===a.arcadeEditType,l=s.has(n),d=null==o&&(!r||l),p=r&&e.showNoValueOptionEnabled&&!l?()=>{}:i.onblur;return P("calcite-combobox",{...i,allowCustomValues:!1,clearDisabled:!0,disabled:i.readOnly,onblur:p,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({target:t})=>{d&&0===t.selectedItems.length?this._ignoreDeselectionOfNoValueOption(t):e.isSubtypeField&&0===t.selectedItems.length?t.value=`${e.value}`:this._saveValueFromComponent(t)}},this.renderComboboxOptionsList(e,t))}renderComboboxOptionsList(e,t){const{value:i,name:o}=e,{messages:n,messagesTemplates:a,viewModel:s,_inputsWithChanges:r}=this,[l,d,p]=t.map((e=>e.map((({name:e,value:t})=>P("calcite-combobox-item",{key:`#${t}`,selected:i===t,textLabel:e,value:`${t}`}))))),u=[];d.length>0&&u.push(P("calcite-combobox-item-group",{key:"other",label:a.other},d)),p.length>0&&u.push(P("calcite-combobox-item-group",{key:"unsupported",label:n.subtypes.unsupportedDomainGroupTitle},p)),u.length>0?u.unshift(P("calcite-combobox-item-group",{key:"recommended",label:n.recommended},l)):u.push(...l);const c="INSERT"===s.arcadeEditType,m=r.has(o),h=null==i&&(!c||m);return e.showNoValueOptionEnabled&&u.unshift(P("calcite-combobox-item",{key:"empty-option",selected:h,textLabel:e.showNoValueLabel||n.empty,value:""})),u}_renderRadioButtonComponents(e,t,i){const{name:o,value:n}=e,a=t.map((({name:e,value:t})=>this._renderRadioButtonComponent({key:e,label:e,name:o,value:t,selected:t===n,props:i})));if(e.showNoValueOptionEnabled){const t="",s=e.showNoValueLabel||this.messages.empty,r=n===t||null===n;a.unshift(this._renderRadioButtonComponent({key:"empty-option",label:s,name:o,value:t,selected:r,props:i}))}return P("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:u.inputRadioGroup,"data-field-name":i[$],key:`${i.key}-radio-group`,layout:"vertical",name:i.key,required:i.required},a)}_renderSwitchComponent(e,t){const{value:i}=e,o=!!b(e.element,"switch")&&i===e.element.input.onValue;return P("calcite-switch",{...t,checked:o,class:u.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldName=null},onCalciteSwitchChange:e=>this._saveValueFromComponent(e.target)})}_renderRadioButtonComponent({key:e,name:t,value:i,selected:o,label:n,props:a}){return P("calcite-label",{class:u.inputRadioLabel,key:e,layout:"inline"},P("calcite-radio-button",{...a,afterCreate:void 0,afterUpdate:void 0,checked:o,class:u.inputRadio,disabled:a.readOnly,name:t,onblur:()=>{this._focusedFieldName=null},value:i,onCalciteRadioButtonChange:({target:e})=>{e.checked&&this._saveValueFromComponent(e)}}),n)}_renderAuxiliaryText(e){const t=e.name,i=this._inputsWithChanges.has(t)&&!e.valid?C(e,this.messages,this.timeZone):null!=this.viewModel.contingencyConstraintViolations.get(t)?this.messages.validationErrors.valuesIncompatible:null!=e.valueExpressionExecutor&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null;return null!=i?P("calcite-input-message",{icon:!0,status:"invalid"},i):this._inputsWithChanges.has(t)&&e.valueIsOutOfDomain?P("calcite-input-message",{icon:!0,status:"idle"},this.messages.subtypes.fieldOutOfSubtypeDomainWarning):this._renderDescriptionOrEmpty(e.description)}_renderShowAllRelatedRecordsListItem(e){const{featureCount:t,relationshipId:i,showAllActionVisible:o}=e,{relatedRecordCallbacks:n}=this;if(!o||!n?.showAllRelatedRecords)return;const a=this.messages;return P("calcite-list-item",{description:A(a.totalCount,{count:t}),label:a.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(i)},P("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}_renderAddRelatedRecordButton(e){const{canAddRelatedFeature:t,relationshipId:i,relatedLayer:o}=e,{messages:n,relatedRecordCallbacks:a}=this;if(t&&a?.addRelatedRecord&&o)return P("calcite-button",{alignment:"center",appearance:"outline-fill",class:u.centeredButton,disabled:e.updating||!e.originHasValidKey,iconStart:"plus",key:`${i}-add-button`,onclick:()=>{!e.updating&&e.originHasValidKey&&this._onAddRelatedRecordsClick(i,o)},round:!0,scale:"s",width:"half"},e.relatedLayerIsTable?n.addRecord:n.addFeature)}_renderRelatedRecordListItem(e,t){const{feature:i,description:o,title:n}=e,{feature:a,relatedRecordCallbacks:s}=this,{highlightHelper:r}=this.viewModel,l=()=>{r?.removeAll(),s?.editRelatedRecord&&a&&s.editRelatedRecord({parentFeature:a,relationshipId:t,relatedFeature:i})},d=r?()=>r.add(i):void 0,p=r?()=>r.remove(i):void 0;return P("calcite-list-item",{bind:this,description:o,key:`${t}-${i.uid}`,label:n,onclick:l,onmouseenter:d,onmouseleave:p,value:n},P("calcite-icon",{icon:f(i),slot:"content-start"}),P("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled||!e.editable)return;const{featureCount:t,relationshipId:i,showAllEnabled:o}=e,n=o?null:this._renderDescriptionOrEmpty(e.description),a=t>0?this._renderRelatedRecordsList(e):e.loaded?e.originHasValidKey?this._renderNoRelatedRecordsNotice():this._renderNoValidOriginKeyNotice(e):void 0;return P("calcite-label",{class:this.classes(u.label,u.relatedRecordsLabel),key:`relationship-${i}-container`},P("div",null,this._renderRelatedRecordsHeaderContainer(e),n,a),this._renderAddRelatedRecordButton(e))}_renderRelatedRecordsHeaderContainer(e){const t=e.updating||!e.loaded;return P("div",{class:u.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},P("span",null,e.label),t?P("calcite-loader",{inline:!0,key:"loader",label:this.messagesCommon?.loading,scale:"s",type:"indeterminate"}):void 0)}_renderRelatedRecordsList(e){const{relationshipId:t}=e;return P("calcite-list",{class:u.relatedRecordsList},e.relatedFeatureInfos.map((e=>this._renderRelatedRecordListItem(e,t))),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoValidOriginKeyNotice(e){const{messages:t}=this,i=e.relatedLayerIsTable?t.noOriginKeyRecord:t.noOriginKeyFeature,o=e.relationship?.keyField,n=this.viewModel.findField(o),a=e.layer?.fieldsIndex.get(o),s=n?.label||a?.alias||o,r=A(i,{relatedLayerName:e.relatedLayer?.title,originKeyField:s});return P("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},P("div",{slot:"message"},r))}_renderNoRelatedRecordsNotice(){return P("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},P("div",{slot:"message"},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return P("div",{afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved,bind:this,class:u.listObserver,key:"feature-observer"})}_renderTextElementInput(e){return P("div",{class:u.textElement,innerHTML:e.text,key:e.id})}getCommonInputProps(e){const{disabled:t}=this,{editable:i,hint:o,label:n,maxLength:a,minLength:s,name:r,range:{max:l,min:d},required:p,valid:c,value:m}=e,h=this._inputsWithChanges.has(r),v=!i||t;return{afterCreate:this._afterComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":c?"false":"true",class:this.classes(u.fieldInput,v?u.inputDisabled:null),status:h&&!c?"invalid":"idle",key:r,label:n,max:null!=l?l:void 0,min:null!=d?d:void 0,maxLength:a>-1?a:void 0,minLength:s>-1?s:void 0,placeholder:o??void 0,readOnly:v,required:p,value:null==m?"":`${m}`,onblur:this._onComponentBlur,onfocus:this._onComponentFocus,onkeydown:this._onComponentKeyDown,[$]:r}}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute($))}_afterDateComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e),i=e.dataset.datePart,o=this._dateComponentMap.get(t.name);if("valueAsDate"in e&&null!=e.value){const i=new ResizeObserver((()=>{e.value=void 0,e.value=D(t.value).date??"",i.unobserve(e)}));i.observe(e)}if(null!=o)switch(i){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}else this._dateComponentMap.set(t.name,{[i]:e});this._afterDateComponentCreateOrUpdate(e)}_afterDateComponentCreateOrUpdate(e){this._afterComponentCreateOrUpdate(e)}_afterComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e);y(t)&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"}),this._afterComponentCreateOrUpdate(e)}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),o=t||i;o&&this._afterComponentCreateOrUpdate(o)}_afterComponentCreateOrUpdate(e){const{viewModel:t}=this,i=this._getFieldInputFromHTMLElement(e),o=t.findField(this._focusedFieldName);this._attemptFocusOnNextRender&&o===i&&(this._attemptFocusOnNextRender=!1,_(i)&&(i.group.open=!0),e.setFocus())}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._focusedFieldName=i.name}_onComponentBlur(e){const t=e.target;this._focusedFieldName=null,this._saveValueFromComponent(t)}_saveValueFromDateComponent(e){const{timeZone:t}=this,i=this._getFieldInputFromHTMLElement(e),o=i.field.type,{name:n,range:a}=i,s=this._dateComponentMap.get(n);if(!s)return;let r=this.viewModel.getValue(n),l=null;"date-only"===o?l=Array.isArray(e.value)?e.value[0]:e.value:"time-only"===o?(r=N(r),l=N(e.value)):l="timestamp-offset"===o?null!=e.value?V({dateComponent:s.date,timeComponent:s.time,timeZoneComponent:s.timeZone,oldValue:r,defaultTimeZone:t}):null:null!=e.value?T({oldValue:r,dateComponent:s.date,timeComponent:s.time,timeZone:t,max:a.max,min:a.min}):null,null!==l&&e.value?r!==l&&this._updateFieldValue(n,l):this._updateFieldValue(n,null)}_saveValueFromComponent(e){const t=this._getFieldInputFromHTMLElement(e),i=this._parseValue(e),o=t.value;t.isSubtypeField&&F(this.layer,o,i)?this._pendingSubtypeChoice||i===o||(this._pendingSubtypeChoice=this._handleSubtypeChoice(t,i)):this._updateFieldValue(t.name,i)}async _handleSubtypeChoice(e,t){const{value:i,name:n}=e,{layer:a,messages:s,viewModel:r,messagesCommon:l}=this;if(this._updateFieldValue(n,t),!a||!("subtypes"in a)||!a.subtypes?.length)return;const d=a.subtypes.find((e=>e.code===t)),p=a.subtypes.find((e=>e.code===i))?.name??`${i}`;if(!d)return;r.hasPendingSubtypeChoice=!0;const u=o();let c="update-fields";const m=[{label:s.subtypes.useDefaultValuesOption,value:"update-fields"},{label:s.subtypes.keepCurrentValuesOption,value:"keep-existing"}],h={context:"info",title:s.subtypes.changeWarningTitle,message:A(s.subtypes.changeWarning,{originalType:p,newType:d.name}),radios:m,defaultRadioSelection:"update-fields",onRadioSelection:e=>c=e,actions:{primary:{label:l.apply,action:()=>u.resolve(c),type:"positive"},secondary:{label:l.cancel,type:"neutral",action:()=>u.resolve("undo")}},cancel:()=>u.reject()};try{this.showPrompt(h);switch(await u.promise){case"update-fields":r.applySubtypeDefaults(d),this._validateContingenciesForNonNullFields();break;case"keep-existing":this._validateContingenciesForNonNullFields();break;case"undo":this._updateFieldValue(e.name,i)}}finally{r.hasPendingSubtypeChoice=!1,this.clearPrompt(),this._pendingSubtypeChoice=null}}_onComponentKeyDown({key:e,target:t}){const i=this._getFieldInputFromHTMLElement(t);"Enter"===e&&_(i)&&!i.group.open&&(i.group.open=!0)}_updateFieldValue(e,t){const i=this.viewModel.getValue(e);this.viewModel.setValue(e,t),this._inputsWithChanges.add(e);i!==t&&this.viewModel.fieldsWithContingentValues.has(e)&&this._validateContingenciesForNonNullFields()}_validateContingenciesForNonNullFields(){const e=Object.fromEntries(Object.entries(this.getValues()).filter((([e,t])=>null!=t)));this.viewModel.validateContingencyConstraints(e)}_parseValue(e){const t=this._getFieldInputFromHTMLElement(e),i=e.value;return b(t.element,"switch")?e.checked?t.element.input.onValue:t.element.input.offValue:null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_ignoreDeselectionOfNoValueOption(e){const{firstChild:t,selectedItems:o}=e;0===o.length&&t&&"selected"in t?t.selected=!0:i.getLogger(this).warnOnce("Failed to override user attempt to deselect 'No value' option.")}_onGroupToggle(e,t){e.open?(t.open=!0,this._focusedFieldName=this._getFocusableInput("forward",t)?.name||null,this._attemptFocusOnNextRender=!0,"sequential"===this.groupDisplay&&this.viewModel.allGroupInputs.forEach((e=>{e!==t&&(e.open=!1)}))):t.open=!1,this.scheduleRender()}_onFormSubmit(e){e.preventDefault()}_onFormKeyDown(e){"Enter"===e.key&&this.viewModel.submit()}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}_onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);const e=this.viewModel.activeRelationshipInput;e&&this._listObserverNode&&e.showAllEnabled&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){const e=this.viewModel.activeRelationshipInput;e?.incrementPage()}_syncGroupInputStates(){if("sequential"!==this.groupDisplay)return;const e=this.viewModel.allGroupInputs;if(!e.length)return;const t=e.filter((e=>e.open));0===t.length?e[0].open=!0:t.length>1&&t.slice(1).forEach((e=>e.open=!1))}get test(){return{inputsWithChanges:this._inputsWithChanges}}};e([s()],H.prototype,"_listObserverNode",void 0),e([s()],H.prototype,"_relatedRecordsEnabled",null),e([s()],H.prototype,"_prompt",void 0),e([s()],H.prototype,"disabled",null),e([s()],H.prototype,"feature",null),e([s()],H.prototype,"formTemplate",null),e([s()],H.prototype,"groupDisplay",void 0),e([s()],H.prototype,"headingLevel",void 0),e([s()],H.prototype,"icon",null),e([s()],H.prototype,"label",null),e([s()],H.prototype,"layer",null),e([s()],H.prototype,"map",null),e([s(),E("esri/widgets/FeatureForm/t9n/FeatureForm")],H.prototype,"messages",void 0),e([s(),E("esri/t9n/common")],H.prototype,"messagesCommon",void 0),e([s(),E("esri/widgets/Feature/t9n/Feature")],H.prototype,"messagesFeature",void 0),e([s(),E("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],H.prototype,"messagesTemplates",void 0),e([s()],H.prototype,"relatedRecordCallbacks",null),e([s()],H.prototype,"relationshipId",null),e([s()],H.prototype,"spatialReference",null),e([s()],H.prototype,"strict",null),e([s()],H.prototype,"timeZone",null),e([s()],H.prototype,"showPrompt",null),e([s()],H.prototype,"clearPrompt",null),e([s(),U(["value-change","submit"])],H.prototype,"viewModel",void 0),e([s()],H.prototype,"test",null),H=e([r("esri.widgets.FeatureForm")],H);const Z=H;export{Z as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import"../core/has.js";import i from"../core/Logger.js";import{createResolver as o}from"../core/promiseUtils.js";import{watch as n,whenOnce as a}from"../core/reactiveUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{isIntegerField as l}from"../layers/support/fieldUtils.js";import d from"./Widget.js";import{Prompt as p}from"./Editor/components/Prompt.js";import{css as u}from"./FeatureForm/css.js";import{isGroupInput as c,isFieldInput as m,isRelationshipInput as h,isTextElementInput as v,flattenInputs as g,isInputInGroupInput as _,isFieldElementWithInputType as b,getErrorMessageForFieldInput as f,getIconForFeature as C,isNumberFieldInput as y,subtypeChangeShouldPrompt as F}from"./FeatureForm/featureFormUtils.js";import w from"./FeatureForm/FeatureFormViewModel.js";import{loadCalciteComponents as R}from"./support/componentsUtils.js";import{isString as O}from"./support/dataUtils.js";import{getLabelForDateFieldValue as k,getIntlOptionsForField as I,numberingSystem as x,prepareISOFieldValueForDateComponents as M,prepareUnixFieldValueForDateComponents as D,normalizeTimeOnlyString as N,getISOFieldValueFromDateComponents as V,getUnixFieldValueFromDateComponents as T}from"./support/dateUtils.js";import{globalCss as L}from"./support/globalCss.js";import{Heading as S,incrementHeadingLevel as j}from"./support/Heading.js";import"./support/widgetUtils.js";import{messageBundle as E}from"./support/decorators/messageBundle.js";import{vmEvent as U}from"./support/decorators/vmEvent.js";import{tsx as P}from"./support/jsxFactory.js";import{substitute as A}from"../intl/substitute.js";const $="data-field-name";let H=class extends d{constructor(e,t){super(e,t),this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._inputsWithChanges=new Set,this._focusedFieldName=null,this._pendingSubtypeChoice=null,this._listObserverNode=null,this._listObserver=new IntersectionObserver((e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()}),{root:window.document}),this._prompt=null,this.groupDisplay="all",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new w,this._onShowAllRelatedRecordsClick=e=>{const{feature:t,relatedRecordCallbacks:i}=this;t&&i?.showAllRelatedRecords&&i.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t)=>{const{feature:i,relatedRecordCallbacks:o}=this;i&&o?.addRelatedRecord&&o.addRelatedRecord({parentFeature:i,relatedLayer:t,relationshipId:e})},this._onFormKeyDown=this._onFormKeyDown.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onGroupToggle=this._onGroupToggle.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentKeyDown=this._onComponentKeyDown.bind(this),this._afterComponentCreate=this._afterComponentCreate.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentCreateOrUpdate=this._afterDateComponentCreateOrUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n((()=>this.feature),(()=>{this._inputsWithChanges.clear(),this._dateComponentMap.clear(),a((()=>!this.viewModel.updating)).then((()=>{const e=this._getFocusableInput("forward");this._syncGroupInputStates(),this._focusedFieldName=e?.name||null,this._attemptFocusOnNextRender=!0}))})),n((()=>this.groupDisplay),(()=>this._syncGroupInputStates())),this.on("submit",(e=>{if(e.invalid.length>0){const[t]=e.invalid;e.invalid.forEach((e=>this._inputsWithChanges.add(e))),this._focusedFieldName=t,this._attemptFocusOnNextRender=!0,this.scheduleRender()}})),n((()=>[this.viewModel.activeRelationshipInput,this._listObserverNode]),(()=>this._onObserverChange()))])}loadDependencies(){return R({block:()=>import("@esri/calcite-components/dist/components/calcite-block.js"),button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.js"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),input:()=>import("@esri/calcite-components/dist/components/calcite-input.js"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker.js"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message.js"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number.js"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker.js"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button.js"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group.js"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch.js"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area.js")})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){const e=this.relatedRecordCallbacks;return!(!e||!(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get icon(){return"form-field"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get relatedRecordCallbacks(){return this.viewModel.relatedRecordCallbacks}set relatedRecordCallbacks(e){this.viewModel.relatedRecordCallbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get showPrompt(){return e=>{this._prompt?.cancel?.(),this._prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get clearPrompt(){return()=>this._prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){const{state:e}=this.viewModel;return P("div",{class:this.classes(u.base,L.widget,L.panel)},"ready"===e?this._renderForm():null)}_renderForm(){return P("div",null,P("form",{class:u.form,novalidate:!0,onkeydown:this._onFormKeyDown,onsubmit:this._onFormSubmit},this._renderHeader(),this._renderContent()),this._prompt?P(p,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderHeader(){const e=this.viewModel;if(!e.formHeaderVisible)return;const t=null!=e.formTitle&&P(S,{key:"title",level:this.headingLevel},e.formTitle),i=null!=e.formDescription&&P("p",{class:u.description,key:"description"},e.formDescription);return P("div",{class:u.formHeader},t,i)}_renderContent(){const{viewModel:e}=this;return e.activeRelationshipInput?this._renderRelationshipInput(e.activeRelationshipInput):e.inputs.filter(t).filter((e=>e.visible)).map((e=>this._renderInput(e)))}_renderInput(e){return c(e)?this._renderGroup(e):m(e)?this._renderLabeledField(e):h(e)?this._renderRelationshipInput(e):v(e)?this._renderTextElementInput(e):void 0}_renderDescriptionOrEmpty(e,t){return null==e?null:P("div",{class:this.classes(u.description),id:t},e)}_renderGroup(e){const{disabled:t,formTemplate:i,headingLevel:o}=this,{description:n,id:a,inputs:s,label:r,open:l}=e,d=s.filter((e=>e.visible)),p=this.viewModel.findField(this._focusedFieldName),c=p?.group===e,m="sequential"===this.groupDisplay;return P("calcite-block",{class:this.classes(u.group,m?u.groupSequential:null,c?u.groupActive:null,t?u.inputDisabled:null),collapsible:!0,"data-group":e,description:n||void 0,disabled:t,heading:`${r}`,headingLevel:i?.title?j(o):o,id:a,key:a,open:l,onCalciteBlockToggle:({target:t})=>this._onGroupToggle(t,e)},d.map((e=>this._renderInput(e))))}_getFocusableInput(e,t){const i=g(this.viewModel.inputs);let o;if("backward"===e&&i.reverse(),t)if(c(t)){const e=t.inputs.find((e=>e.visible));o=e?i.indexOf(e):0}else{let n;if(_(t)&&!t.group.open){const i=t.group.inputs.filter(m);n="forward"===e?i[i.length-1]:i[0]}else n=t;o=i.indexOf(n)+1}else o=0;for(let n=o;n<i.length;n++){const e=i[n];if(e.visible&&m(e))return e}return null}_renderLabeledField(e){const{dataType:t,feature:i,label:o,layer:n,required:a}=e,s={"aria-label":a?A(this.messages.requiredFieldLabel,{name:o}):o,class:u.label,key:`${n.id}-${i.uid}-${e.name}`},r=[P("div",{class:u.labelTextContent,key:"labelTextContainer"},o,a?P("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==t?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e)];return"date"===t&&"coded-value"!==e.domain?.type?P("label",{...s},r):P("calcite-label",{...s},r)}_renderFieldInput(e){const{dataType:t,domain:i,inputType:o,name:n}=e,a=this.getCommonInputProps(e);if("coded-value"===i?.type){const t=this.viewModel.getFieldValueOptionsForField(n,this.messages.empty);return"switch"!==o||e.hasInvalidSwitchValue?"radio-buttons"===o?this._renderRadioButtonComponents(e,t.flat(),a):this._renderComboBoxComponent(e,t,a):this._renderSwitchComponent(e,a)}return"datetime-picker"===o||"date"===t?this._renderDateComponents(e,a):"number"===t?this._renderNumberComponent(e,a):this._renderStringComponent(e,a)}_renderStringComponent(e,t){return"text-area"===e.inputType?t.readOnly?P("calcite-input",{...t,loading:e.updating,type:"textarea",onCalciteInputInput:e=>this._saveValueFromComponent(e.target)}):P("calcite-text-area",{...t,resize:"vertical",onCalciteTextAreaInput:e=>this._saveValueFromComponent(e.target)}):P("calcite-input",{...t,loading:e.updating,type:"text",onCalciteInputInput:e=>this._saveValueFromComponent(e.target)})}_renderNumberComponent(e,t){return P("calcite-input-number",{...t,integer:l(e.field),loading:e.updating,type:"number",onCalciteInputNumberInput:e=>this._saveValueFromComponent(e.target)})}_renderDateComponents(e,t){const{field:i}=e;switch(i.type){case"date":return this._renderDateFieldComponents(e,t);case"date-only":return this._renderDateOnlyFieldComponent(e,t);case"time-only":return this._renderTimeOnlyFieldComponent(e,t);case"timestamp-offset":return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,k(i,t.value,{timeZone:this.timeZone,...I(i)}))}}_renderDateOnlyFieldComponent(e,t){const{range:i,valid:o,value:n}=e,{class:a,key:s,readOnly:r}=t,{rawMax:l,rawMin:d}=i;return P("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!o,class:a,"data-date-part":"date","data-field-name":t[$],key:`${s}-date-input`,max:O(l)?l:void 0,min:O(d)?d:void 0,numberingSystem:x,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:r,value:null!=n?`${n}`:void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)})}_renderTimeOnlyFieldComponent(e,t){const{valid:i,value:o}=e,{class:n,key:a,readOnly:s}=t;return P("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,class:n,"data-date-part":"time","data-field-name":t[$],key:`${a}-time-input`,numberingSystem:x,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:s,step:e.timeStep,value:null!=o?`${o}`:void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)})}_renderTimestampOffsetFieldComponents(e,t){const{name:i,range:o,timeZone:n,valid:a,value:s}=e,{class:r,key:l,readOnly:d}=t,{rawMax:p,rawMin:c}=o,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!a,numberingSystem:x,overlayPositioning:"fixed",readOnly:d,[$]:i,onfocus:this._onComponentFocus},h=M(p,n),v=M(c,n),g=M(s,n);return P("div",{class:u.dateInputContainer,key:`${l}-date-time-container`},P("calcite-input-date-picker",{...m,class:r,"data-date-part":"date",key:`${l}-date-input`,max:h?.date??void 0,min:v?.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:g.date??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)}),P("calcite-input-time-picker",{...m,class:r,"data-date-part":"time",key:`${l}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:e.timeStep,value:g.time??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)}),e.includeTimeOffset?P("calcite-input-time-zone",{...m,class:r,"data-date-part":"timeZone",disabled:d,key:`${l}-timezone-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:g.timeZoneOffset??"0",onCalciteInputTimeZoneChange:e=>this._saveValueFromDateComponent(e.target)}):null)}_renderDateFieldComponents(e,t){const{includeTime:i,name:o,valid:n,value:a}=e,{class:s,key:r,max:l,min:d,readOnly:p}=t,{timeZone:c}=this,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!n,numberingSystem:x,overlayPositioning:"fixed",readOnly:p,[$]:o,onfocus:this._onComponentFocus},h=D(a,c),v=D(l,c),g=D(d,c);return P("div",{class:u.dateInputContainer,key:`${r}-date-time-container`},P("calcite-input-date-picker",{...m,class:s,"data-date-part":"date",key:`${r}-date-input`,max:v?.date??void 0,min:g?.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:h.date??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.target)}),i?P("calcite-input-time-picker",{...m,class:s,"data-date-part":"time",key:`${r}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:1,value:h.time??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.target)}):null)}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return P("calcite-input",{...i,class:this.classes(u.fieldInput,u.inputDisabled),readOnly:!0,type:"text",value:null!=t?`${t}`:i.value})}_renderComboBoxComponent(e,t,i){const{value:o,name:n}=e,{viewModel:a,_inputsWithChanges:s}=this,r="INSERT"===a.arcadeEditType,l=s.has(n),d=null==o&&(!r||l),p=r&&e.showNoValueOptionEnabled&&!l?()=>{}:i.onblur;return P("calcite-combobox",{...i,allowCustomValues:!1,clearDisabled:!0,disabled:i.readOnly,onblur:p,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({target:t})=>{d&&0===t.selectedItems.length?this._ignoreDeselectionOfNoValueOption(t):e.isSubtypeField&&0===t.selectedItems.length?t.value=`${e.value}`:this._saveValueFromComponent(t)}},this.renderComboboxOptionsList(e,t))}renderComboboxOptionsList(e,t){const{value:i,name:o}=e,{messages:n,messagesTemplates:a,viewModel:s,_inputsWithChanges:r}=this,[l,d,p]=t.map((e=>e.map((({name:e,value:t})=>P("calcite-combobox-item",{key:`#${t}`,selected:i===t,textLabel:e,value:`${t}`}))))),u=[];d.length>0&&u.push(P("calcite-combobox-item-group",{key:"other",label:a.other},d)),p.length>0&&u.push(P("calcite-combobox-item-group",{key:"unsupported",label:n.subtypes.unsupportedDomainGroupTitle},p)),u.length>0?u.unshift(P("calcite-combobox-item-group",{key:"recommended",label:n.recommended},l)):u.push(...l);const c="INSERT"===s.arcadeEditType,m=r.has(o),h=null==i&&(!c||m);return e.showNoValueOptionEnabled&&u.unshift(P("calcite-combobox-item",{key:"empty-option",selected:h,textLabel:e.showNoValueLabel||n.empty,value:""})),u}_renderRadioButtonComponents(e,t,i){const{name:o,value:n}=e,a=t.map((({name:e,value:t})=>this._renderRadioButtonComponent({key:e,label:e,name:o,value:t,selected:t===n,props:i})));if(e.showNoValueOptionEnabled){const t="",s=e.showNoValueLabel||this.messages.empty,r=n===t||null===n;a.unshift(this._renderRadioButtonComponent({key:"empty-option",label:s,name:o,value:t,selected:r,props:i}))}return P("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:u.inputRadioGroup,"data-field-name":i[$],key:`${i.key}-radio-group`,layout:"vertical",name:i.key,required:i.required},a)}_renderSwitchComponent(e,t){const{value:i}=e,o=!!b(e.element,"switch")&&i===e.element.input.onValue;return P("calcite-switch",{...t,checked:o,class:u.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldName=null},onCalciteSwitchChange:e=>this._saveValueFromComponent(e.target)})}_renderRadioButtonComponent({key:e,name:t,value:i,selected:o,label:n,props:a}){return P("calcite-label",{class:u.inputRadioLabel,key:e,layout:"inline"},P("calcite-radio-button",{...a,afterCreate:void 0,afterUpdate:void 0,checked:o,class:u.inputRadio,disabled:a.readOnly,name:t,onblur:()=>{this._focusedFieldName=null},value:i,onCalciteRadioButtonChange:({target:e})=>{e.checked&&this._saveValueFromComponent(e)}}),n)}_renderAuxiliaryText(e){const t=e.name,i=this._inputsWithChanges.has(t)&&!e.valid?f(e,this.messages,this.timeZone):null!=this.viewModel.contingencyConstraintViolations.get(t)?this.messages.validationErrors.valuesIncompatible:null!=e.valueExpressionExecutor&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null;return null!=i?P("calcite-input-message",{icon:!0,status:"invalid"},i):this._inputsWithChanges.has(t)&&e.valueIsOutOfDomain?P("calcite-input-message",{icon:!0,status:"idle"},this.messages.subtypes.fieldOutOfSubtypeDomainWarning):this._renderDescriptionOrEmpty(e.description)}_renderShowAllRelatedRecordsListItem(e){const{featureCount:t,relationshipId:i,showAllActionVisible:o}=e,{relatedRecordCallbacks:n}=this;if(!o||!n?.showAllRelatedRecords)return;const a=this.messages;return P("calcite-list-item",{description:A(a.totalCount,{count:t}),label:a.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(i)},P("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}_renderAddRelatedRecordButton(e){const{canAddRelatedFeature:t,relationshipId:i,relatedLayer:o}=e,{messages:n,relatedRecordCallbacks:a}=this;if(t&&a?.addRelatedRecord&&o)return P("calcite-button",{alignment:"center",appearance:"outline-fill",class:u.centeredButton,disabled:e.updating||!e.originHasValidKey,iconStart:"plus",key:`${i}-add-button`,onclick:()=>{!e.updating&&e.originHasValidKey&&this._onAddRelatedRecordsClick(i,o)},round:!0,scale:"s",width:"half"},e.relatedLayerIsTable?n.addRecord:n.addFeature)}_renderRelatedRecordListItem(e,t){const{feature:i,description:o,title:n}=e,{feature:a,relatedRecordCallbacks:s}=this,{highlightHelper:r}=this.viewModel,l=()=>{r?.removeAll(),s?.editRelatedRecord&&a&&s.editRelatedRecord({parentFeature:a,relationshipId:t,relatedFeature:i})},d=r?()=>r.add(i):void 0,p=r?()=>r.remove(i):void 0;return P("calcite-list-item",{bind:this,description:o,key:`${t}-${i.uid}`,label:n,onclick:l,onmouseenter:d,onmouseleave:p,value:n},P("calcite-icon",{icon:C(i),slot:"content-start"}),P("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled||!e.editable)return;const{featureCount:t,relationshipId:i,showAllEnabled:o}=e,n=o?null:this._renderDescriptionOrEmpty(e.description),a=t>0?this._renderRelatedRecordsList(e):e.loaded?e.originHasValidKey?this._renderNoRelatedRecordsNotice():this._renderNoValidOriginKeyNotice(e):void 0;return P("calcite-label",{class:this.classes(u.label,u.relatedRecordsLabel),key:`relationship-${i}-container`},P("div",null,this._renderRelatedRecordsHeaderContainer(e),n,a),this._renderAddRelatedRecordButton(e))}_renderRelatedRecordsHeaderContainer(e){const t=e.updating||!e.loaded;return P("div",{class:u.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},P("span",null,e.label),t?P("calcite-loader",{inline:!0,key:"loader",label:this.messagesCommon?.loading,scale:"s",type:"indeterminate"}):void 0)}_renderRelatedRecordsList(e){const{relationshipId:t}=e;return P("calcite-list",{class:u.relatedRecordsList},e.relatedFeatureInfos.map((e=>this._renderRelatedRecordListItem(e,t))),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoValidOriginKeyNotice(e){const{messages:t}=this,i=e.relatedLayerIsTable?t.noOriginKeyRecord:t.noOriginKeyFeature,o=e.relationship?.keyField,n=this.viewModel.findField(o),a=e.layer?.fieldsIndex.get(o),s=n?.label||a?.alias||o,r=A(i,{relatedLayerName:e.relatedLayer?.title,originKeyField:s});return P("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},P("div",{slot:"message"},r))}_renderNoRelatedRecordsNotice(){return P("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},P("div",{slot:"message"},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return P("div",{afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved,bind:this,class:u.listObserver,key:"feature-observer"})}_renderTextElementInput(e){return P("div",{class:u.textElement,innerHTML:e.text,key:e.id})}getCommonInputProps(e){const{disabled:t}=this,{editable:i,hint:o,label:n,maxLength:a,minLength:s,name:r,range:{max:l,min:d},required:p,valid:c,value:m}=e,h=this._inputsWithChanges.has(r),v=!i||t;return{afterCreate:this._afterComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":c?"false":"true",class:this.classes(u.fieldInput,v?u.inputDisabled:null),status:h&&!c?"invalid":"idle",key:r,label:n,max:null!=l?l:void 0,min:null!=d?d:void 0,maxLength:a>-1?a:void 0,minLength:s>-1?s:void 0,placeholder:o??void 0,readOnly:v,required:p,value:null==m?"":`${m}`,onblur:this._onComponentBlur,onfocus:this._onComponentFocus,onkeydown:this._onComponentKeyDown,[$]:r}}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute($))}_afterDateComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e),i=e.dataset.datePart,o=this._dateComponentMap.get(t.name);if("valueAsDate"in e&&null!=e.value){const i=new ResizeObserver((()=>{switch(e.value=void 0,t.field.type){case"date":e.value=D(t.value,this.timeZone).date??"";break;case"timestamp-offset":e.value=M(t.value,this.timeZone).date??"";break;default:e.value=`${t.value}`}i.unobserve(e)}));i.observe(e)}if(null!=o)switch(i){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}else this._dateComponentMap.set(t.name,{[i]:e});this._afterDateComponentCreateOrUpdate(e)}_afterDateComponentCreateOrUpdate(e){this._afterComponentCreateOrUpdate(e)}_afterComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e);y(t)&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"}),this._afterComponentCreateOrUpdate(e)}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),o=t||i;o&&this._afterComponentCreateOrUpdate(o)}_afterComponentCreateOrUpdate(e){const{viewModel:t}=this,i=this._getFieldInputFromHTMLElement(e),o=t.findField(this._focusedFieldName);this._attemptFocusOnNextRender&&o===i&&(this._attemptFocusOnNextRender=!1,_(i)&&(i.group.open=!0),e.setFocus())}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._focusedFieldName=i.name}_onComponentBlur(e){const t=e.target;this._focusedFieldName=null,this._saveValueFromComponent(t)}_saveValueFromDateComponent(e){const{timeZone:t}=this,i=this._getFieldInputFromHTMLElement(e),o=i.field.type,{name:n,range:a}=i,s=this._dateComponentMap.get(n);if(!s)return;let r=this.viewModel.getValue(n),l=null;"date-only"===o?l=Array.isArray(e.value)?e.value[0]:e.value:"time-only"===o?(r=N(r),l=N(e.value)):l="timestamp-offset"===o?null!=e.value?V({dateComponent:s.date,timeComponent:s.time,timeZoneComponent:s.timeZone,oldValue:r,defaultTimeZone:t}):null:null!=e.value?T({oldValue:r,dateComponent:s.date,timeComponent:s.time,timeZone:t,max:a.max,min:a.min}):null,null!==l&&e.value?r!==l&&this._updateFieldValue(n,l):this._updateFieldValue(n,null)}_saveValueFromComponent(e){const t=this._getFieldInputFromHTMLElement(e),i=this._parseValue(e),o=t.value;t.isSubtypeField&&F(this.layer,o,i)?this._pendingSubtypeChoice||i===o||(this._pendingSubtypeChoice=this._handleSubtypeChoice(t,i)):this._updateFieldValue(t.name,i)}async _handleSubtypeChoice(e,t){const{value:i,name:n}=e,{layer:a,messages:s,viewModel:r,messagesCommon:l}=this;if(this._updateFieldValue(n,t),!a||!("subtypes"in a)||!a.subtypes?.length)return;const d=a.subtypes.find((e=>e.code===t)),p=a.subtypes.find((e=>e.code===i))?.name??`${i}`;if(!d)return;r.hasPendingSubtypeChoice=!0;const u=o();let c="update-fields";const m=[{label:s.subtypes.useDefaultValuesOption,value:"update-fields"},{label:s.subtypes.keepCurrentValuesOption,value:"keep-existing"}],h={context:"info",title:s.subtypes.changeWarningTitle,message:A(s.subtypes.changeWarning,{originalType:p,newType:d.name}),radios:m,defaultRadioSelection:"update-fields",onRadioSelection:e=>c=e,actions:{primary:{label:l.apply,action:()=>u.resolve(c),type:"positive"},secondary:{label:l.cancel,type:"neutral",action:()=>u.resolve("undo")}},cancel:()=>u.reject()};try{this.showPrompt(h);switch(await u.promise){case"update-fields":r.applySubtypeDefaults(d),this._validateContingenciesForNonNullFields();break;case"keep-existing":this._validateContingenciesForNonNullFields();break;case"undo":this._updateFieldValue(e.name,i)}}finally{r.hasPendingSubtypeChoice=!1,this.clearPrompt(),this._pendingSubtypeChoice=null}}_onComponentKeyDown({key:e,target:t}){const i=this._getFieldInputFromHTMLElement(t);"Enter"===e&&_(i)&&!i.group.open&&(i.group.open=!0)}_updateFieldValue(e,t){const i=this.viewModel.getValue(e);this.viewModel.setValue(e,t),this._inputsWithChanges.add(e);i!==t&&this.viewModel.fieldsWithContingentValues.has(e)&&this._validateContingenciesForNonNullFields()}_validateContingenciesForNonNullFields(){const e=Object.fromEntries(Object.entries(this.getValues()).filter((([e,t])=>null!=t)));this.viewModel.validateContingencyConstraints(e)}_parseValue(e){const t=this._getFieldInputFromHTMLElement(e),i=e.value;return b(t.element,"switch")?e.checked?t.element.input.onValue:t.element.input.offValue:null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_ignoreDeselectionOfNoValueOption(e){const{firstChild:t,selectedItems:o}=e;0===o.length&&t&&"selected"in t?t.selected=!0:i.getLogger(this).warnOnce("Failed to override user attempt to deselect 'No value' option.")}_onGroupToggle(e,t){e.open?(t.open=!0,this._focusedFieldName=this._getFocusableInput("forward",t)?.name||null,this._attemptFocusOnNextRender=!0,"sequential"===this.groupDisplay&&this.viewModel.allGroupInputs.forEach((e=>{e!==t&&(e.open=!1)}))):t.open=!1,this.scheduleRender()}_onFormSubmit(e){e.preventDefault()}_onFormKeyDown(e){"Enter"===e.key&&this.viewModel.submit()}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}_onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);const e=this.viewModel.activeRelationshipInput;e&&this._listObserverNode&&e.showAllEnabled&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){const e=this.viewModel.activeRelationshipInput;e?.incrementPage()}_syncGroupInputStates(){if("sequential"!==this.groupDisplay)return;const e=this.viewModel.allGroupInputs;if(!e.length)return;const t=e.filter((e=>e.open));0===t.length?e[0].open=!0:t.length>1&&t.slice(1).forEach((e=>e.open=!1))}get test(){return{inputsWithChanges:this._inputsWithChanges}}};e([s()],H.prototype,"_listObserverNode",void 0),e([s()],H.prototype,"_relatedRecordsEnabled",null),e([s()],H.prototype,"_prompt",void 0),e([s()],H.prototype,"disabled",null),e([s()],H.prototype,"feature",null),e([s()],H.prototype,"formTemplate",null),e([s()],H.prototype,"groupDisplay",void 0),e([s()],H.prototype,"headingLevel",void 0),e([s()],H.prototype,"icon",null),e([s()],H.prototype,"label",null),e([s()],H.prototype,"layer",null),e([s()],H.prototype,"map",null),e([s(),E("esri/widgets/FeatureForm/t9n/FeatureForm")],H.prototype,"messages",void 0),e([s(),E("esri/t9n/common")],H.prototype,"messagesCommon",void 0),e([s(),E("esri/widgets/Feature/t9n/Feature")],H.prototype,"messagesFeature",void 0),e([s(),E("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],H.prototype,"messagesTemplates",void 0),e([s()],H.prototype,"relatedRecordCallbacks",null),e([s()],H.prototype,"relationshipId",null),e([s()],H.prototype,"spatialReference",null),e([s()],H.prototype,"strict",null),e([s()],H.prototype,"timeZone",null),e([s()],H.prototype,"showPrompt",null),e([s()],H.prototype,"clearPrompt",null),e([s(),U(["value-change","submit"])],H.prototype,"viewModel",void 0),e([s()],H.prototype,"test",null),H=e([r("esri.widgets.FeatureForm")],H);const Z=H;export{Z as default};
|