You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
3.2 KiB
10 lines
3.2 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("../../chunks/tslib.es6 ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../intl/substitute ./Grid/Column ./support/tableUtils".split(" "),function(b,c,a,y,z,r,t,u,m){a=class extends u{constructor(e){super(e);this.flexGrow=1;this.icon="link";this.relationshipId=this.relatedLayer=this.layer=null;this.renderFunction=({root:d,rowData:f})=>{if(f){var h=f.item,{layer:n,relatedLayer:p}=this;if(h?.feature&& |
|
m.isIFeatureTableSupportedLayerWithRelationships(n)&&m.isIFeatureTableSupportedLayerWithRelationships(p)){var {messages:g}=this,{index:v}=f,{feature:w}=h,{collapsed:k,showRelatedTableCallback:x,relationshipId:q}=this;f=h.relatedRecords?.find(l=>l.relationshipId===q)?.count??0;g=!k&&x&&g?.recordsCount?t.substitute(g.recordsCount,{count:f}):`${f}`;f=l=>{l.preventDefault();k||this.showRelatedTableCallback?.({feature:w,index:v,layer:n,relatedLayer:p,relationshipId:q})};h=k?"":"chevron-right";d.firstChild? |
|
(d=d.firstChild,d.textContent=g,d.onclick=f,d.iconEnd=h):(g=this.createCalciteButton({className:"esri-column__show-related-records-button",iconEnd:h,iconFlipRtl:"both",scale:"m",textContent:g,onclick:f}),this.removeCellContent(d),d.appendChild(g))}}};this.resizable=!0;this.showRelatedTableCallback=null;this.textAlign="center";this.width="200px"}get _relationshipLabel(){return this.label||this.originRelationship?.name||this.layer.title||""}get collapsed(){return this._get("collapsed")||!1}set collapsed(e){e? |
|
this.set({flexGrow:0,resizable:!1,width:"80px"}):this.set({flexGrow:1,resizable:!0,width:"200px"});this._set("collapsed",e)}get effectiveLabel(){return this.collapsed?"":this._relationshipLabel}get iconNode(){const {icon:e}=this;return e?this.createCalciteIcon({icon:e,textLabel:this._relationshipLabel}):null}get originRelationship(){const e=this.relationshipId;return this.relatedLayer.relationships?.find(({id:d})=>d===e)}get relationship(){const e=this.relationshipId;return this.layer.relationships?.find(({id:d})=> |
|
d===e)}};b.__decorate([c.property()],a.prototype,"_relationshipLabel",null);b.__decorate([c.property()],a.prototype,"collapsed",null);b.__decorate([c.property()],a.prototype,"effectiveLabel",null);b.__decorate([c.property()],a.prototype,"flexGrow",void 0);b.__decorate([c.property()],a.prototype,"icon",void 0);b.__decorate([c.property()],a.prototype,"iconNode",null);b.__decorate([c.property()],a.prototype,"layer",void 0);b.__decorate([c.property()],a.prototype,"originRelationship",null);b.__decorate([c.property()], |
|
a.prototype,"relatedLayer",void 0);b.__decorate([c.property()],a.prototype,"relationship",null);b.__decorate([c.property()],a.prototype,"relationshipId",void 0);b.__decorate([c.property()],a.prototype,"renderFunction",void 0);b.__decorate([c.property()],a.prototype,"resizable",void 0);b.__decorate([c.property()],a.prototype,"showRelatedTableCallback",void 0);b.__decorate([c.property()],a.prototype,"textAlign",void 0);b.__decorate([c.property()],a.prototype,"width",void 0);return a=b.__decorate([r.subclass("esri.widgets.FeatureTable.RelationshipColumn")], |
|
a)}); |