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.
7 lines
1.8 KiB
7 lines
1.8 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 ../Widget ./FeatureContent/FeatureContentViewModel ./support/featureUtils ../support/widget ../support/jsxFactory".split(" "),function(d,e,b,q,r,g,h,k,l,m,c){b=class extends h{constructor(a,n){super(a,n);this.viewModel=null;this._addTargetToAnchors=p=>{Array.from(p.querySelectorAll("a")).forEach(f=>{l.shouldOpenInNewTab(f.href)&& |
|
!f.hasAttribute("target")&&f.setAttribute("target","_blank")})}}get creator(){return this.viewModel?.creator}set creator(a){this.viewModel&&(this.viewModel.creator=a)}get graphic(){return this.viewModel?.graphic}set graphic(a){this.viewModel&&(this.viewModel.graphic=a)}render(){return c.tsx("div",{class:"esri-feature-content"},"loading"===this.viewModel?.state?this._renderLoading():this._renderCreated())}_renderLoading(){return c.tsx("div",{class:"esri-feature-content__loader-container",key:"loader"}, |
|
c.tsx("div",{class:"esri-feature-content__loader"}))}_renderCreated(){const a=this.viewModel?.created;return a?a instanceof HTMLElement?c.tsx("div",{afterCreate:this._attachToNode,bind:a,key:a}):m.isWidget(a)?c.tsx("div",{key:a},!a.destroyed&&a.render()):c.tsx("div",{afterCreate:this._addTargetToAnchors,innerHTML:a,key:a}):null}_attachToNode(a){a.appendChild(this)}};d.__decorate([e.property()],b.prototype,"creator",null);d.__decorate([e.property()],b.prototype,"graphic",null);d.__decorate([e.property({type:k})], |
|
b.prototype,"viewModel",void 0);return b=d.__decorate([g.subclass("esri.widgets.Feature.FeatureContent")],b)}); |