12345 |
- /*
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- See https://js.arcgis.com/4.25/esri/copyright.txt for details.
- */
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import{byId as o}from"../../core/domUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import{cast as r}from"../../core/accessorSupport/decorators/cast.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";function i(t){return t&&"nodeType"in t}function d(t){return t&&"function"==typeof t.render}const c={component:"esri-component"};let p=class extends e{constructor(){super(...arguments),this.widget=null}destroy(){this.widget&&this.widget.destroy(),this.node=null}get id(){return this.get("widget.id")||this.get("node.id")}set node(t){const e=this._get("node");t!==e&&(t&&t.classList.add(c.component),e&&e.classList.remove(c.component),this._set("node",t))}castNode(t){return t?"string"==typeof t||i(t)?(this._set("widget",null),o(t)):(d(t)&&!t.domNode&&(t.domNode=document.createElement("div")),this._set("widget",t),t.domNode):(this._set("widget",null),null)}};t([s({dependsOn:[]})],p.prototype,"id",null),t([s()],p.prototype,"node",null),t([r("node")],p.prototype,"castNode",null),t([s({readOnly:!0})],p.prototype,"widget",void 0),p=t([n("esri.views.ui.Component")],p);const l=p;export{l as default};
|